public ApiResult UpdateEntity([FromBody] DTO.HospitalDepartmentDTO requst) { bll = new BLL.HospitalDepartmentService(CurrentOperatorUserID); var model = requst.Map <DTO.HospitalDepartmentDTO, Entity.HospitalDepartment>(); return(bll.Update(model).ToApiResultForBoolean()); }
public ApiResult InsertEntity([FromBody] DTO.HospitalDepartmentDTO requst) { var model = requst.Map <DTO.HospitalDepartmentDTO, Entity.HospitalDepartment>(); bll = new BLL.HospitalDepartmentService(CurrentOperatorUserID); if (bll.Insert(model)) { return(model.ToApiResultForObject()); } else { return(EnumApiStatus.BizError.ToApiResultForApiStatus()); } }