Пример #1
0
        private static void AdminOptions()
        {
            ushort option;

            Console.WriteLine("\r\nHello Admin\r\nChoose a option:" +
                              "\r\n1. Show all usernames.\r\n2. Change user date." +
                              "\r\n3. Change user role." +
                              "\r\n4. Show users activity(no filter)." +
                              "\r\n5. Show users activity(with filter - contains ).");
            Console.Write("\r\nOption: ");
            option = UInt16.Parse(Console.ReadLine());

            Dictionary <string, int> allUsers = UserData.AllUsersUsernames();

            switch (option)
            {
            case 1: ShowAllUsernames(); break;

            case 2: ChangeUserDate(ref allUsers); break;

            case 3: ChangeUserRole(ref allUsers); break;

            case 4: UserData.ShowUserActivity(); break;

            case 5: GetUserActivitiesWithFilter(); break;

            default: Console.WriteLine("No such option in the menu"); break;
            }
        }