protected void Application_Start(Object sender, EventArgs e) { //记录application 开始时间 by simon SetLog4Net(); LogHelper.WriteLog("系统开始运行"); IAppConfigSetter setter = new AppConfigSetter(); ApplicationConfiguration.SetAppConfiguration(setter); ClassBuilderManager.LoadClassBuilderDefine(); ApplicationConfigSetup acs = new ApplicationConfigSetup(); acs.LoadLogPath(); acs.Dispose(); BLL.WorkFlowSystemCode wfs = new RmsPM.BLL.WorkFlowSystemCode(); Rms.WorkFlow.InterfaceManager.iSystemCode = wfs; BLL.WorkFlowDefine wfd = new RmsPM.BLL.WorkFlowDefine(); Rms.WorkFlow.InterfaceManager.iDefinition = wfd; BLL.WorkFlowCaseIO wfci = new BLL.WorkFlowCaseIO(); Rms.WorkFlow.InterfaceManager.iWorkCase = wfci; RmsPM.DAL.QueryStrategy.SystemClassDescription.LoadItem(); string vPath = Server.MapPath(System.Configuration.ConfigurationSettings.AppSettings["VirtualDirectory"]); Application["VirtualMapPath"] = vPath; AvailableFunction.LoadAvailableFunction(); /********************** 在线用户统计 ***************************/ Hashtable UserTable = new Hashtable(); Application.Lock(); Application["UserTable"] = UserTable; Application.UnLock(); /***************************************************************/ //单一用户登录 Application["SingleUserLogin"] = BLL.ConvertRule.ToString(System.Configuration.ConfigurationManager.AppSettings["SingleUserLogin"]); //被弹出的用户列表 Hashtable KilledUserTable = new Hashtable(); Application.Lock(); Application["KilledUserTable"] = KilledUserTable; Application.UnLock(); //登录超时时间 Application["LoginTimeOut"] = BLL.ConvertRule.ToDecimal(System.Configuration.ConfigurationSettings.AppSettings["LoginTimeOut"]); //是否使用新的合同结构(合同明细、合同计划分开) Application["IsContractNew"] = "1"; //System.Configuration.ConfigurationSettings.AppSettings["IsContractNew"]; //营销系统接口 Application["SalServiceUrl"] = BLL.ConvertRule.ToString(System.Configuration.ConfigurationSettings.AppSettings["SalServiceUrl"]); /********************** 定时器启动 ***************************/ if (System.Configuration.ConfigurationSettings.AppSettings["SendMailTime"] != null) { //创建一个新的Timer实例 if (sysTimer == null) { sysTimer = new System.Timers.Timer(); } //将sysTimer_Elapsed指定为计时器的 Elapsed 事件处理程序 sysTimer.Elapsed += new System.Timers.ElapsedEventHandler(sysTimer_Elapsed); sysTimer.Interval = nInterMin * 60 * 1000; sysTimer.AutoReset = true; sysTimer.Enabled = true; //ApplicationLog.WriteLog("SendMailTime", "定时器已经启动,邮件发送时间为" + System.Configuration.ConfigurationSettings.AppSettings["SendMailTime"].ToString()); } /***************************************************************/ Application["GridPageSize"] = 14; InitContractActorOperationList(); }