private void txtSDT_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         Boolean             check = false;
         List <KhachHangDTO> lst   = KhachHangBUS.GetAllKH();
         foreach (var kh in lst)
         {
             if (txtSDT.Text == kh.sdt)
             {
                 txtTenKH.Text = KhachHangBUS.GetTEnKH(txtSDT.Text);
                 check         = true;
             }
         }
         if (check == false)
         {
             txtTenKH.Text = "";
             frmThemKH frm = new frmThemKH(txtSDT.Text);
             frm.Show();
         }
     }
 }
Esempio n. 2
0
        private void btnThemKH_Click(object sender, EventArgs e)
        {
            frmThemKH frm = new frmThemKH();

            frm.Show();
        }