Пример #1
0
 public bool DeleteClient(Client client)
 {
     if (Clients.Contains(client))
     {
         DeleteAllBorrows(client);
         Clients.Remove(client);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
        public bool AddClient(Client client)
        {
            var clientAdded = client;

            if (!Clients.Contains(clientAdded))
            {
                //.Remove(client);
                Clients.Add(clientAdded);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        public bool AddClient(String firstName, String lastName, String pesel, Int32 age, Gender sex)
        {
            var client = new Client(firstName, lastName, pesel, age, sex);

            if (!Clients.Contains(client))
            {
                //.Remove(client);
                Clients.Add(client);
                return(true);
            }
            else
            {
                return(false);
            }
        }