Exemplo n.º 1
0
 /// <summary>
 /// This metod fills the controls in the GUI with data from a specific index and book
 /// in the book list.
 /// </summary>
 /// <param name="selectedIndex"></param>
 private void FillControls(int selectedIndex)
 {
     tbx_ISBN.Text              = myBookManager.GetBook(selectedIndex).ISBN;
     tbx_AuthorFirstName.Text   = myBookManager.GetBook(selectedIndex).MyAuthor.FirstName;
     tbx_AuthorLastName.Text    = myBookManager.GetBook(selectedIndex).MyAuthor.LastName;
     tbx_Title.Text             = myBookManager.GetBook(selectedIndex).MyTitle.MyTitle;
     cbx_BookType.SelectedIndex = (int)myBookManager.GetBook(selectedIndex).MyBookGenre;
     dtp_DateTimePicker.Value   = myBookManager.GetBook(selectedIndex).ReturnDate;
 }