private void btnNuevoArticulo_Click(object sender, EventArgs e) { ArticuloAgregarForm agregarForm = new ArticuloAgregarForm(); agregarForm.FormClosed += AgregarForm_FormClosed; agregarForm.ShowDialog(); }
private void gridArticulos_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 2) //Si es presiona editar { int idArticulo = (int)gridArticulos.Rows[e.RowIndex].Cells[0].Value; //MessageBox.Show(vendorName); ArticuloAgregarForm agregarForm = new ArticuloAgregarForm(idArticulo); agregarForm.Text = "Consultar/Editar Artículo"; agregarForm.FormClosed += AgregarForm_FormClosed; agregarForm.ShowDialog(); } }