Example #1
0
        private static LibraryCard Convert(Bibliography bibliography)
        {
            if (bibliography == null)
            {
                throw new ArgumentNullException(nameof(bibliography));
            }

            return(new LibraryCard()
            {
                DateRentBook = bibliography.give_date,
                DateReturnBook = bibliography.get_date,
                CodeRentedBook = bibliography.id_book_instance,
                Client = ClientInformation.Convert(bibliography.Reader)
            });
        }
Example #2
0
 public ClientInformation FindByName(string name) => ClientInformation.Convert(Readers.FindByName(name));
Example #3
0
 public ClientInformation FindByLibraryTicket(int ticketNumber) => ClientInformation.Convert(Readers.FindByLibraryTicket(ticketNumber));
Example #4
0
 public void RentBook(ClientInformation client, int bookInventoryCode)
 {
     Readers.RentBook(ClientInformation.Convert(client), bookInventoryCode);
     Readers.Save();
 }
Example #5
0
 public void Edit(ClientInformation client)
 {
     Readers.Edit(ClientInformation.Convert(client));
     Readers.Save();
 }