示例#1
0
 private void SearchForm_Load(object sender, EventArgs e)
 {
     //System.Collections.IList list = VehicleDao.GetFirst20Row();
     //DataTable dt = new DataTable();
     //if (list != null)
     //{
     //    dt.Columns.Add("Serial");
     //    dt.Columns.Add("OriginId");
     //    dt.Columns.Add("OriginName");
     //    dt.Columns.Add("CurrentId");
     //    dt.Columns.Add("CurrentName");
     //    dt.Columns.Add("VehicleType");
     //    dt.Columns.Add("License");
     //    dt.Columns.Add("Brand");
     //    for (int i = 0; i < list.Count; i++)
     //    {
     //        object[] tmp = (object[])list[i];
     //        object[] o = new object[] { tmp[0], tmp[2], tmp[3], tmp[5], tmp[6], tmp[7], tmp[8], tmp[9] };
     //        dt.Rows.Add(o);
     //    }
     //}
     this.dataGridView.DataSource = VehicleDao.GetFirst20Row().Tables[0];
 }