Example #1
0
    static void ShowActivities()
    {
        Console.WriteLine("Activities: ");
        var choices = new List <Tuple <string, Action> >()
        {
            new Tuple <string, Action>("Show all activities", ShowAllActivities),
            new Tuple <string, Action>("Find activity by code", FindActivityByCode),
            new Tuple <string, Action>("Return to main menu", () => { Main(null); }),
            new Tuple <string, Action>("Exit the program", Exit),
        };

        GetChoice(choices)();
    }
Example #2
0
    static void Main(string[] args)
    {
        Console.WriteLine("Main Menu: ");
        var choices = new List <Tuple <string, Action> >()
        {
            new Tuple <string, Action>("Show Activities", ShowActivities),
            new Tuple <string, Action>("Show Teachers", ShowTeachers),
            new Tuple <string, Action>("Show Students", ShowStudents),
            new Tuple <string, Action>("Exit", Exit),
        };

        GetChoice(choices)();
    }