public void PopulateBookInfo(ref BookDialog bd, Book b)
 {
     bd.BookTitle = b.Title;
     bd.Author    = b.Author;
     bd.Publisher = b.Publisher;
     bd.ISBN      = b.ISBN;
     bd.Price     = b.Price;
     bd.Date      = b.Date;
     bd.Stock     = b.Stock;
 }
 public void updateBookInformationStaff(BookDialog bd, ListBooksDialog list)
 {
     listOfBooks[list.SelectedIndex].name      = bd.BookTitle;
     listOfBooks[list.SelectedIndex].author    = bd.Author;
     listOfBooks[list.SelectedIndex].publisher = bd.Publisher;
     listOfBooks[list.SelectedIndex].isbn      = bd.ISBN;
     listOfBooks[list.SelectedIndex].price     = bd.Price;
     listOfBooks[list.SelectedIndex].date      = bd.Date;
     listOfBooks[list.SelectedIndex].stock     = bd.Stock;
 }
 public void editBookStaffView(BookDialog dia, ListBooksDialog list)
 {
     dia.BookTitle = listOfBooks[list.SelectedIndex].name;
     dia.Author    = listOfBooks[list.SelectedIndex].author;
     dia.Publisher = listOfBooks[list.SelectedIndex].publisher;
     dia.ISBN      = listOfBooks[list.SelectedIndex].isbn;
     dia.Price     = listOfBooks[list.SelectedIndex].price;
     dia.Date      = listOfBooks[list.SelectedIndex].date;
     dia.Stock     = listOfBooks[list.SelectedIndex].stock;
 }
示例#4
0
 // XXX You may add overriding constructors (constructors with different set of arguments).
 // If you do so, make sure to call :this()
 // public StaffWindow(XXX xxx): this() { }
 // Without :this(), InitializeComponent() is not called
 private void StaffWindow_Load(object sender, EventArgs e)
 {
     listCustomersDialog            = new ListCustomersDialog();
     customerDialog                 = new CustomerDialog();
     listBooksDialog                = new ListBooksDialog();
     bookDialog                     = new BookDialog();
     listCompleteTransactionsDialog = new ListCompleteTransactionsDialog();
     showCompleteTransactionDialog  = new ShowCompleteTransactionDialog();
     listPendingTransactionsDialog  = new ListPendingTransactionsDialog();
     showPendingTransactionDialog   = new ShowPendingTransactionDialog();
 }
 public void EditBookInfo(ref BookDialog bd, Book b)
 {
     isbnList.Remove(b.ISBN);
     b.Title     = bd.BookTitle;
     b.Author    = bd.Author;
     b.Publisher = bd.Publisher;
     b.ISBN      = bd.ISBN;
     b.Price     = bd.Price;
     b.Date      = bd.Date;
     b.Stock     = bd.Stock;
     isbnList.Add(b.ISBN);
 }