Esempio n. 1
0
        public void SalaryChargeMenu(Func <EmployeeContext, float> func, Action backMenu)

        {
            int?choice = MenuUtils.GetIntChoice(MenuUtils.SalaryChargeMenu(), 1, 2);



            switch (choice)

            {
            case 1:

                using (var db = new EmployeeContext())

                {
                    try

                    {
                        Console.WriteLine(func.Invoke(db) + "€");
                    }

                    catch (Exception e)

                    {
                        Console.WriteLine(e);
                    }
                }

                break;

            case 2:

                backMenu.Invoke();

                break;

            default:

                break;
            }
        }