Beispiel #1
0
        public virtual IHttpActionResult Disable(SysDictionaryTypeDisableRequest request)
        {
            var entity = new SysDictionaryType
            {
                Id = request.Id,
            };
            var result = _sysDictionaryTypeService.Disable(request.Id);

            if (result > 0)
            {
                return(Succeed("禁用成功"));
            }
            else
            {
                return(Fail("禁用失败"));
            }
        }
Beispiel #2
0
        public virtual IHttpActionResult Add(SysDictionaryTypeAddRequest request)
        {
            var entity = new SysDictionaryType
            {
            };
            var result = _sysDictionaryTypeService.Add(entity);

            if (result > 0)
            {
                return(Succeed(new SysDictionaryTypeAddResponse
                {
                    Id = entity.Id
                }, "新增成功"));
            }
            else
            {
                return(Fail("新增失败"));
            }
        }