} //End numberOfDays //Method to do updates private void updDetails() { //Update Book Status to Available Loans.updBookStatus(intBookID, 'A'); //Update Number of Books Borrow (-1) Loans.updBooksBorrowDecrement(intMemID); //Display confirmation message MessageBox.Show("Book '" + txtBookTitle.Text + "' Returned Successfully", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); //Calling method to prompt user more books to be returned for same Member? returnMoreBooks(); } //End Update
} //End click event //Private Method to Save Rental Items private void saveRentalItems() { //For item in lstCart from 0 to lstCart total items - 1 for (int i = 0; i < lstCart.Items.Count; i++) { //Instantiate LoanItems Object LoanItems aLoanItem = new LoanItems(); aLoanItem.setLoanID(Convert.ToInt32(txtLoanID.Text)); aLoanItem.setBookID(Convert.ToInt32(lstCart.Items[i].ToString().Substring(0, 4))); //Save Rental Item Detials aLoanItem.regLoanItems(); //Update book status in Book File Loans.updBookStatus(Convert.ToInt32(lstCart.Items[i].ToString().Substring(0, 4)), 'U'); //Update No. Books Borrow of the member in Member File Loans.updBooksBorrowIncrement(aMember.getMemID()); } //End For } //End saveRentalItems();