public void PrintEmployeeMenu()
        {
            int choice = 0;

            do
            {
                Console.WriteLine("----------------------------");
                Console.WriteLine("Menu");
                Console.WriteLine("1. Register");
                Console.WriteLine("2. Login");
                Console.WriteLine("3. Update");
                Console.WriteLine("4. Print all");
                Console.WriteLine("5. Sort employees");
                Console.WriteLine("6. Print employee by id");
                Console.WriteLine("7. Exit");
                Console.WriteLine("----------------------------");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    Login.RegisterEmployee();
                    break;

                case 2:
                    Login.UserLogin();
                    break;

                case 3:
                    employee.ResetPassword();
                    break;

                case 4:
                    employee.PrintAllEmployee();
                    break;

                case 5:
                    employee.SortEmployee();
                    break;

                case 6:
                    employee.PrintEmployeesSortedById();
                    break;

                case 7:
                    Console.WriteLine("Exiting............!!!!");
                    break;

                default:
                    Console.WriteLine("Invalied choice..........!!");
                    break;
                }
            } while (choice != 7);
        }
Example #2
0
        void PrintMenu()
        {
            int choice = 0;

            do
            {
                Console.WriteLine("1.REGISTER");
                Console.WriteLine("2.LOGIN");
                Console.WriteLine("3.PRINTALL");
                Console.WriteLine("4.SORT AND PRINT ALL");
                Console.WriteLine("5.RESET PASSWORD");
                Console.WriteLine("6.RESET LOCATION");
                Console.WriteLine("10.EXIT");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    login.RegisterEmployee();
                    break;

                case 2:
                    login.UserLogin();
                    break;

                case 3:
                    management.PrintAllEmployees();
                    break;

                case 4:
                    management.PrintEmployeesSortedById();
                    break;

                case 5:
                    management.ResetPassword();
                    break;

                case 6:
                    management.ResetLocation();
                    break;

                case 10:
                    Console.WriteLine("exiting...");
                    break;

                default:
                    Console.WriteLine("invalid choice ...try again");
                    break;
                }
            } while (choice != 10);
        }
Example #3
0
        void PrintMenu()
        {
            int choice = 0;

            do
            {
                Console.WriteLine("1. Register");
                Console.WriteLine("2. Login");
                Console.WriteLine("3. Print all");
                Console.WriteLine("4. Sort and print all");
                Console.WriteLine("5. Update Password");
                Console.WriteLine("10. Exit");
                choice = Convert.ToInt32(Console.ReadLine());
                switch (choice)
                {
                case 1:
                    login.RegisterEmployee();
                    break;

                case 2:
                    login.UserLogin();
                    break;

                case 3:
                    management.PrintAllEmployee();
                    break;

                case 4:
                    management.PrintEmployeesSortedById();
                    break;

                case 5:
                    management.ResetPassword();
                    break;

                case 10:
                    Console.WriteLine("Quiting...");
                    break;

                default:
                    Console.WriteLine("Invalid choice. Try again...");
                    break;
                }
            } while (choice != 10);
        }