예제 #1
0
 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.");
     }
 }
예제 #2
0
 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.");
     }
 }
예제 #3
0
 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.");
     }
 }
예제 #4
0
 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.");
     }
 }
예제 #5
0
        private void bAddCourse_Click(object sender, EventArgs e)
        {
            Edit edit = new Edit(Logic, "Course");

            edit.Show();
        }
예제 #6
0
        private void bAddStudent_Click(object sender, EventArgs e)
        {
            Edit edit = new Edit(Logic, "Student");

            edit.Show();
        }