private void btnDangNhap_Click(object sender, EventArgs e) { string userName = txtUserName.Text; string passWord = txtPassWord.Text; BLL.TaiKhoanBLL taiKhoan = new BLL.TaiKhoanBLL(); if (txtPassWord.Text.Length == 0 || txtUserName.Text.Length == 0) { MessageBox.Show("Bạn Chưa Nhập Tài Khoản Hoặc Mật Khẩu !!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); txtPassWord.Text = ""; txtUserName.Text = ""; txtUserName.Focus(); } else if (taiKhoan.CheckLogin(userName, passWord)) { DTO.TaiKhoanDTO taiKhoanDTO = taiKhoan.GetDataByUserName(userName); frmManager f = new frmManager(taiKhoanDTO); this.Hide(); f.ShowDialog(); txtPassWord.Text = ""; txtPassWord.Focus(); this.Show(); } else { MessageBox.Show("Bạn Đã Nhập Sai Tài Khoản Hoặc Mật Khẩu !!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Warning); txtPassWord.Text = ""; txtPassWord.Focus(); } }
public ucTTCaNhan(string id) { InitializeComponent(); bllTaiKhoan = new BLL.TaiKhoanBLL(); bllNhom = new BLL.NhomBLL(); lblID.Text = id; tmp = lblID.Text; }
public ucTKKQSV() { InitializeComponent(); bllChucVu = new BLL.ChucVuBLL(); bllChuongTrinh = new BLL.ChuongTrinhBLL(); bllGiaoVien = new BLL.GiaoVienBLL(); bllHocKy = new BLL.HocKyBLL(); bllKetQua = new BLL.KetQuaBLL(); bllKhoa = new BLL.KhoaBLL(); bllLop = new BLL.LopBLL(); bllMonHoc = new BLL.MonHocBLL(); bllNhom = new BLL.NhomBLL(); bllNienKhoa = new BLL.NienKhoaBLL(); bllQuanTri = new BLL.QuanTriBLL(); bllSinhVien = new BLL.SinhVienBLL(); bllTaiKhoan = new BLL.TaiKhoanBLL(); bllTinChi = new BLL.TinChiBLL(); bllTrangThai = new BLL.TrangThaiBLL(); }
private void btnThayDoiMatKhau_Click(object sender, EventArgs e) { if (txtMatKhau.Text.Length > 0 && txtMatKhauMoi1.Text.Length > 0 && txtMatKhauMoi2.Text.Length > 0) { if (txtMatKhauMoi1.Text == txtMatKhauMoi2.Text) { BLL.TaiKhoanBLL taiKhoan = new BLL.TaiKhoanBLL(); if (taiKhoan.UpdateDataWithUser(txtUserName1.Text, txtMatKhau.Text, txtMatKhauMoi1.Text)) { MessageBox.Show("Mật khẩu đã được thay đỗi !", "Thông báo"); txtMatKhau.Text = ""; txtMatKhauMoi1.Text = ""; txtMatKhauMoi2.Text = ""; txtMatKhau.Focus(); } else { MessageBox.Show("Lỗi trong quá trình thực hiện. Kiểm tra mật khẩu !", "Thông báo"); txtMatKhau.Text = ""; txtMatKhauMoi1.Text = ""; txtMatKhauMoi2.Text = ""; txtMatKhau.Focus(); } } else { MessageBox.Show("Nhập lại mật khẩu mới trùng nhau !", "Thông báo"); txtMatKhauMoi2.Text = ""; txtMatKhauMoi2.Focus(); } } else { MessageBox.Show("Vui lòng nhập đầy đủ thông tin !", "Thông báo"); } }
public uctblTaiKhoan() { InitializeComponent(); bllTaiKhoan = new BLL.TaiKhoanBLL(); bllNhom = new BLL.NhomBLL(); }