Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         var config = new Utility.SiteConfig();
         SocketURL            = config.SocketURL;
         RealName             = WebUtil.GetUser(this.Context).RealName;
         HasWechatServiceAuth = base.CheckAuthByModuleCode("1191501") ? 1 : 0;
         var company = WebUtil.GetCompany(this.Context);
         if (company != null)
         {
             if (company.IsAdmin)
             {
                 ServerEndTime = "永久";
             }
             else
             {
                 ServerEndTime = company.ServerEndTime > DateTime.MinValue ? company.ServerEndTime.ToString("yyyy年MM月dd日") : "已过期";
             }
         }
         LogoPath = "html/images/NewLogo.png";
         string LogoFullPath = HttpContext.Current.Server.MapPath("~/" + LogoPath);
         if (!System.IO.File.Exists(LogoFullPath))
         {
             LogoPath = "/" + LogoPath;
         }
     }
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RealName = WebUtil.GetUser(this.Context).RealName;
                var config = new Utility.SiteConfig();
                SocketURL = config.SocketURL;
                var company = WebUtil.GetCompany(this.Context);
                if (company != null)
                {
                    if (company.IsAdmin)
                    {
                        ServerEndTime = "永久";
                    }
                    else
                    {
                        ServerEndTime = company.ServerEndTime > DateTime.MinValue ? company.ServerEndTime.ToString("yyyy年MM月dd日") : "已过期";
                    }
                }
                var      list       = Foresight.DataAccess.SysMenu.GetSysMenuPageCodeList();
                string   GroupName  = Utility.EnumModel.SysMenuGroupNameDefine.appgl.ToString();
                string[] appgl_list = list.Where(p => p.GroupName.Equals(GroupName)).Select(p => p.ModuleCode).ToArray();

                GroupName = Utility.EnumModel.SysMenuGroupNameDefine.jygl.ToString();
                string[] jygl_list = list.Where(p => p.GroupName.Equals(GroupName)).Select(p => p.ModuleCode).ToArray();

                GroupName = Utility.EnumModel.SysMenuGroupNameDefine.jspt.ToString();
                string[] jspt_list = list.Where(p => p.GroupName.Equals(GroupName)).Select(p => p.ModuleCode).ToArray();

                GroupName = Utility.EnumModel.SysMenuGroupNameDefine.sjzx.ToString();
                string[] sjzx_list = list.Where(p => p.GroupName.Equals(GroupName)).Select(p => p.ModuleCode).ToArray();

                GroupName = Utility.EnumModel.SysMenuGroupNameDefine.xtsz.ToString();
                string[] xtsz_list = list.Where(p => p.GroupName.Equals(GroupName)).Select(p => p.ModuleCode).ToArray();
                this.show_appgl = base.CheckAuthByModuleCodeList(appgl_list) ? 1 : 0;
                this.show_jygl  = base.CheckAuthByModuleCodeList(jygl_list) ? 1 : 0;
                this.show_jspt  = base.CheckAuthByModuleCodeList(jspt_list) ? 1 : 0;
                this.show_sjzx  = base.CheckAuthByModuleCodeList(sjzx_list) ? 1 : 0;
                this.show_xtsz  = base.CheckAuthByModuleCodeList(xtsz_list) ? 1 : 0;
            }
        }