예제 #1
0
        public void EmployeeControl()
        {
start:
            try
            {
                EmployeeDataInsertion employeeDatacollection = new EmployeeDataInsertion();
                Console.WriteLine("*********************Welcome to employee page*************************");
                Console.WriteLine("Enter your choice\n1.View Details\n2.Main");
                int option = int.Parse(Console.ReadLine());
                do
                {
                    switch (option)
                    {
                    case 1:
                        employeeDatacollection.DisplayEmployee();
                        break;

                    case 2:
                        Management();
                        break;
                    }
                    Console.WriteLine("*********************Welcome to employee page*************************");
                    Console.WriteLine("Enter your choice\n1.View Details\n2.Main");
                    option = int.Parse(Console.ReadLine());
                } while (option != 6);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                FileLogger.Writing(e.Message);
                goto start;
            }
        }
예제 #2
0
        public void ToControl()
        {
start:
            try
            {
                EmployeeDataInsertion employeeCollection = new EmployeeDataInsertion();
                Console.WriteLine("*********************Welcome to Admin Page*************************");
                Console.WriteLine("Enter your choice\n1.EmployeeData\n2.DisplayData\n3.Main");
                int select = int.Parse(Console.ReadLine());
                do
                {
                    switch (select)
                    {
                    case 1:
                        employeeCollection.AddEmployees();
                        break;

                    case 2:
                        employeeCollection.DisplayEmployee();
                        break;

                    case 3:
                        Management();
                        break;
                    }
                    Console.WriteLine("*********************Thank you*************************");
                    Console.WriteLine("");
                    Console.WriteLine("Enter your choice\n1.EmployeeData\n2.DisplayData\n3.Main");
                    select = int.Parse(Console.ReadLine());
                } while (select != 6);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                FileLogger.Writing(e.Message);
                goto start;
            }
        }