Ejemplo n.º 1
0
        /// <summary>
        /// 根据 ID获取单个菜单配置
        /// </summary>
        /// <param name="keyValue"></param>
        /// <returns></returns>
        public ActionResult GetMenuSettingFormJson(string keyValue)
        {
            AppMenuSettingBLL    settingBLL = new AppMenuSettingBLL();
            AppMenuSettingEntity entity     = settingBLL.GetEntity(keyValue);

            return(Json(entity, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 删除栏目(因为栏目Id是唯一的,所以不用根据platform平台类型去区分删除)
        /// </summary>
        /// <param name="keyValue">栏目ID</param>
        /// <returns></returns>
        public ActionResult RemoveMenuSetting(string keyValue)
        {
            AppMenuSettingBLL    settingBLL = new AppMenuSettingBLL();
            AppMenuSettingEntity appMenu    = settingBLL.GetEntity(keyValue);

            settingBLL.Remove(keyValue);
            AppSettingAssociationBLL associationBLL = new AppSettingAssociationBLL();

            associationBLL.RemoveByColumnId(keyValue);//删除栏目与菜单的关联关系

            //判断该菜单是不是安卓终端的,是的话就更新版本
            if (appMenu.PlatformType == 1)
            {
                MenuAuthorizeEntity menuAuthorize = authorizeBLL.GetEntityByDeptId(appMenu.DeptId);
                if (menuAuthorize != null)
                {
                    authorizeBLL.SaveForm(menuAuthorize.Id, menuAuthorize);//此处单纯的改变一下版本号
                }
            }

            return(Success("操作成功。"));
        }