public Employees(string name, string surname, DateTime birthday, string oib, CompanyPositions rank) { Name = name; Surname = surname; BirthDay = birthday; OIB = oib; Rank = rank; }
public Employee(string Name, double Salary, CompanyPositions Position, CompanyDepartment Department, string Email = "", int Age = -1) { this.Name = Name; this.Salary = Salary; this.Position = Position; this.Department = Department; this.Email = Email; this.Age = Age; }
public static bool AddEmployee(string name, string surname, DateTime birthday, string oib, CompanyPositions rank) { foreach (var Employee in ListOfEmployees) { if (Employee.OIB == oib) { return(false); } } var NewEmployee = new Employees(name, surname, birthday, oib, rank); ListOfEmployees.Add(NewEmployee); return(true); }