private void btnThemTaiKhoan_Click(object sender, EventArgs e)
        {
            GiaoVu gv = new GiaoVu();

            using (frmThongTinGiaoVu frm = new frmThongTinGiaoVu(gv))
            {
                frm.Controls.Remove(frm.btnUpdate);
                frm.ShowDialog();
            }
        }
        private void btnResetPassword_Click(object sender, EventArgs e)
        {
            GiaoVu CurrentSelected = bdDanhSachTaiKhoan.Current as GiaoVu;

            using (frmDoiMatKhau frm = new frmDoiMatKhau(CurrentSelected))
            {
                frm.txtPasswordCu.Text    = GenericServices.Decrypts(CurrentSelected.MatKhau);
                frm.txtPasswordCu.Visible = false;
                frm.lblPasswordCu.Visible = false;
                frm.ShowDialog();
            }
        }
 private void btnSuaThongTinTK_Click(object sender, EventArgs e)
 {
     Int32[] SelectedRowCollection = gvGiaoVu.GetSelectedRows();
     if (SelectedRowCollection.Length > 0)
     {
         GiaoVu CurrentSelected = bdDanhSachTaiKhoan.Current as GiaoVu;
         using (frmThongTinGiaoVu frm = new frmThongTinGiaoVu(CurrentSelected))
         {
             frm.Size = new Size(530, 283);
             frm.Controls.Remove(frm.lbPassword); frm.Controls.Remove(frm.lblcomfirmPassword);
             frm.Controls.Remove(frm.btnThuchienThemhocsinh); frm.Controls.Remove(frm.txtComfirm); frm.Controls.Remove(frm.txtPassword);
             frm.btnUpdate.Location = new Point(232, 199);
             frm.ShowDialog();
         }
     }
     else
     {
         MessageBox.Show("Chưa chọn gì sao mà xóa");
     }
 }
Esempio n. 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (user.Check_User(tb_username.Text, tb_password.Text))
     {
         if (user.Check_Type('S'))
         {
             Student student_form = new Student(user);
             student_form.Show();
         }
         if (user.Check_Type('G'))
         {
             GiaoVu gv_form = new GiaoVu(user);
             gv_form.Show();
         }
         this.Hide();
     }
     else
     {
         error.Text = "Wrong Username or Password !!";
     }
 }
Esempio n. 5
0
 private void LoginAction()
 {
     if (AccountServices.CheckAccountexits(mttTaiKhoan.Text))
     {
         gv = AccountServices.LayThongtinGiaoVu(mttTaiKhoan.Text);
         if (gv.MatKhau == GenericServices.Encrypts(mttMatKhau.Text))
         {
             Thread m = new Thread(ShowMainForm);
             m.Start();
         }
         else
         {
             Thread x = new Thread(MatKhauCheck);
             x.Start();
         }
     }
     else
     {
         Thread t = new Thread(Settextbox);
         t.Start();
     }
 }
Esempio n. 6
0
 private void Frm_FormClosing(object sender, FormClosingEventArgs e)
 {
     _gv = AccountServices.LayThongTinGiaoVuTheoMa(_gv.MaGV);
     onload();
 }
Esempio n. 7
0
 public frmMain(GiaoVu gv)
 {
     _gv = gv;
     InitializeComponent();
 }
 public UC_QuanLyTaiKhoan(GiaoVu gv)
 {
     gvcurrent = gv;
     InitializeComponent();
 }
Esempio n. 9
0
 public frmThongTinGiaoVu(GiaoVu gv)
 {
     _gv = gv;
     InitializeComponent();
 }
Esempio n. 10
0
 public frmDoiMatKhau(GiaoVu gv)
 {
     _gv = gv;
     InitializeComponent();
 }