private void MenuItem_FetchGSet_Click(object sender, EventArgs e) { if (dt_science == null || dt_item == null || dt_units == null || dt_abtype == null || dt_abtype2 == null || dt_stations == null) { MessageBox.Show("请等待加载完成"); return; } if (the_gsetrule == null) { the_gsetrule = new GSetRule(this.orahlper, dt_science, dt_item, dt_units, dt_abtype, dt_abtype2, dt_stations); } if (the_gsetrule.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; DBAccessorParam lp = new DBAccessorParam(); lp.type = DBAccessorParamType.GSetRule; lp.gs = the_gsetrule; if (backgroundWorker_DBAccessor.IsBusy == false) backgroundWorker_DBAccessor.RunWorkerAsync(lp); else MessageBox.Show("数据存取器正忙!"); }
private void MenuItem_GSetCommit_Click(object sender, EventArgs e) { DBAccessorParam lp = new DBAccessorParam(); lp.type = DBAccessorParamType.GSetWriteDb; if (backgroundWorker_DBAccessor.IsBusy == false) backgroundWorker_DBAccessor.RunWorkerAsync(lp); else MessageBox.Show("数据存取器正忙!"); }
private void button_Input_Click(object sender, EventArgs e) { Rule rl = new Rule(this.dt_units); if (orahlper.oracon.DataSource == "127.0.0.1/orcx") { rl.Set(new DateTime(2014, 9, 1), @"河南省 15,湖北省 15, 辽宁省 20"); } else if (false) { rl.Set(new DateTime(2016, 1, 1), @"地壳应力研究所 10,地球物理研究所 10,地震预测研究所 10,"); } if (rl.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; DBAccessorParam lp = new DBAccessorParam(); lp.type = DBAccessorParamType.Rule; lp.rl = rl; if (backgroundWorker_DBAccessor.IsBusy == false) backgroundWorker_DBAccessor.RunWorkerAsync(lp); else MessageBox.Show("数据存取器正忙!"); }