Exemplo n.º 1
0
        /// <summary>
        /// 保存(新增修改)
        /// </summary>
        /// <param name="keyValue">主键 可为空</param>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public ActionResult SaveForm(string keyValue, RquestModel request)
        {
            //实体类有私有属性,作为参数会请求失败
            MenuConfigEntity model = new MenuConfigEntity()
            {
                Id              = request.Id,
                AssociationId   = request.AssociationId,
                AssociationName = request.AssociationName,
                AuthorizeId     = request.AuthorizeId,
                AuthorizeName   = request.AuthorizeName,
                BAK3            = request.BAK3,
                BAK2            = request.BAK2,
                BAK4            = request.BAK4,
                Sort            = request.Sort,
                CreateUserName  = request.CreateUserName,
                CreateDate      = request.CreateDate,
                DeptCode        = request.DeptCode,
                DeptId          = request.DeptId,
                DeptName        = request.DeptName,
                ModifyDate      = request.ModifyDate,
                CreateUserId    = request.CreateUserId,
                IsView          = request.IsView,
                ModuleCode      = request.ModuleCode,
                ModifyUserId    = request.ModifyUserId,
                ModifyUserName  = request.ModifyUserName,
                ModuleId        = request.ModuleId,
                ModuleName      = request.ModuleName,
                PaltformType    = request.PaltformType,
                ParentId        = request.ParentId,
                ParentName      = request.ParentName,
                Remark          = request.Remark,
                MenuIcon        = request.MenuIcon,
                JsonData        = request.JsonData
            };
            ModuleBLL modulebll = new ModuleBLL();

            if (!string.IsNullOrWhiteSpace(model.ModuleId))
            {
                var module = modulebll.GetEntity(model.ModuleId);
                if (module != null)
                {
                    model.ModuleCode = module.EnCode;
                }
            }
            menuConfigBll.SaveForm(keyValue, model);
            return(Success("操作成功。"));
        }
Exemplo n.º 2
0
        public ActionResult GetRelationEntityJson(string keyValue)
        {
            var          baseInfo   = fromModuleBLL.GetRelationEntity(keyValue);
            ModuleEntity moduleInfo = null;

            if (baseInfo.F_FrmKind == 0)
            {
                moduleInfo = moduleBLL.GetEntity(baseInfo.F_ObjectId);
            }
            var data = new
            {
                baseInfo   = baseInfo,
                moduleInfo = moduleInfo
            };

            return(Content(data.ToJson()));
        }
Exemplo n.º 3
0
        public ActionResult GetFormJson(string keyValue)
        {
            var data = moduleBLL.GetEntity(keyValue);

            return(Content(data.ToJson()));
        }