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);
 }
Пример #2
0
        private void menuAdmin_Click(object sender, EventArgs e)
        {
            FormAdmin ad = new FormAdmin();

            ad.ShowDialog();
        }