/// <summary> /// Clears form and loads list boxes with data. /// </summary> private void LoadBoxes() { chkListCheckedOut.Items.Clear(); List <Book> checkedBooks = LibraryDB.GetMemberBooks(); if (checkedBooks != null) { foreach (Book b in checkedBooks) { chkListCheckedOut.Items.Add($"{b.ISBN}, " + $"{b.Title}, " + $"{b.Author}, " + $"{b.PubDate}, " + $"{b.Category}"); } } cboBooksAvail.Items.Clear(); List <Book> uncheckedBooks = LibraryDB.GetAllUncheckedBooks(); if (uncheckedBooks != null) { foreach (Book b in uncheckedBooks) { cboBooksAvail.Items.Add($"{b.ISBN}, " + $"{b.Title}, " + $"{b.Author}, " + $"{b.PubDate}, " + $"{b.Category}"); } } lstSelectedBooks.Items.Clear(); }