Esempio n. 1
0
        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
            {
            }
        }
Esempio n. 2
0
        private void btnPNew_Click(object sender, EventArgs e)
        {
            FrmPMixtureRatio formPmixture = new FrmPMixtureRatio();

            try
            {
                if (formPmixture.ShowDialog() == DialogResult.OK)
                {
                    qualityLogic.FrmMixtureRatioSearch("", "", 0, dgvT, dgvP, dgvR, dgvG);
                    if (dgvP.Rows.Count != 0)
                    {
                        dgvP.Rows[0].Selected = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            finally
            {
            }
        }