Beispiel #1
0
 private void searchBtn_Click(object sender, EventArgs e)
 {
     //DataTable dt = new DataTable();
     //if (Utilities.IsNullOrEmpty(this.serialSearch.Text) && Utilities.IsNullOrEmpty(this.customerId.Text) && Utilities.IsNullOrEmpty(this.license.Text) && Utilities.IsNullOrEmpty(this.customerName.Text))
     //{
     //    SearchForm_Load(sender, e);
     //}
     //System.Collections.IList list = VehicleDao.SearchResult(this.serialSearch.Text, this.customerName.Text, this.customerId.Text, this.license.Text);
     //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.SearchResult(this.serialSearch.Text, this.customerName.Text, this.customerId.Text, this.license.Text).Tables[0];
 }