//Tìm kiếm đơn hàng private void txt_ThongTinTimKiem_TextChanged(object sender, EventArgs e) { try { dgv_DanhSachDonHang.DataSource = client.DonDatHang_GetDonHang(new DonDatHang(), txt_ThongTinTimKiem.Text).Tables[0]; FormatGrid(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void LoadData() { try { DonDatHangClient donhang_client = new DonDatHangClient(); DonDatHang dh = new DonDatHang(); dgv_DanhSachDonHang.DataSource = donhang_client.DonDatHang_GetDonHang(dh, "").Tables[0]; FormatGrid(); } catch (Exception ex) { throw ex; } }
private void LoadDonHang() { try { DonDatHangClient ddhclient = new DonDatHangClient(); DonDatHang ddh = new DonDatHang(); DataTable dtb = ddhclient.DonDatHang_GetDonHang(ddh, "").Tables[0]; AutoCompleteStringCollection DsDonHang = new AutoCompleteStringCollection(); foreach (DataRow row in dtb.Rows) { DsDonHang.Add(row["MaDonHang"].ToString()); } txt_DonHang.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txt_DonHang.AutoCompleteSource = AutoCompleteSource.CustomSource; txt_DonHang.AutoCompleteCustomSource = DsDonHang; } catch (Exception ex) { throw ex; } }