static void Main(string[] args) { #region 初始化配置 RedisCacheProvider.SetRedisCluster(AppConfig.RedisServer()); //redis配置 #endregion SWfsSubjectStatisticsService service = new SWfsSubjectStatisticsService(); string RunConfig = AppConfig.RunConfig(); Console.WriteLine("开始运行..."); if (RunConfig.Equals("0") || RunConfig.Equals("1")) { service.GetSubjectDataList(1); //今日新开 System.Threading.Thread.Sleep(3000); Console.WriteLine("====================================================="); } if (RunConfig.Equals("0") || RunConfig.Equals("2")) { service.GetSubjectDataList(2); //进行中 System.Threading.Thread.Sleep(3000); Console.WriteLine("====================================================="); } if (RunConfig.Equals("0") || RunConfig.Equals("3")) { service.GetSubjectDataList(3); //已结束 } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); DapperInitializer.Initialize(); RedisCacheProvider.SetRedisCluster(AppSettingManager.AppSettings["redisServer"]); MemcachedProvider.SetMemcachedCluster(AppSettingManager.AppSettings["memcacheServer"].Split(',')); EnyimMemcachedClient.SetMemcachedCluster(Shangpin.Ocs.Service.Common.AppSettingManager.AppSettings["memcached"].Split(',')); }
/// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.button1 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.textBox4 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(172, 202); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(131, 23); this.button1.TabIndex = 0; this.button1.Text = "生成微码"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Location = new System.Drawing.Point(113, 50); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(57, 17); this.label1.TabIndex = 5; this.label1.Text = "活动ID:"; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(172, 47); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(131, 21); this.textBox1.TabIndex = 6; // // label2 // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Location = new System.Drawing.Point(101, 124); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(68, 17); this.label2.TabIndex = 5; this.label2.Text = "生成数量:"; // // textBox2 // this.textBox2.Location = new System.Drawing.Point(172, 121); this.textBox2.Name = "textBox2"; this.textBox2.Size = new System.Drawing.Size(131, 21); this.textBox2.TabIndex = 7; // // textBox3 // this.textBox3.Location = new System.Drawing.Point(172, 87); this.textBox3.Name = "textBox3"; this.textBox3.Size = new System.Drawing.Size(131, 21); this.textBox3.TabIndex = 9; // // label3 // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label3.Location = new System.Drawing.Point(101, 87); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(68, 17); this.label3.TabIndex = 8; this.label3.Text = "活动编码:"; // // textBox4 // this.textBox4.Location = new System.Drawing.Point(172, 160); this.textBox4.Name = "textBox4"; this.textBox4.Size = new System.Drawing.Size(131, 21); this.textBox4.TabIndex = 11; // // label4 // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.Location = new System.Drawing.Point(110, 163); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); this.label4.TabIndex = 10; this.label4.Text = "操作人:"; // // VcodeCreate // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(456, 276); this.Controls.Add(this.textBox4); this.Controls.Add(this.label4); this.Controls.Add(this.textBox3); this.Controls.Add(this.label3); this.Controls.Add(this.textBox2); this.Controls.Add(this.textBox1); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.button1); this.Name = "VcodeCreate"; this.Text = "微码生成工具"; this.ResumeLayout(false); this.PerformLayout(); DapperInitializer.Initialize(); RedisCacheProvider.SetRedisCluster(AppSettingManager.AppSettings["redisServer"]); MemcachedProvider.SetMemcachedCluster(AppSettingManager.AppSettings["memcacheServer"].Split(',')); EnyimMemcachedClient.SetMemcachedCluster(Shangpin.Ocs.Service.Common.AppSettingManager.AppSettings["memcached"].Split(',')); }