private void ExcuteFixed(object sender, EventArgs e) { if (configM == null) { MessageBox.Show("请重新获取配置信息!"); return; } if (string.IsNullOrEmpty(configM.Sid)) { MessageBox.Show("请重新获取配置信息!"); return; } log_box.Clear(); string bgdate = bg_time.Text; string eddate = ed_time.Text; DateTime bgd = DateTime.Parse(bgdate); DateTime edd = DateTime.Parse(eddate); int k = DateTime.Compare(bgd, edd); if (k <= 0) { edd = edd.AddDays(1); eddate = edd.ToString("yyyy-MM-dd"); bgdate += " 00:00:00"; eddate += " 00:00:00"; if (job == null) { job = new ProdJob(CURR_URI, configM); } else { job.url = CURR_URI; job.setConfigM(configM); } job.cURR_SCM = CURR_SCM; job.cURR_OPR = CURR_OPR; job.cURR_DBID = CURR_DBID; job.bgtime = bgdate; job.edtime = eddate; //sql = string.Format(sql, bgdate, eddate); UseWaitCursor = true; BeginInvoke( new Action(() => { //QueryData(sql); job.Start(); }) ); UseWaitCursor = false; } else { MessageBox.Show("开始日期要小于等于结束日期"); } }
private void btn_id_Click(object sender, EventArgs e) { if (configM == null) { MessageBox.Show("请重新获取配置信息!"); return; } if (string.IsNullOrEmpty(configM.Sid)) { MessageBox.Show("请重新获取配置信息!"); return; } log_box.Clear(); string ids = tb_ids.Text; if (!string.IsNullOrEmpty(ids)) { if (job == null) { job = new ProdJob(CURR_URI, configM); } else { job.url = CURR_URI; job.setConfigM(configM); } job.cURR_SCM = CURR_SCM; job.cURR_OPR = CURR_OPR; job.cURR_DBID = CURR_DBID; job.ids = ids; job.bids = true; //sql = string.Format(sql, bgdate, eddate); UseWaitCursor = true; BeginInvoke( new Action(() => { //QueryData(sql); job.Start(); }) ); UseWaitCursor = false; } else { MessageBox.Show("请输入单号!"); } }