Esempio n. 1
0
        /// <summary>
        /// 页面公用ViewBag
        /// </summary>
        /// <param name="PageCode">页面编码(菜单编码)</param>
        /// <param name="RightCode">权限编码 用于页面级权限验证</param>
        /// <param name="PageTitle">页面标题 标题为空自动获取页面标题及上级页面标题</param>
        public void pubViewBag(string PageCode, string RightCode, string PageTitle)
        {
            CookieModel cookieInfo = SystemCls.getCookieInfo();

            ViewBag.getPageMenuStr = getPageMenuStr(PageCode);
            ViewBag.PageCode       = PageCode;
            string curORGNo = SystemCls.getCurUserOrgNo();

            if (PublicCls.OrgIsShi(curORGNo))
            {
                curORGNo = ConfigCls.getConfigValue("ProvincialCapital");//州府所在地行政区划编码
            }
            //获取火险等级
            ViewBag.fireLevel = YJ_DANGERCLASSCls.getLevelByOrgNo(new YJ_DANGERCLASS_SW {
                BYORGNO = curORGNo
            });

            //获取滚动信息
            if (T_SYS_PARAMETERCls.getValueByFlag(new T_SYS_PARAMETER_SW {
                PARAMFLAG = "LoginInfo"
            }).ToString() == "0")
            {
                ViewBag.marqueeSysInfo = T_SYS_PARAMETERCls.getValueByFlag(new T_SYS_PARAMETER_SW {
                    PARAMFLAG = "marqueeIndexInfo"
                }).ToString();
            }
            else
            {
                ViewBag.marqueeSysInfo = YJ_WEATHERCls.getWeather(new YJ_WEATHER_SW {
                    BYORGNO = curORGNo
                });
            }

            ViewBag.PageLeftMenu = getPageLeftMenu(PageCode);                          //左侧菜单
            ViewBag.isPageRight  = SystemCls.isRight(RightCode);                       //判断页面是否有权限
            ViewBag.SystemName   = ConfigCls.getSystemName();                          //系统名称
            ViewBag.noticeRefreshTimeInterval = ConfigCls.noticeRefreshTimeInterval(); //菜单自动刷新间隔
            ViewBag.PageTitle = PageTitle;
            //如果页面标题为空,则自动通过页面编码从系统菜单表中获取菜单名称及上级菜单名称
            if (string.IsNullOrEmpty(PageTitle))
            {
                ViewBag.PageTitle = T_SYS_MENUCls.getModel(new T_SYS_MENU_SW {
                    MENUCODE = PageCode, SYSFLAG = ConfigCls.getSystemFlag()
                }).MENUNAME;
            }
            ViewBag.Title        = ConfigCls.getSystemName() + "-" + ViewBag.PageTitle;        //Title名称
            ViewBag.SystemLogo   = ConfigCls.getSystemLogo();                                  //获取系统logo图片
            ViewBag.trueName     = cookieInfo.trueName;                                        //当前登录用户姓名
            ViewBag.TopFireAlarm = ConfigCls.getTopFireAlarm();                                //是否火情报警
            ViewBag.TopFireLevel = ConfigCls.getTopFireLevel();                                //是否显示火险等级
            ViewBag.depName      = StateSwitch.GetOrgNameByOrgNO(SystemCls.getCurUserOrgNo()); //部门名称
            string systemFlag = ConfigCls.getSystemFlag();                                     //系统标识 如Springer

            ViewBag.T_UrlReferrer = Request.UrlReferrer;
        }