Ejemplo n.º 1
0
        private void CourseUpdatebutton2_Click(object sender, EventArgs e)
        {
            Course aCourse = new Course();

            aCourse.CourseID     = COURSE_CourseIDtextBox1.Text;
            aCourse.CourseTitles = COURSE_CourseTitletextBox2.Text;
            aCourse.Section      = COURSE_SectiontextBox3.Text;
            aCourse.Semister     = COURSE_SemistercomboBox1.Text;
            int       id         = int.Parse(Ruff_label7.Text);
            CourseBLL aCourseBLL = new CourseBLL();
            bool      res        = aCourseBLL.UpdateCourseBLL(aCourse, id);

            if (res)
            {
                MessageBox.Show("Course Updates Successfully!!!");
                clearCourseTextBoxes();
                LoadCoursesDataGridView();
            }
            else
            {
                MessageBox.Show("Error!");
            }
        }