Example #1
0
        private void BPC_Add_Product_Click(object sender, EventArgs e)
        {
            PopupModalForm pmf = new PopupModalForm();

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

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

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

            if (row != null)
            {
                ProductModel product = row.DataBoundItem as ProductModel;

                PopupModalForm pmf = new PopupModalForm();

                PopupProductModelControl pmc = new PopupProductModelControl(_vPanel, _hPanel, product, this, pmf);
                pmc.Show();
                //pmc.Dispose();

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