예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form AddProduct = new Add_Product();

            //this.Hide();
            AddProduct.ShowDialog();
            this.Show();
            ProductsData.DataSource = GeneralMethods.GetProducts();
        }
예제 #2
0
        private void dgvProducts_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int  id         = Convert.ToInt32(dgvProducts.Rows[dgvProducts.CurrentCell.RowIndex].Cells[0].FormattedValue.ToString());
            Form AddProduct = new Add_Product(id);

            //this.Hide();
            AddProduct.ShowDialog();
            this.Show();
            ProductsData.DataSource = GeneralMethods.GetProducts();
        }