private static bool EducationSupervisorMainMenu(User educationSupervisor) { bool logout = false; do { Console.Clear(); Console.WriteLine("Tiger Board!"); Console.WriteLine("Utbildningledare-meny"); Console.WriteLine(); Console.WriteLine("0. Logga ut"); Console.WriteLine("1. Skapa konton"); Console.WriteLine("2. Visa lärare"); Console.WriteLine("3. Hantera klasser"); Console.WriteLine("4. Hantera studenter"); Console.WriteLine("5. Hantera kurser"); Console.WriteLine("6. Byt lösenord"); Console.WriteLine(); string menuChoice = UserInput.GetInput <string>("Ditt val: "); switch (menuChoice) { case "0": logout = LogoutConfirmation(); break; case "1": UserStore userStore = new UserStore(); UserCreator creator = new UserCreator(); creator.Create(userStore, UserLevel.EducationSupervisor); break; case "2": UserManagerPresenter.ListTeachers(); break; case "3": EducationSupervisorPresenter.ManageClassMenu(educationSupervisor); break; case "4": UserManagerPresenter.ManageStudents(educationSupervisor); break; case "5": CoursePresenter.CourseManagementMenu(educationSupervisor); break; case "6": AccountPresenter.ChangePassword(educationSupervisor); break; } } while (!logout); return(false); }
static void Main(string[] args) { while (true) { Console.ResetColor(); UserStore userStore = new UserStore(); ProgramSetup(userStore); User user = UserManagerPresenter.LoginUser(userStore); Menu.MainMenu(user); } }
private static bool AdminMainMenu() { bool logout = false; do { Console.Clear(); Console.WriteLine("Tiger Board!"); Console.WriteLine("Admin-meny"); Console.WriteLine(); Console.WriteLine("0. Logga ut"); Console.WriteLine("1. Skapa användare"); Console.WriteLine("2. Redigera användarinfo"); Console.WriteLine("3. Byt lösenord för användare"); Console.WriteLine(); Console.Write("Ditt val: "); string menuChoice = UserInput.GetInput <string>(); switch (menuChoice) { case "0": logout = LogoutConfirmation(); break; case "1": UserStore userStore = new UserStore(); UserCreator creator = new UserCreator(); creator.Create(userStore); break; case "2": UserManagerPresenter.ChangeUser(UserLevel.Admin); break; case "3": AdminPresenter.ChangeUserPassword(); break; case "4": var ds = new EducationClassStore(); EducationClassCreator edCreator = new EducationClassCreator(); edCreator.Create(ds); break; case "5": ClassListPresenter.MainMenu(); break; } } while (!logout); return(false); }
public UserManagerView() { InitializeComponent(); presenter = new UserManagerPresenter(this, new UserManagerRepo()); }