private void bCourseId_Click(object sender, EventArgs e) { try { Course course = Logic.GetCourseOnID(Int32.Parse(tCourseId.Text)); Edit edit = new Edit(Logic, course); edit.Show(); } catch { ErrorMessage("The entry: [" + tCourseId.Text + "] is invalid.\nPlease try again."); } }
private void bCourseName_Click(object sender, EventArgs e) { try { Course course = Logic.GetCourseOnName(tCourseName.Text); Edit edit = new Edit(Logic, course); edit.Show(); } catch { ErrorMessage("There are either no results or more than one result for entry: [" + tCourseName.Text + "]\nPlease try again."); } }
private void bStudentId_Click(object sender, EventArgs e) { try { Student student = Logic.GetStudentOnID(Int32.Parse(tStudentId.Text)); Edit edit = new Edit(Logic, student); edit.Show(); } catch { ErrorMessage("The entry: [" + tStudentId.Text + "] is invalid.\nPlease try again."); } }
private void bStudentName_Click(object sender, EventArgs e) { try { Student student = Logic.GetStudentOnName(tStudentName.Text); Edit edit = new Edit(Logic, student); edit.Show(); } catch { ErrorMessage("There are either no results or more than one result for entry: [" + tStudentName.Text + "]\nPlease try again."); } }
private void bAddCourse_Click(object sender, EventArgs e) { Edit edit = new Edit(Logic, "Course"); edit.Show(); }
private void bAddStudent_Click(object sender, EventArgs e) { Edit edit = new Edit(Logic, "Student"); edit.Show(); }