private void KhongTraSach() { PhieuMuonSach pms = new PhieuMuonSach(); pms.MaPhieuMuon = int.Parse(txtTSMaP.Text); PhieuMuonSachBLL pmsbll = new PhieuMuonSachBLL(); bool tuchoi = pmsbll.TuChoiPhieuDuyet(pms); Sach sac = new Sach(); sac.TenSach = txtTSS.Text; SachBLL sacbll = new SachBLL(); bool capnhat = sacbll.CapNhatTrangThaiLoi(sac); if (capnhat && tuchoi) { MessageBox.Show("Đã lưu thông tin", "Thông Báo"); LoadLDS(); } }
private void SachBiLoi() { PhieuMuonSach pms = new PhieuMuonSach(); pms.MaPhieuMuon = int.Parse(txtCDMaP.Text); PhieuMuonSachBLL pmsbll = new PhieuMuonSachBLL(); bool tuchoi = pmsbll.TuChoiPhieuDuyet(pms); Sach sac = new Sach(); sac.TenSach = txtCDS.Text; SachBLL sacbll = new SachBLL(); bool capnhat = sacbll.CapNhatTrangThaiLoi(sac); if (capnhat && tuchoi) { MessageBox.Show("Bạn Đã Từ Chối Phiếu Duyệt \n Xử lý sách bị lỗi nhé", "Thông Báo"); LoadLDS(); } }