Пример #1
0
        private void SetSachMuonQuaHan(int idDocGia)
        {
            cbbSachMuonQuaHan.DataSource = null;
            IList sachChuaTras = CT_PhieuMuonBUS.GetSachMuonQuaHans(idDocGia);

            if (sachChuaTras.Count == 0)
            {
                cbbSachMuonQuaHan.Text = "Không có sách mượn quá hạn";
                return;
            }
            cbbSachMuonQuaHan.DataSource    = sachChuaTras;
            cbbSachMuonQuaHan.DisplayMember = "TenSach";
        }
Пример #2
0
        private bool IsBorrowingOverMaximum()
        {
            int soLuongSachMuonToiDa = CT_PhieuMuonBUS.GetSoLuongSachMuonToiDa();
            int soLuongSachDaMuon    = Int32.Parse(txtSoLuongSachMuon.Text);
            int soLuongSachMuonMuon  = gvMuonSach.Rows.Count;

            if (soLuongSachDaMuon + soLuongSachMuonMuon <= soLuongSachMuonToiDa)
            {
                return(false);
            }
            int thoiHanMuonSach = CT_PhieuMuonBUS.GetThoiHanMuonSach();

            MessageBox.Show(this,
                            $"Chỉ được mượn tối đa { soLuongSachMuonToiDa } quyển sách trong { thoiHanMuonSach } ngày", "Thông báo",
                            MessageBoxButtons.OK, MessageBoxIcon.Error);
            return(true);
        }
Пример #3
0
 private void LoadCT_PhieuMuonByIDPhieuMuon(int idPhieuMuon)
 {
     gvChiTietPhieuMuon.DataSource = CT_PhieuMuonBUS.LoadCT_PhieuMuonByIDPhieuMuon(idPhieuMuon);
 }
Пример #4
0
        private void SetSoLuongSachMuon(int idDocGia)
        {
            int soLuongSachMuon = CT_PhieuMuonBUS.GetSoLuongSachMuonTrongKhoangTG(idDocGia);

            txtSoLuongSachMuon.Text = soLuongSachMuon.ToString();
        }