只要frmBorrow
关闭
void borrowClose()
{
frmBorrow br1 = new frmBorrow(this);
br1.FormClosing += br1_FormClosing;
}
void br1_FormClosing(object sender, FormClosingEventArgs e)
{
LoadTransactions();
}
void LoadTransactions()
{
cfgotcall.tether(settings);
string sql = "SELECT * FROM tbltransactionbooks WHERE fBorrowDate LIKE '%" + txtSEARCH.Text.Trim() + "%'";
cfgotcall.engageQuery(sql);
unitbl = cfgotcall.tbl;
sql = "SELECT fBarcodeNo AS 'Barcode No',fBookTitle AS 'Book',fStudent AS 'Student',fIDStudent AS 'Student ID',fStatus AS 'Status',fCourse AS 'Course',fBorrowDate AS 'Date Borrowed',fReturnDate AS 'Due Date',fAuthor AS 'Author',fAccNo AS 'Accession No.',fCallNo AS 'Call No.' FROM tbltransactionbooks WHERE fBorrowDate LIKE '%"
+ txtSEARCH.Text.Trim() + "%'";
cfgotcall.engageQuery(sql);
dgvDISPLAY.DataSource = cfgotcall.tbl;
dgvDISPLAY.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
cfgotcall.untether();
}