public string Save(SaveTeacherModel teacher) { int rowEffect = saveTeacherGateway.Save(teacher); if (rowEffect > 0) { return("Save Success"); } else { return("Save Faild"); } }
public string Save(SaveTeacher aTeacher) { if (_saveTeacherGateway.Check(aTeacher)) { return("Your email already exists"); } if (aTeacher.Credit < 0) { return("Credit must be a positive number"); } string result = _saveTeacherGateway.Save(aTeacher); return(result); }