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"); } }
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 !!"; } }
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(); } }
private void Frm_FormClosing(object sender, FormClosingEventArgs e) { _gv = AccountServices.LayThongTinGiaoVuTheoMa(_gv.MaGV); onload(); }
public frmMain(GiaoVu gv) { _gv = gv; InitializeComponent(); }
public UC_QuanLyTaiKhoan(GiaoVu gv) { gvcurrent = gv; InitializeComponent(); }
public frmThongTinGiaoVu(GiaoVu gv) { _gv = gv; InitializeComponent(); }
public frmDoiMatKhau(GiaoVu gv) { _gv = gv; InitializeComponent(); }