public Form3(List<UserStudent> S, UserStudent s, UserFaculty F, List<Course> C, int i) { Me = F; Stud = S; Crs = C; little = s; if (i == 0) FormState = FacFormState.studentsched; if (i == 1) FormState = FacFormState.studentcurrent; InitializeComponent(); RareButton.Hide(); //dataGridView1.Hide(); if (FormState == FacFormState.studentsched) { foreach (Course C0 in Crs) if (little.MyCourses.Contains(C0.CourseName)) stdCourses.Add(C0); Sbutton.Text = "Show Conflicts."; AButton.Text = "Back"; dataGridView1.DataSource = stdCourses; if (!little.hasConflicts) Sbutton.Hide(); } if (FormState == FacFormState.studentcurrent) { Sbutton.Hide(); List<PastCourse> relevant = new List<PastCourse>(); foreach (PastCourse P in little.MyPastCourses) { if (P.Term == "F12") { relevant.Add(P); } } dataGridView1.DataSource = relevant; } //dataGridView1.Refresh(); //dataGridView1.Show(); }
public Form3(List<UserStudent> S, UserFaculty F, List<Course> C ,int number) { InitializeComponent(); Me = F; Stud = S; Crs = C; switch (number) { case 1: FormState = FacFormState.mycourses; Text = Me.UserName + " is viewing his/her courses taught."; AButton.Text = "View future Students"; Sbutton.Text = "View the full Course Schedule"; RareButton.Hide(); MeSchedule(); break; case 2: FormState = FacFormState.myadvisees; Text = Me.UserName + " is viewing his/her Advising screen."; AButton.Text = "Back"; RareButton.Text = "Verify Grades"; Sbutton.Text = "Verify Schedule"; ADList(); break; case 4: FormState = FacFormState.myfutstudents; Text = Me.UserName + " is viewing his/her Future students."; AButton.Text = "Back"; Sbutton.Hide(); RareButton.Hide(); FutStdList(); break; default: FormState = FacFormState.allcourses; Text = Me.UserName + " is viewing the Course List."; RareButton.Hide(); AllSchedule(); break; } }