Beispiel #1
0
        static void Main(string[] args)
        {
            {
                Departament[] dArray = new Departament[2]
                {
                    new Departament("Бухгалтерия", DateTime.Today),
                    new Departament("ИТ", DateTime.Today),
                };

                //Departament dep01 = new Departament("Бухгалтерия", DateTime.Today);
                //Departament dep02 = new Departament("ИТ", DateTime.Today);

                Employee[] eArray = new Employee[3]
                {
            new Employee("Иван", "Иванов","Иванович",1500),
            new Employee("Петр", "Петров","Петрович",2000),
            new Employee("Василий", "Васильев","Васильевич",1000),
                };
                var x = new Employee("Генадий", "Генадьев", "Генадиевич", 1000);

                EmployeeList eList = new EmployeeList(eArray, dArray);
                eList.AddEmployee(x);
                Console.WriteLine(Departament.id+" "+dArray[0].name);
                Console.WriteLine(dArray[1].name);
                //Console.WriteLine(eList);
                //Console.WriteLine(dep01.id);
                //Console.WriteLine(dep02.id);

                //Console.WriteLine(eList. //GetEnumerator.dArray[0].id);

                foreach (Employee p in eList)
                {
                    Console.WriteLine(p.name + " " + p.surname);
                    Console.WriteLine(Departament.id);
                }
                Console.ReadKey();

            }
        }
Beispiel #2
0
 public EmployeeEnum(Employee[] list)
 {
     eList = list;
 }
Beispiel #3
0
 public void AddEmployee(Employee _employee)
 {
     Array.Resize<Employee>(ref eList, eList.Length + 1);
     eList.SetValue(_employee, eList.Length-1);
 }
Beispiel #4
0
 public void ChangeSalary(ref Employee _employer, double _salary)
 {
     _employer.salary = _salary;
 }