//PM 数据入库 private void pMToolStripMenuItem_Click(object sender, EventArgs e) { //打开PM界面,和MR界面不同 if (DBname.dbName == "" || DBname.dbName == null) { MessageBox.Show("请选择相应的数据库", "警告"); return; } pmIntoDb = new PMIntoDb(); pmIntoDb.Show(); }
//PM数据入库按钮点击事件 private void PMIntoBtn_Click(object sender, EventArgs e) { pmtoDb = new PMIntoDb(); //打开数据解析的界面 if (cmbDb.Text == "请选择数据库" || cmbDb.Text == "") { MessageBox.Show("请选择数据库或创建一个新的数据库"); return; } if (pmtoDb != null) { if (pmtoDb.IsDisposed) pmtoDb = new PMIntoDb(); // 关闭活动的子窗体 Form activeChild = this.ActiveMdiChild; while (activeChild != null) { activeChild.Close(); activeChild = this.ActiveMdiChild; } this.Dispose(); pmtoDb.WindowState = FormWindowState.Normal; pmtoDb.Show(); } else { pmtoDb = new PMIntoDb(); pmtoDb.WindowState = FormWindowState.Normal; pmtoDb.Show(); } }