/// <summary>
 /// 点击新增按钮
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public virtual ActionResult TreeMaster_AddNextLevelClick(tblTreeInfo model)
 {
     if (model.ID != 0)
     {
         var         loginUser                     = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
         CryptManage crypt                         = new CryptManage();
         string      sAuthorIDs                    = crypt.Decrypto(loginUser.Values["UserRoles"]);
         string      sUserDepartmentID             = crypt.Decrypto(loginUser.Values["DepartmentID"]);
         AuthorizationInfoDataListManage manAuthor = new AuthorizationInfoDataListManage();
         List <tblAuthorizationInfo>     authors   = manAuthor.GetRecordsByID <tblAuthorizationInfo>(sAuthorIDs);
         if (!authors.Select(x => x.Name).ToArray().Contains(UserRoleName.SUPER)) //如果不是超级管理员,不能新增顶层节点
         {
             if (model.ID == -1)
             {
                 X.Msg.Alert("注意", "当前权限不能在顶层节点下新增!").Show();
                 return(this.Direct());
             }
         }
         return(TreeMaster_PrepareAddNextLevel(sMainFormName, model.ID, true));
     }
     else
     {
         X.Msg.Alert("注意", "请先选择上级节点!").Show();
     }
     return(this.Direct());
 }
        /// <summary>
        /// 根据MenuType决定当前的Menu样式
        /// </summary>
        /// <param name="containerId"></param>
        /// <returns></returns>
        public Ext.Net.MVC.PartialViewResult AutoLoadMenu(string containerId)
        {
            Ext.Net.MVC.PartialViewResult pv = new Ext.Net.MVC.PartialViewResult();
            pv.ContainerId     = containerId;
            pv.WrapByScriptTag = false;
            pv.RenderMode      = RenderMode.AddTo;

            switch (AppSettingValues.MENUTYPE)
            {
            case "Default":
                pv.ViewName = "_AccordionMenu";
                return(pv);

            case "Tree":
                var         loginUser  = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
                CryptManage crypt      = new CryptManage();
                string      sUserRoles = crypt.Decrypto(loginUser.Values["UserRoles"]);
                pv.ViewName = "_TreeMenu";
                pv.ViewData["DataTree_PanelID"]    = "MainMenu_DataTree";
                pv.ViewData["DataTree_RelationID"] = sUserRoles;
                pv.ViewData["DataTree_AuthorID"]   = sUserRoles;
                return(pv);

            //case "Image":
            //    pv.ViewName = "_ImageMenu";
            //    return pv;
            default:
                return(null);
            }
        }
Exemplo n.º 3
0
        public override void SetInitDataAuthor()
        {
            var         loginUser = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
            CryptManage crypt     = new CryptManage();
            string      sGxID     = crypt.Decrypto(loginUser.Values["UserGxID"]);

            SetHiddenValue(sDataListName + "_InitNames", "GxID|VerifyStatus");
            SetHiddenValue(sDataListName + "_InitValues", sGxID + CosValue.SPLITOPERATOR1.ToString() + "一次审核,二次审核");
            SetHiddenValue(sDataListName + "_InitSigns", SIGN.Equal.ToString() + CosValue.SPLITOPERATOR1.ToString() + SIGN.In.ToString());
        }
        public virtual void SetInitDataAuthor()
        {
            var         loginUser = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
            CryptManage crypt     = new CryptManage();
            string      sGxID     = crypt.Decrypto(loginUser.Values["UserGxID"]);

            SetHiddenValue(sDataListName + "_InitNames", "GxID");
            SetHiddenValue(sDataListName + "_InitValues", sGxID);
            SetHiddenValue(sDataListName + "_InitSigns", SIGN.Equal.ToString());
        }
Exemplo n.º 5
0
        public override ActionResult WindowCommonShow(string PanelID, string ParentVariable, string ParentKey)
        {
            GetParentVariable(ParentVariable);
            tblReportInfo model     = new tblReportInfo();
            var           form      = this.GetCmp <FormPanel>(PanelID + "_Form");
            var           loginUser = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
            CryptManage   crypt     = new CryptManage();
            string        sGxID     = crypt.Decrypto(loginUser.Values["UserGxID"]);

            model.GxID = Convert.ToInt64(sGxID);
            form.SetValues(model);
            return(this.Direct());
        }
Exemplo n.º 6
0
        public override void InitPage()
        {
            ViewData["DataList_PanelID"] = sDataListName;
            setParentVariable(null, null, null, null, null);
            ViewData["DataList_ParentVariable"] = ParentVar.DefaultVal;

            var         loginUser = System.Web.HttpContext.Current.Request.Cookies.Get("LoginUser");
            CryptManage crypt     = new CryptManage();
            string      sGxID     = crypt.Decrypto(loginUser.Values["UserGxID"]);

            SetHiddenValue(sDataListName + "_InitNames", "GxID");
            SetHiddenValue(sDataListName + "_InitValues", sGxID);
            SetHiddenValue(sDataListName + "_InitSigns", SIGN.Equal.ToString());
        }