예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            frmMainAdmin    fMA          = new frmMainAdmin();
            frmMainNhanVien fMNV         = new frmMainNhanVien();
            string          loaiTaiKhoan = tKDNBul.KiemTraDangNhap(txtTenDangNhap.Text, txtMatKhau.Text);

            txtMatKhau.Text = "";
            if (loaiTaiKhoan == "Admin")
            {
                this.Hide();
                fMA.ShowDialog();
                this.Show();
            }
            else
            if (loaiTaiKhoan == "User")
            {
                this.Hide();
                fMNV.ShowDialog();
                this.Show();
            }
            else
            {
                MessageBox.Show("Sai Ten Dang Nhap hoac mat Khau");
            }
        }