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; }
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; }
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; }