示例#1
0
 private void timer2_Tick(object sender, EventArgs e)
 {
     this.label19.Text = DateTime.Now.ToString();
     if (DateTime.Now.ToString() == this.label18.Text)
     {
         this.timer1.Enabled = true;
         if (this.ssjk)
         {
             this.M_jk_URL();
         }
         this.label18.Text = this.dateTimePicker3.Value.AddDays((double) int.Parse(this.comboBox1.Text)).ToShortDateString() + " " + this.comboBox2.Text + ":00:00";
         this.dateTimePicker2.Value = this.dateTimePicker3.Value.AddDays((double) int.Parse(this.comboBox1.Text));
         Mission_Time time = new Mission_Time();
         try
         {
             time.M_timeup(this.label18.Text, this.checkBox1.Checked.ToString());
         }
         catch (Exception)
         {
         }
     }
 }
示例#2
0
 private void button8_Click(object sender, EventArgs e)
 {
     this.label18.Text = this.dateTimePicker1.Value.AddDays((double) int.Parse(this.comboBox1.Text)).ToShortDateString() + " " + this.comboBox2.Text + ":00:00";
     this.dateTimePicker2.Value = this.dateTimePicker1.Value.AddDays((double) int.Parse(this.comboBox1.Text));
     Mission_Time time = new Mission_Time();
     try
     {
         time.M_timeup(this.label18.Text, this.checkBox1.Checked.ToString());
         MessageBox.Show("定时任务保存成功");
     }
     catch (Exception)
     {
         MessageBox.Show("参数或数据库错误,请联系我们");
     }
 }