public NewMinTimeBetweenClasses_Form(ref EmpInterface emp) { InitializeComponent(); textBox1.Text = hScrollBar1.Value.ToString(); textBox1.Enabled = false; this.employee = emp; }
//private ChooseHoursToWork_Form hoursToWork; public TeachingAssist_Form(ref TeachingAssistant t, LoginForm loginForm) { teachingAssist = t; emp = this.teachingAssist; this.loginForm = loginForm; InitializeComponent(); }
protected override void DaysToTeach_button_Click(object sender, EventArgs e) { EmpInterface emp = this.lecturer; ChooseDaysToTeach_Form form = new ChooseDaysToTeach_Form(ref emp); this.Hide(); form.FormClosed += new FormClosedEventHandler(FormClosedHandling); form.ShowDialog(); }
protected override void ChangeOfficeHours_button_Click(object sender, EventArgs e) { EmpInterface emp = this.lecturer; OfficeHours_Form form = new OfficeHours_Form(ref emp); this.Hide(); form.FormClosed += new FormClosedEventHandler(FormClosedHandling); form.ShowDialog(); }
protected override void TimeBetweenClassses_button_Click(object sender, EventArgs e) { EmpInterface emp = this.lecturer; NewMinTimeBetweenClasses_Form form = new NewMinTimeBetweenClasses_Form(ref emp); this.Hide(); form.FormClosed += new FormClosedEventHandler(FormClosedHandling); form.ShowDialog(); }
protected override void CourseToTeach_button_Click(object sender, EventArgs e) { EmpInterface emp = this.lecturer; ChooseCoursesToTeach form; if (lecturer != null) { form = new ChooseCoursesToTeach(lecturer.CoursesToTeach, ref emp); } else { form = new ChooseCoursesToTeach(null, ref emp); } this.Hide(); form.FormClosed += new FormClosedEventHandler(FormClosedHandling); form.ShowDialog(); }
public void UpdateOnClosing(EmpInterface employee) { if (employee == null) { return; } // Add update of first name, last name, id, username and password // add insert courses to teach Insert_DaysToTeach(employee.Get_DaysToTeach(), employee.Get_ID(), "LecturerTable"); Insert_HoursToTeach(employee.Get_HourToTeach(), employee.Get_ID(), "LecturerTable"); Insert_MinTimeBetweenClasses(employee.Get_MinTimeBetweenClasses(), employee.Get_ID(), "LecturerTable"); Insert_NumOfDaysToTeach(employee.Get_NumOfDaysToTeach(), employee.Get_ID(), "LecturerTable"); Insert_SemestersToTeach(employee.Get_SemestersToTeach(), employee.Get_ID(), "LecturerTable"); Insert_OfficeHours(employee.Get_OfficeHoursFrom(), employee.Get_OfficeHoursTo(), employee.Get_ID(), "LecturerTable"); Insert_CoursesToTeach(employee.Get_CoursesToTeach(), employee.Get_ID(), "LecturerTable"); }
public ChooseCoursesToTeach(Course[] courses, ref EmpInterface emp) { InitializeComponent(); this.employee = emp; this.selfCourses = courses; CourseSQL.LoadCoursesToListView(ref this.allCourses_listView); this.myCourses_listView.FullRowSelect = true; /* * The following loop runs on all the available courses and removes the courses already * chosen by the Teaching-Assistant or Lecturer and adds the items to the other * listview containing the chosen courses (selfCourses). * It's done by comparing the course ID, which is a unique parameter for each course. */ if (selfCourses != null) { try { foreach (ListViewItem item in allCourses_listView.Items) { for (int i = 0; i < selfCourses.Length; i++) { if (Convert.ToInt16(item.SubItems[0].Text) == selfCourses[i].CourseID) { ListViewItem temp = item; allCourses_listView.Items.Remove(item); myCourses_listView.Items.Add(item); break; } } } } catch (Exception e) { MessageBox.Show(e.Message); } } }
public OfficeHours_Form(ref EmpInterface emp) { InitializeComponent(); this.employee = emp; }
public SemestersToTeach_Form(ref EmpInterface emp, Boolean isLecturer) { InitializeComponent(); this.employee = emp; this.isLecturer = isLecturer; }
public ChangeOfficeHours(ref EmpInterface emp) : base(ref emp) { InitializeComponent(); }
public NumOfDays_Form(ref EmpInterface emp) { InitializeComponent(); this.employee = emp; }
public ChooseDaysToTeach_Form(ref EmpInterface emp)//ref TeachingAssistant teachingAssistant { this.employee = emp; InitializeComponent(); }
public ChooseHoursToTeach(ref EmpInterface emp) { InitializeComponent(); this.employee = emp; }
public NumOfDays_Form(ref EmpInterface emp) : base(ref emp) { InitializeComponent(); }
public ChooseOfficeHours(ref EmpInterface emp) : base(ref emp) { this.lecturer = emp; InitializeComponent(); }