public BaseResultDto <string> DeleteDic(int Id)
        {
            BaseResultDto <string> result = new BaseResultDto <string>();

            try
            {
                if (helper.DeleteById <SystemDictionary>(Id))
                {
                    result.ErrorMsg  = "成功";
                    result.ErrorCode = 1;
                }
                else
                {
                    result.ErrorMsg  = "失败";
                    result.ErrorCode = 0;
                }
            }
            catch (Exception ex)
            {
                result.ErrorMsg  = ex.Message;
                result.ErrorCode = -1;
            }
            return(result);
        }
示例#2
0
        public BaseResultDto <string> Delete(int Id)
        {
            BaseResultDto <string> resultDto = new BaseResultDto <string>();

            if (helper.DeleteById <SystemClaims>(Id))
            {
                resultDto.ErrorCode = 1;
                resultDto.ErrorMsg  = "删除成功";
            }
            else
            {
                resultDto.ErrorCode = -1;
                resultDto.ErrorMsg  = "删除失败";
            }
            return(resultDto);
        }