private void btnAdd_Click(object sender, EventArgs e) { try { if (tabControl.SelectedTab.Name == tbpT.Name) { FrmMixtureRatioAdd formMixture = new FrmMixtureRatioAdd(); formMixture.ShowDialog(); } if (tabControl.SelectedTab.Name == tbpP.Name) { FrmPMixtureRatio formPmixture = new FrmPMixtureRatio(); formPmixture.ShowDialog(); } if (tabControl.SelectedTab.Name == tbpR.Name) { FrmGYMixtureRatio formGYmixture = new FrmGYMixtureRatio(); formGYmixture.Text = "乳化沥青配合比"; formGYmixture.ShowDialog(); } if (tabControl.SelectedTab.Name == tbpG.Name) { FrmGYMixtureRatio formGYmixture = new FrmGYMixtureRatio(); formGYmixture.Text = "改性沥青配合比"; formGYmixture.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } finally { } }
private void btnGNew_Click(object sender, EventArgs e) { FrmGYMixtureRatio formGYmixture = new FrmGYMixtureRatio(); try { formGYmixture.Text = "改性沥青配合比"; if (formGYmixture.ShowDialog() == DialogResult.OK) { qualityLogic.FrmMixtureRatioSearch("", "", 0, dgvT, dgvP, dgvR, dgvG); if (dgvG.Rows.Count != 0) { dgvG.Rows[0].Selected = false; } } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } finally { } }