protected void Application_Error(object sender, EventArgs e) { Exception objErr = base.Server.GetLastError().GetBaseException(); string err = string.Concat(new string[] { "会员系统 Caught in Application_Error event\r\nError in:", base.Request.Url.ToString(), "\r\nError Message:", objErr.Message.ToString(), "\r\nStack Trace:", objErr.StackTrace.ToString() }); try { Chain.Model.SysError mdSysError = new Chain.Model.SysError(); Chain.BLL.SysError bllSysError = new Chain.BLL.SysError(); mdSysError.ErrorTime = DateTime.Now; mdSysError.ErrorContent = err; mdSysError.Ipaddress = PubFunction.ipAdress; LoginLogic login = LoginLogic.LoginStatus(); if (login.IsLoggedOn && login.LoginUser != null) { mdSysError.UserID = login.LoginUser.UserID; mdSysError.ShopID = login.LoginUser.UserShopID; } bllSysError.Add(mdSysError); } catch { } }
public static LoginLogic LoginStatus() { LoginLogic login = new LoginLogic(); login.CheckLoginStatus(); return(login); }
protected void Page_Load(object sender, EventArgs e) { Assembly assembly = Assembly.GetExecutingAssembly(); string title = ((AssemblyTitleAttribute)Attribute.GetCustomAttribute(assembly, typeof(AssemblyTitleAttribute))).Title; string company = ((AssemblyCompanyAttribute)Attribute.GetCustomAttribute(assembly, typeof(AssemblyCompanyAttribute))).Company; string desc = ((AssemblyDescriptionAttribute)Attribute.GetCustomAttribute(assembly, typeof(AssemblyDescriptionAttribute))).Description; LoginLogic login = new LoginLogic(); if (base.Request["type"] != null) { login.LoginOut(); } login.CreateTestCookie(); this.aSelf.HRef = "http://" + PubFunction.curParameter.SelfDoMain; this.spEdition.InnerText = string.Concat(new string[] { assembly.GetName().Name, " ", assembly.GetName().Version.ToString(), " ", title }); this.spDesc.InnerText = desc; this.txtIsType.Value = PubFunction.curParameter.istry.ToString(); this.txtISCheckKey.Value = (PubFunction.ISCheckKey ? "1" : "0"); if (PubFunction.ISCheckKey) { HttpBrowserCapabilities browser = base.Request.Browser; string browserType = browser.Browser.ToString(); if (browserType.ToUpper().Contains("IE") || browser.Type.Contains("Mozilla11") || browser.Type.Contains("InternetExplorer")) { PubFunction.IEbrowser = true; this.CreateKeyScript(); this.loginBody.Attributes.Add("onload", "setTimeout('Check_NT120Setup()',1000)"); this.btnSubmit.Attributes.Add("onclick", "javascript:LoginSystem();"); } else { PubFunction.IEbrowser = false; base.Response.Redirect("index.aspx"); } } else { this.btnSubmit.Attributes.Add("onclick", "javascript:Login_Submit();"); } string domain = PubConstant.DoMain; if (base.Request.Url.ToString().IndexOf("localhost:") == -1) { if (domain == "" || base.Request.Url.ToString().IndexOf(domain) == -1) { base.Response.Redirect("Error.html"); } } this.aBeiAnName.InnerText = PubFunction.curParameter.RegisterNumber; if (string.IsNullOrEmpty(PubFunction.curParameter.RegisterNumber)) { this.spBeiAn.Visible = false; } base.Title = ConfigHelper.GetValue("SystemTitle"); switch (PubFunction.curParameter.istry) { case 0: { HtmlMeta metaDescription = new HtmlMeta(); metaDescription.Name = "description"; metaDescription.Content = "★ 智络连锁店会员积分系统—由智络科技专门针对商家会员积分需求,进行独立设计开发一款会员积分系统,系统能轻松帮助商家对店里会员进行积分管理服务,系统通用性极强。可服务于连锁美容、美发、超市、便利店、汽车美容、母婴文具、休闲会员、培训机构等连锁商家。是连锁商家管理进行积分管理的必备系统。"; base.Header.Controls.AddAt(4, metaDescription); break; } case 1: this.spCompName.Visible = false; this.pHelpInfo.Visible = false; break; case 2: this.spCompName.Visible = false; this.pHelpInfo.Visible = false; break; } }