/// <summary> /// Constructor that takes no arguments. /// </summary> public clsClient() : base() { clsClient.staticNbcounter++; clientIdCounter = staticNbcounter; Address = clsDataSource.fncEmptyConstructor(); Nip = clsDataSource.fncEmptyConstructor(); Employee = new clsEmployee(); }
/// <summary> /// Constructor that takes five arguments, one employee as object without the lists. /// </summary> public clsClient(string vNumber, string vName, string vLastName, string vNip, string vAddress, string vNumberEmp, string vNameEmp, string vLastNameEmp, string vPhoto, int vDay, int vMonth, int vYear) : base(vNumber, vName, vLastName) { // constructor employee Employee = new clsEmployee(vNumberEmp, vNameEmp, vLastNameEmp, vPhoto, vDay, vMonth, vYear); clsClient.staticNbcounter++; clientIdCounter = staticNbcounter; Address = vAddress; Nip = vNip; }
/// <summary> /// Function : fncAdd(clsEmployee employee) -> adds an Employee in the Employees list. /// </summary> /// <param name="client"></param> /// <returns>ListEmployees.Add(employee.vIdEmp, employee) or false</returns> public bool fncAdd(clsEmployee employee) { if (!fncExist(employee.vNumber)) { ListEmployees.Add(employee.vNumber, employee); return(true); } else { return(false); } }