private void ManHinhChucNangChoMuonSach_Load(object sender, EventArgs e) { LoadMaPhieuMuon(); QuanLyPhieuMuonBUS BUS = new QuanLyPhieuMuonBUS(); DataTable dtQuyDinh = BUS.LayQuyDinh(); txtMaDG.AutoCompleteSource = AutoCompleteSource.CustomSource; txtMaDG.AutoCompleteMode = AutoCompleteMode.Suggest; AutoCompleteStringCollection collection = new AutoCompleteStringCollection(); DataTable dtDsDG = LoadDsDG(); collection = LoadSuggestTextBox(dtDsDG); txtMaDG.AutoCompleteCustomSource = collection; MaxSach = int.Parse(dtQuyDinh.Rows[0]["SoSachMuonToiDa"].ToString()); MaxNgayMuon = int.Parse(dtQuyDinh.Rows[0]["SoNgayMuonToiDa"].ToString()); }
private void ManHinhChucNangNhanTraSach_Load(object sender, EventArgs e) { LoadMaPhieuTra(); txtMaDG.Focus(); QuanLyPhieuMuonBUS BUSPM = new QuanLyPhieuMuonBUS(); DataTable dtQuyDinh = BUSPM.LayQuyDinh(); txtMaDG.AutoCompleteSource = AutoCompleteSource.CustomSource; txtMaDG.AutoCompleteMode = AutoCompleteMode.Suggest; AutoCompleteStringCollection collection = new AutoCompleteStringCollection(); DataTable dtDsDG = LoadDsDG(); collection = LoadSuggestTextBox(dtDsDG); txtMaDG.AutoCompleteCustomSource = collection; soNgayMuonQuyDinh = int.Parse(dtQuyDinh.Rows[0]["SoNgayMuonToiDa"].ToString()); SoTienPhatQuyDinh = float.Parse(dtQuyDinh.Rows[0]["TienPhatTraTre"].ToString()); dtgrPhieuTra.Enabled = false; }