protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Student_Course student_Course = new Student_Course(); Student_CourseBLL bll = new Student_CourseBLL(); student_Course.CourseNO = Int32.Parse(GridView1.Rows[e.RowIndex].Cells[2].Text); student_Course.StudentNO = Int32.Parse(GridView1.Rows[e.RowIndex].Cells[0].Text); bll.DeleteStudent_Course(student_Course); }
protected void ButtonAdd_Click(object sender, EventArgs e) { Student_Course student_Course = new Student_Course(); student_Course.CourseNO = Int32.Parse(DropDownListCourse.SelectedValue); student_Course.StudentNO = Int32.Parse(DropDownListStudent.SelectedValue); Student_CourseBLL bll = new Student_CourseBLL(); bll.AddStudent_Course(student_Course); }