private void btnkiemTra_Click(object sender, EventArgs e) { Class.XuLyThuVien KiemTra = new Class.XuLyThuVien(); if (KiemTra.DaMuonSachRoi(txtKiemTra.Text) == true) { MetroFramework.MetroMessageBox.Show(this, "Độc Giả Vẫn Chưa Trả Sách", "Không Thể Mượn Sách", MessageBoxButtons.OK, MessageBoxIcon.Question); } else { if (KiemTra.MaPhieuTonTai(txtKiemTra.Text) == true) { PhieuMuonSach DV = new PhieuMuonSach(); PassDataDatVe Share = new PassDataDatVe(DV.GetPassData_FormMain); PassDataSuaVe NgayMuon = new PassDataSuaVe(DV.GetNgayToiDaMuon_FormMain); PassDataSuaVe SoLuongMuon = new PassDataSuaVe(DV.GetLuongSach_FormMain); Share(txtKiemTra.Text); NgayMuon(NgayMuonToiDa); SoLuongMuon(SoLuongMuonToiDa); DV.ShowDialog(); //reset select row this.TileLapPhieuMuon_Click(sender, e); } else { MetroFramework.MetroMessageBox.Show(this, "Thẻ Không Tồn Tại ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } } }
private void btnDatPhieu_Click(object sender, EventArgs e) { // string Str = IdNguoiDung; //this.Hide(); LapTheDocGia DV = new LapTheDocGia(); PassDataDatVe Share = new PassDataDatVe(DV.GetPassData_FormMain); PassDataSuaVe TuoiLapPhieu = new PassDataSuaVe(DV.GetTuoi_FormMain); PassDataSuaVe ThoiHanSuDungThe = new PassDataSuaVe(DV.GetHanSuDung_FormMain); Share(Str); TuoiLapPhieu(TuoiMuonSach); ThoiHanSuDungThe(GiaTriThe); // DV.ShowDialog(); this.TileLapTheDocGia_Click(sender, e); }
private void btnSuaPhieu_Click(object sender, EventArgs e) { if (iIdDocGia != "") { int Str = Convert.ToInt32(iIdDocGia); //this.Hide(); SuaTheDocGia DV = new SuaTheDocGia(); PassDataSuaVe Share = new PassDataSuaVe(DV.GetPassData_FormMain); PassDataSuaVe Tuoi = new PassDataSuaVe(DV.GetTuoiDatThe_FormMain); PassDataSuaVe HanSuDung = new PassDataSuaVe(DV.GetHanDung_FormMain); Share(Str); Tuoi(TuoiMuonSach); HanSuDung(GiaTriThe); DV.ShowDialog(); this.TileLapTheDocGia_Click(sender, e); } else { MetroFramework.MetroMessageBox.Show(this, "Chưa Chọn Thẻ Cần Sửa"); } }