public FormCourse() { InitializeComponent(); grdCourse.AutoGenerateColumns = false; Presenter = new CoursePresenter(this); Name = string.Empty; }
private static bool TeacherMainMenu(User user) { bool logout = false; do { Console.Clear(); Console.WriteLine("Tiger Board!"); Console.WriteLine("Lärarmeny"); Console.WriteLine(); Console.WriteLine("0. Logga ut"); Console.WriteLine("1. Visa mina kurser"); Console.WriteLine("2. Visa studentlista för en kurs"); Console.WriteLine("3. Betygsätt student"); Console.WriteLine("4. Betygsätt delmål"); Console.WriteLine("5. Visa kursplan"); Console.WriteLine("6. Visa kursmål"); Console.WriteLine("7. Byt lösenord"); Console.WriteLine(); Console.Write("Ditt val: "); string menuChoice = UserInput.GetInput <string>(); switch (menuChoice) { case "0": logout = LogoutConfirmation(); break; case "1": CoursePresenter.ShowTeacherCourses(user); break; case "2": CoursePresenter.ShowStudentsForCourse(user); break; case "3": GradePresenter.GradeStudentInCourse(user); break; case "4": GradePresenter.GradeStudentGoal(user); break; case "5": CoursePresenter.ShowCoursePlan(user); break; case "6": CoursePresenter.ShowCourseGoals(); break; case "7": AccountPresenter.ChangePassword(user); break; } } while (!logout); return(false); }
private async Task ProcessMyCourses(User user) { var service = new UserService(); var results = await service.GetMyCoursesAsync(user); Courses = CoursePresenter.GetCoursePresenters(results); Courses.Add(new NewCoursePresenter()); }
public CourseInfoForm(string courseCode, string type) { InitializeComponent(); this.courseCode = courseCode; this.type = type; presenter = new CoursePresenter(this); courseInfoDT = MakeCourseScoreDT(courseCode); }
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); }
private static bool StudentMainMenu(User user) { bool logout = false; do { Console.Clear(); Console.WriteLine("Tiger Board!"); Console.WriteLine("Studentmeny"); Console.WriteLine(); Console.WriteLine("0. Logga ut"); Console.WriteLine("1. Visa mina studieresultat"); Console.WriteLine("2. Klasslista"); Console.WriteLine("3. Kurslista"); Console.WriteLine("4. Byt lösenord"); Console.WriteLine("5. Visa kursplan"); Console.WriteLine("6. Visa kursmål"); Console.WriteLine(); Console.Write("Ditt val: "); string menuChoice = UserInput.GetInput <string>(); switch (menuChoice) { case "0": logout = LogoutConfirmation(); break; case "1": GradePresenter.ShowStudentCourseGrades(user); break; case "2": ClassListPresenter.ShowClassForStudent(user); break; case "3": CoursePresenter.ShowStudentCourseList(user); break; case "4": AccountPresenter.ChangePassword(user); break; case "5": CoursePresenter.ShowCoursePlan(user); break; case "6": CoursePresenter.ShowStudentCourseGoals(user); break; } } while (!logout); return(false); }
private void ChooseCourse_Load(object sender, EventArgs e) { presenter = new CoursePresenter(this); courseDataGridView.Rows.Clear();//清除所有的行,重新加载 List <List <string> > courseCode = new List <List <string> >(); if (type.Equals("choose")) //选课方式打开界面 { courseDataGridView.MultiSelect = true; //可以同时选择多门课程 courseCode = presenter.GetCourseCode(userCode, "notChosen"); SaveBt.Text = "选课"; ViewBt.Enabled = false; EditBt.Enabled = false; CreatCourseBt.Enabled = false; DeleteCourseBt.Enabled = false; } if (type.Equals("drop")) //退课方式打开界面 { courseDataGridView.MultiSelect = true; //可以同时退掉多门课程 courseCode = presenter.GetCourseCode(userCode, "hasChosen"); SaveBt.Text = "退课"; ViewBt.Enabled = false; EditBt.Enabled = false; CreatCourseBt.Enabled = false; DeleteCourseBt.Enabled = false; } if (type.Equals("admin"))//管理员方式打开界面 { courseCode = presenter.GetCourseCode(userCode, "allCode"); SaveBt.Enabled = false; courseDataGridView.MultiSelect = false;//管理员只能单行查看、编辑或删除 } foreach (List <string> codeItem in courseCode) { presenter.ShowCourseInfo(codeItem[0]); } }
public CreateCourseForm() { InitializeComponent(); this.presenter = new CoursePresenter(); }