public FormMenuStudent(int _id, string _password) { InitializeComponent(); this.WindowState = System.Windows.Forms.FormWindowState.Maximized; comboBox_courses.DropDownStyle = ComboBoxStyle.DropDownList; userStudnet = new Student(_id, _password); List <int> allowedCoursesIDs = SQLFunctions.findAllowedCoursesForStudent(userStudnet.getUserID(), userStudnet.getYear(), userStudnet.getSemester(), userStudnet.getDepartment()); for (int i = 0; i < allowedCoursesIDs.Count; i++) { allowedCoursesProperties.Add(new Courses(allowedCoursesIDs[i])); comboBox_courses.Items.Add(allowedCoursesProperties[i].getCourseName()); } label3.Text = "Hello: " + userStudnet.getUserName(); label_weeklyHoursShow.Text = Convert.ToString(userStudnet.getWeaklyHours()); refreshTimeTable(tableLayoutPanel3); }
public FormMenuStudent(int _id, string _password) { InitializeComponent(); comboBox_courses.DropDownStyle = ComboBoxStyle.DropDown; id = _id; userStudnet = new Student(_id); if (userStudnet.getNotification()) { pictureBox1.Visible = true; } List <int> allowedCoursesIDs = SQLFunctions.findAllowedCoursesForStudent(userStudnet.getUserID(), userStudnet.getYear(), userStudnet.getSemester(), userStudnet.getDepartment()); for (int i = 0; i < allowedCoursesIDs.Count; i++) { if ((new Courses(allowedCoursesIDs[i])).getCourseName() != null) { allowedCoursesProperties.Add(new Courses(allowedCoursesIDs[i])); } } for (int i = 0; i < allowedCoursesProperties.Count; i++) { comboBox_courses.Items.Add(allowedCoursesProperties[i].getCourseName()); } label3.Text = "Hello: " + userStudnet.getUserName(); label_weeklyHoursShow.Text = Convert.ToString(userStudnet.getWeaklyHours()); refreshTimeTable(tableLayoutPanel3); if (userStudnet.getNotification()) { pictureBox1.Visible = true; } }