public HttpResponseMessage InsertPersonalCertifications(PersonalCertifications personalCertifications) { personalCertifications.Id = Guid.NewGuid(); var result = _personalCertificationsService.InsertPersonalCertifications(personalCertifications); return(result ? toJson(null, OperatingState.Success, "添加成功") : toJson(null, OperatingState.Failure, "添加失败")); }
public bool InsertPersonalCertifications(PersonalCertifications personalCertifications) { if (personalCertifications == null) { throw new ArgumentNullException("personalCertifications is null"); } bool result = _personalCertificationsRepository.Insert(personalCertifications); return(result); }
public HttpResponseMessage UpdatePersonalCertifications(PersonalCertifications personalCertifications) { var result = _personalCertificationsService.UpdatePersonalCertifications(personalCertifications); return(result ? toJson(null, OperatingState.Success, "修改成功") : toJson(null, OperatingState.Failure, "修改失败")); }