コード例 #1
0
        static void MenuOptions_GetEmployee()
        {
            Console.Write("Please enter ID of Employee:");
            string      idEm  = Console.ReadLine();
            EmployeeDTO dtoEm = JMS_Commands.GetEmployee(idEm);

            if (dtoEm != null)
            {
                PrintEmployee(dtoEm);
            }
            else
            {
                Console.WriteLine("No Results.");
            }
        }
コード例 #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();
        }