Пример #1
0
        static void MenuOptions_CreateEmployee()
        {
            EmployeeDTO employee = new EmployeeDTO();

            Console.Write("Please enter first name of Employee to add:");
            employee.FirstName = Console.ReadLine();

            Console.Write("Please enter last name of employee:");
            employee.LastName = Console.ReadLine();

            employee.Role = 0;

            employee.ID = Guid.NewGuid().ToString();

            JMS_Commands.CreateEmployee(employee);

            employee = null;
            GC.Collect();
        }
Пример #2
0
        static void MenuOptions_UpdateEmployee()
        {
            Console.Write("Please enter the id of the equipment item you would like to update:");
            EmployeeDTO employee = JMS_Commands.GetEmployee(Console.ReadLine());

            Console.Write("Employee to update:");
            PrintEmployee(employee);

            Console.Write("Please enter updated first name of Employee to add:");
            employee.FirstName = Console.ReadLine();

            Console.Write("Please enter updated last name of employee:");
            employee.LastName = Console.ReadLine();

            employee.Role = 0;

            JMS_Commands.CreateEmployee(employee);

            employee = null;
            GC.Collect();
        }