private void FormMain_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'duLieuPhanMem3.VW_TaiLieuQuaHan' table. You can move, or remove it, as needed. this.vW_TaiLieuQuaHanTableAdapter.Fill(this.duLieuPhanMem3.VW_TaiLieuQuaHan); // TODO: This line of code loads data into the 'duLieuPhanMem2.VW_TaiLieuChoMuon' table. You can move, or remove it, as needed. this.vW_TaiLieuChoMuonTableAdapter.Fill(this.duLieuPhanMem2.VW_TaiLieuChoMuon); // TODO: This line of code loads data into the 'duLieuPhanMem.VW_TaiLieuChoMuon' table. You can move, or remove it, as needed. this.vW_TaiLieuChoMuonTableAdapter.Fill(this.duLieuPhanMem.VW_TaiLieuChoMuon); // TODO: This line of code loads data into the 'duLieuPhanMem1.VW_SoLanMuon' table. You can move, or remove it, as needed. this.vW_SoLanMuonTableAdapter.Fill(this.duLieuPhanMem1.VW_SoLanMuon); // TODO: This line of code loads data into the 'duLieuPhanMem1.VW_TaiLieuMuonNhieuNhat' table. You can move, or remove it, as needed. this.vW_TaiLieuMuonNhieuNhatTableAdapter.Fill(this.duLieuPhanMem1.VW_TaiLieuMuonNhieuNhat); try { DataTable dataTable = dangNhapBO.ThongTinDangNhap(taiKhoan, matKhau); tênNhânViênToolStripMenuItem.Text = dataTable.Rows[0]["HoTen"].ToString(); } catch { } tabMenu.SelectedTab = null; }
private void btnXacNhan_Click(object sender, EventArgs e) { DataTable dataTable = dangNhapBO.ThongTinDangNhap(taiKhoan, matKhau); try { if (txtMatKhauCu.Text.Equals(matKhau)) { if (txtMatKhauMoi.Text.Equals(txtNhapLaiMatKhau.Text)) { if (!txtMatKhauMoi.Text.Equals(txtMatKhauCu.Text)) { dangNhapBO.DoiMatKhau(taiKhoan, txtMatKhauMoi.Text); MessageBox.Show("Đổi mật khẩu thành công", "Thông Báo"); this.Close(); } else { MessageBox.Show("Mật khẩu mới không được trùng mật khẩu cũ", "Thông Báo"); } } else { MessageBox.Show("Mật khẩu nhập lại không đúng", "Thông Báo"); } } else { MessageBox.Show("Mật khẩu cũ không chính xác", "Thông Báo"); } } catch { MessageBox.Show("Đổi mật khẩu không thành công", "Thông Báo"); } }