示例#1
0
        public ApiResult UpdateEneity([FromBody] DTO.HospitalDto requst)
        {
            bll = new BLL.HospitalService(CurrentOperatorUserID, CurrentOperatorOrgID);
            var model = requst.Map <DTO.HospitalDto, Entity.Hospital>();

            return(bll.Update(model).ToApiResultForBoolean());
        }
示例#2
0
        public ApiResult InsertEntity([FromBody] DTO.HospitalDto requst)
        {
            bll = new BLL.HospitalService(CurrentOperatorUserID, CurrentOperatorOrgID);
            var model = requst.Map <DTO.HospitalDto, Entity.Hospital>();

            if (bll.Insert(model))
            {
                return(model.HospitalID.ToApiResultForObject());
            }
            else
            {
                return(EnumApiStatus.BizError.ToApiResultForApiStatus());
            }
        }