private void LoadData(string swhere)
 {
     try
     {
         KhachHang kh     = new KhachHang();
         DataTable listkh = kh.GetKhachHang(swhere);
         FormatControl(listkh);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 private void LoadMaKhachHang()
 {
     try
     {
         KhachHang kh  = new KhachHang();
         DataTable dtb = kh.GetKhachHang("");
         AutoCompleteStringCollection DsKhachHang = new AutoCompleteStringCollection();
         foreach (DataRow row in dtb.Rows)
         {
             DsKhachHang.Add(row["MaKhachHang"].ToString());
         }
         txt_KhachHang.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
         txt_KhachHang.AutoCompleteSource       = AutoCompleteSource.CustomSource;
         txt_KhachHang.AutoCompleteCustomSource = DsKhachHang;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }