public StudentCourseListDAO mapToStudentCourseListDAO(StudentCourseListDTO scl, StudentCourseListDAO sc) { sc.courseID = scl.courseID; sc.StudentCourseID = scl.AppId; sc.studentID = scl.StudentID; sc.active = scl.Active; return(sc); }
public StudentCourseListDTO mapToStudentCourseListDTO(StudentCourseListDAO scl) { var sc = new StudentCourseListDTO(); sc.AppId = scl.StudentCourseID; sc.courseID = scl.courseID; sc.Name = scl.Course.courseName + "_" + scl.Student.firstName + "_" + scl.Student.lastName; sc.StudentID = scl.studentID; sc.Active = scl.active; return(sc); }
public StudentCourseListDAO mapToStudentCourseListDAO(StudentCourseListDTO scl) { var sc = new StudentCourseListDAO(); sc.courseID = scl.courseID; sc.StudentCourseID = scl.AppId; sc.studentID = scl.StudentID; sc.active = scl.Active; return(sc); }
protected void registerbutton_Click(object sender, EventArgs e) { StudentCourseListDTO scl = new StudentCourseListDTO(); StudentDTO student = data.getStudents().Where(s => s.AppId == int.Parse(grid.SelectedRow.Cells[0].Text)).FirstOrDefault(); CourseDTO course = data.getCourses().Where(c => c.AppId == int.Parse(coursegrid.SelectedRow.Cells[0].Text)).FirstOrDefault(); scl.Active = true; scl.courseID = course.AppId; scl.Name = course.Name + "_" + student.firstName + "_" + student.lastName; scl.StudentID = student.AppId; data.registerCourse(scl); Response.Redirect(Request.RawUrl); }
public bool deletestudentcourseenrollment(StudentCourseListDTO scl) { return(rsc.deleteStudentCourseList(new StudentCourseListMapper().mapToStudentCourseListDAO(scl))); }
public bool registerCourse(StudentCourseListDTO scl) { return(rsc.insertStudentCourseList(new StudentCourseListMapper().mapToStudentCourseListDAO(scl))); }