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