예제 #1
0
        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());
        }
예제 #2
0
        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());
            }
        }