Exemplo n.º 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)
            });
        }
Exemplo n.º 2
0
 public ClientInformation FindByName(string name) => ClientInformation.Convert(Readers.FindByName(name));
Exemplo n.º 3
0
 public ClientInformation FindByLibraryTicket(int ticketNumber) => ClientInformation.Convert(Readers.FindByLibraryTicket(ticketNumber));
Exemplo n.º 4
0
 public void RentBook(ClientInformation client, int bookInventoryCode)
 {
     Readers.RentBook(ClientInformation.Convert(client), bookInventoryCode);
     Readers.Save();
 }
Exemplo n.º 5
0
 public void Edit(ClientInformation client)
 {
     Readers.Edit(ClientInformation.Convert(client));
     Readers.Save();
 }