예제 #1
0
        private void BDC_Add_Click(object sender, EventArgs e)
        {
            PopupModalForm pmf = new PopupModalForm();

            PopupDealerModelControl pmc = new PopupDealerModelControl(_vPanel, _hPanel, pmf, this);

            pmc.Show();
            //pmc.Dispose();

            pmf.Controls.Add(pmc);
            pmf.ShowDialog();
        }
예제 #2
0
        private void BDC_Edit_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = this.DGV_DealerList.SelectedRows[0];

            if (row != null)
            {
                DealerModel dealer = row.DataBoundItem as DealerModel;

                PopupModalForm pmf = new PopupModalForm();

                PopupDealerModelControl pmc = new PopupDealerModelControl(_vPanel, _hPanel, dealer, this, pmf);
                pmc.Show();
                //pmc.Dispose();

                pmf.Controls.Add(pmc);
                pmf.ShowDialog();
            }
            else
            {
                MessageBox.Show("Select a Dealer to Edit.");
            }
        }