private void btnDangNhap_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSdtDN.Text) || string.IsNullOrEmpty(txtMatKhauDN.Text))
     {
         MessageBox.Show("Vui lòng nhập đủ thông tin đăng nhập!", "Thông báo");
     }
     else
     {
         NhanVien nv = new NhanVien(txtSdtDN.Text, txtMatKhauDN.Text);
         if (nhanVien_BUL.GetList_NV().Contains(nv))
         {
             foreach (NhanVien n in nhanVien_BUL.GetList_NV())
             {
                 if (n.sdt.Equals(txtSdtDN.Text))
                 {
                     this.Hide();
                     QuanLyForm quanLyForm = new QuanLyForm(n.ma, n.ten);
                     quanLyForm.ShowDialog();
                     this.Close();
                 }
             }
         }
         else
         {
             MessageBox.Show("Vui lòng kiểm tra lại tài khoản!", "Thông báo");
         }
     }
 }
Beispiel #2
0
        private void btnQuayLai_Click(object sender, EventArgs e)
        {
            this.Hide();
            QuanLyForm quanLyForm = new QuanLyForm(MANV, TENNV);

            quanLyForm.ShowDialog();
            this.Close();
        }