private void btnDangNhap_Click(object sender, EventArgs e)
 {
     if (DN.KiemTra(txtTen.Text.Trim(), txtMatKhau.Text.Trim(), ref err, ref MaNV) == true)
     {
         if (txtTen.Text.Trim() == "admin" && txtMatKhau.Text.Trim() == "admin")
         {
             FormAdmin formAdmin = new FormAdmin();
             formAdmin.ShowDialog();
             FormManHinhChinh.quyentruycap = QuyenTruyCap.Administrator;
         }
         else
         {
             FormNhanVien formNhanVien = new FormNhanVien();
             formNhanVien.ShowDialog();
             FormManHinhChinh.quyentruycap = QuyenTruyCap.NhanVien;
         }
     }
     MessageBox.Show(err);
 }
Exemplo n.º 2
0
        private void menuNhanVien_Click(object sender, EventArgs e)
        {
            FormNhanVien nv = new FormNhanVien();

            nv.ShowDialog();
        }