public void LeaveMenu()
        {
            Console.WriteLine("Enter Employee Id :");
            var EmpidInput  = Console.ReadLine();
            int Employee_id = 0;

            try
            {
                Employee_id = int.Parse(EmpidInput);
            }
            catch (FormatException)
            {
                Console.WriteLine("{0} is not an ValidId Please enter Inter Proper Emplotee Id", EmpidInput);
            }

            var    empployeeInfo = new Idinformation();
            string csv_file_name = "employees.csv";
            string EmployeeExist = empployeeInfo.CheckId(Employee_id, csv_file_name);

            string[] EmpData = EmployeeExist.Split(",");

            if (EmployeeExist == "")
            {
                Console.WriteLine("Employee Id Not Found ");
            }
            else
            {
                EmployeeMenu(EmpData);
            }
        }
Ejemplo n.º 2
0
        public void ManagerMenu()
        {
            Console.WriteLine("Enter Manager Id :");
            var    MngidInput    = Console.ReadLine();
            int    Manager_id    = parseInt(MngidInput);
            var    IdInfo        = new Idinformation();
            string csv_file_name = "manager.csv";
            string ManagerExist  = IdInfo.CheckId(Manager_id, csv_file_name);

            string[] ManagerData = ManagerExist.Split(",");

            if (ManagerExist == "")
            {
                Console.WriteLine("Manager Id Not Found ");
            }
            else
            {
                MainMenu(ManagerData);
            }
        }