示例#1
0
        public JsonModel EditEntityRel(Sys_SysOfEntity_Rel entity)
        {
            JsonModel jsonModel = new JsonModel();

            try
            {
                int result = entity_dal.EditEntityRel(entity);
                jsonModel = new JsonModel()
                {
                    errNum  = result,
                    errMsg  = "success",
                    retData = "操作成功"
                };
                return(jsonModel);
            }
            catch (Exception ex)
            {
                jsonModel = new JsonModel()
                {
                    errNum  = 400,
                    errMsg  = ex.Message,
                    retData = ""
                };
                return(jsonModel);
            }
        }
示例#2
0
        public JsonModel SetEntityPermission(Sys_SysOfEntity_Rel entity)
        {
            //定义JSON标准格式实体中
            JsonModel jsonModel = new JsonModel();

            try
            {
                int result = entity_dal.SetEntityPermission(entity);
                jsonModel = new JsonModel()
                {
                    errNum  = result,
                    errMsg  = "success",
                    retData = "操作成功"
                };
                return(jsonModel);
            }
            catch (Exception ex)
            {
                jsonModel = new JsonModel()
                {
                    errNum  = 400,
                    errMsg  = ex.Message,
                    retData = ""
                };
                return(jsonModel);
            }
        }
示例#3
0
 private void SetEntityPermission(HttpContext context)
 {
     try
     {
         Sys_SysOfEntity_Rel rel = new Sys_SysOfEntity_Rel();
         rel.AccountNo  = context.Request["AccountNo"];
         rel.EntityName = context.Request["EntityNameStr"];
         jsonModel      = bll.SetEntityPermission(rel);
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
     }
 }