/// <summary> /// This function adds the course to the system. /// </summary> /// <param name="a_sender">It holds the sender.</param> /// <param name="a_event">It holds the event args.</param> private void AddCourse_Click(object a_sender, EventArgs a_event) { CourseModification createCourse = new CourseModification(m_emailID); createCourse.ShowDialog(); ExecuteGetRequest(); }
/// <summary> /// This function modifies the info once it is clicked. Only few of the details of the course can be modified. /// </summary> /// <param name="a_sender">It holds the sender.</param> /// <param name="a_event">It holds the event args.</param> private void ModifyCourse_Click(object a_sender, EventArgs a_event) { if (courseListView.SelectedItems.Count < 1) { MetroMessageBox.Show(this, "Please select an item below and then click this button.", "Select Course first", MessageBoxButtons.OK, MessageBoxIcon.Question); return; } /// Only one itemSelected can be selected at a time. ListViewItem itemSelected = courseListView.SelectedItems[0]; Course selectedCourse = (Course)itemSelected.Tag; CourseModification modifyCourseForm = new CourseModification(selectedCourse); modifyCourseForm.ShowDialog(); ExecuteGetRequest(); }
/// <summary> /// This function handles modification of the course when the tile is clicked. /// </summary> /// <param name="a_sender">It holds the sender.</param> /// <param name="a_event">It holds the event args.</param> private void CourseTile_Click(object a_sender, EventArgs a_event) { CourseModification addCourse = new CourseModification(m_emailID); addCourse.ShowDialog(); }