Posts

Showing posts with the label Technical

How to: Get Top n Rows of DataView in C# asp.net

DataView in asp.net doesn't have any method of returning Top n rows or it doesn't accept any row filter string such as, dataview.RowFilter = "top 100". So to server the purpose you can use the method below to get top n rows from DataView. private DataView GetTopDataViewRows(DataView dv, Int32 n) { DataTable dt = dv.Table.Clone(); for (int i = 0; i { if (i>= dv.Count) { break; } dt.ImportRow(dv[i].Row); } return new DataView(dt, dv.RowFilter, dv.Sort, dv.RowStateFilter); }

A Traffic Client Server Model

A traffic client server model is a an application of client-server model. It uses the socket programming. I have used C#.net as a front end and SQL Express as a back end. The problem definition and solution is given below: Download the Full Solution << Client Model: TrafficClient.cs /***************************************************************                     Quazi Mainul Hasan                 ***************************************************************/ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Net.Sockets; using System.IO; using System.Xml; namespace TrafficClient {     public partial cl...