예제 #1
0
        static public void SelectMode(int mode)
        {
            switch (mode)
            {
            case 1:
                CreateUser();
                if (sAttr == "1")
                {
                    Save(path);
                }
                Refresh(path);
                break;

            case 2:
                ViewUsers(usersandawardsLogic.GetAllUsers(), true);
                PrintMenu();
                SelectMode(InputMode());
                break;

            case 3:
                RemoveUser();
                if (sAttr == "1")
                {
                    Save(path);
                }
                Refresh(path);
                break;

            case 4:
                CreateAward();
                if (sAttr == "1")
                {
                    Save(path);
                }
                Refresh(path);
                break;

            case 5:
                ViewAwards(usersandawardsLogic.GetAllAwards(), true);
                PrintMenu();
                SelectMode(InputMode());
                break;

            case 6:
                AddAwardToUser();
                if (sAttr == "1")
                {
                    Save(path);
                }
                Refresh(path);
                break;

            case 0:
                return;
            }
        }
예제 #2
0
        public static ICollection <User> GetAllUsers()
        {
            ICollection <User> users = usersandawardsLogic.GetAllUsers();

            return(users);
        }