Beispiel #1
0
        protected void Application_Start()
        {
            //默认模板
            Application[ComConst.Templete] = TemplateService.GetInstance().getDefault();

            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new MvcViewEngine());
            //初始化用户实体的减排系数
            float c2   = ItemConfigService.GetInstance().getCO2Config();
            float tree = ItemConfigService.GetInstance().getTreeConfig();

            ItemConfig.treeConvert   = tree;
            ItemConfig.reductionRate = c2;
            if (syndata != null && syndata.Equals("true"))
            {
                SynDataService.GetInstance().startupforWeb();
            }

            //从后台维护数据表中设置错误码静态数据
            ErrorcodeService.GetInstance().setErrorStaticData();

            //add by hbqian in 20130504 for 启动生成电站发电量告警表数据线程
            if (energywarn != null && energywarn.Equals("true"))
            {
                EnergywarnProcesser dataProcess = new EnergywarnProcesser();
                Thread m_thread = new Thread(new ThreadStart(dataProcess.Processing));
                m_thread.Start();
            }
        }
Beispiel #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
            ViewEngines.Engines.Clear();
            ViewEngines.Engines.Add(new MvcViewEngine());
            //初始化用户实体的减排系数
            float c2   = ItemConfigService.GetInstance().getCO2Config();
            float tree = ItemConfigService.GetInstance().getTreeConfig();

            ItemConfig.treeConvert   = tree;
            ItemConfig.reductionRate = c2;
            //从后台维护数据表中设置错误码静态数据
            ErrorcodeService.GetInstance().setErrorStaticData();
        }