public String Save(int did, int tid, int cid) { if (!courseAssignGateway.OverlapCourse(tid, cid)) { if (!courseAssignGateway.AssignCourse(cid)) { if (courseAssignGateway.Save(did, tid, cid) > 0) { return("Save Successfully"); } else { return("Sory! Save Fail"); } } return("Course Alrady Assing"); } return("Overlape Course"); }
public String Save(int did, int tid, int cid, decimal remainingCredit) { if (!courseAssignGateway.OverlapCourse(tid, cid)) { if (!courseAssignGateway.AssignCourse(cid)) { if (courseAssignGateway.Save(did, tid, cid, remainingCredit) > 0) { return("Save Successfully"); } else { return("Sorry! Save Failed"); } } return("Course Already Assing"); } return("Overlape Course"); }