//----------------------------------------------------------- public string Enroll(EnrollCourseModel student) { int rowEffect = enrollCourseGateway.Enroll(student); if (rowEffect > 0) { return("Save Success"); } else { return("Save Faild"); } }
public string Enroll(StudentMustafa student) { if (anEnrollCourseGateway.IsCourseExists(student)) { return("This Course has been enrolled already"); } else { int isRowAffected = anEnrollCourseGateway.Enroll(student); if (isRowAffected > 0) { return("Enrolled successfully"); } else { return("course enrolled failed"); } } }