public ucDetailsBook(int _book_model_id) { InitializeComponent(); book_model_id = _book_model_id; entity = new LibraryDBEntities(); dt = new DataTable(); dt.Columns.Add("Book ID", typeof(int)); dt.Columns.Add("Status", typeof(string)); dt.Columns.Add("Lend Date", typeof(string)); dt.Columns.Add("Due Date", typeof(string)); bookmodel = EntityBroker.getBookModelByID(_book_model_id); }
public Window_Popup_ReturnBook(int _book_id) { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.FixedSingle; //make unresizable transaction = EntityBroker.getLastTransationByBookID(_book_id); book = EntityBroker.getBookByBookID(_book_id); member = EntityBroker.getMemberByMemberID(transaction.MemberID); bookmodel = EntityBroker.getBookModelByID(book.BookModelID); calculateCharge(); lblBookTitle.Text = bookmodel.BookTitle; lblBookIDValue.Text = book.BookID.ToString(); lblMemberNameValue.Text = member.MemberName; lblMemberIDValue.Text = member.MemberID.ToString(); lblRentDateValue.Text = transaction.LendDate.ToString("dd MM, yyyy"); lblChargeValue.Text = charge.ToString(); }