Beispiel #1
0
 public override int addClient(LibraryClient newClient)
 {
     int theNewClient = base.addClient(newClient);
     if (theNewClient > 0 && NewClientAdded != null) NewClientAdded(this, new EventArgs<string>(string.Format("The user '{0}' has been added to the library '{1}'.",
         newClient.ClientName, name)));
     return theNewClient;
 }
Beispiel #2
0
 public virtual int addClient(LibraryClient newClient)
 {
     if (newClient == null || newClient.ClientID == 0)
         return -1;
     int counter = clients.Count;
     clients.Add(newClient);
     return (clients.Count == counter + 1) ? newClient.ClientID : -1;
 }
Beispiel #3
0
 public virtual int addClient(string name)
 {
     LibraryClient newClient;
     newClient = new LibraryClient(name);
     if (newClient == null || newClient.ClientID == 0)
         return -1;
     int counter = clients.Count;
     clients.Add(newClient);
     return (clients.Count == counter + 1) ? newClient.ClientID : -1;
 }