private void button1_Click(object sender, EventArgs e) { Form AddProduct = new Add_Product(); //this.Hide(); AddProduct.ShowDialog(); this.Show(); ProductsData.DataSource = GeneralMethods.GetProducts(); }
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(); }