private void DgvArticulos_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { DataGridViewRow row = this.DgvArticulos.SelectedRows[0]; Articulos articulo = new Articulos(); articulo.idArticulo = Int32.Parse(row.Cells[0].Value.ToString()); articulo.Descripcion = row.Cells[1].Value.ToString(); articulo.Cantidad = Int32.Parse(row.Cells[2].Value.ToString()); articulo.CostoUnitario = decimal.Parse(row.Cells[3].Value.ToString()); articulo.PrecioUnitario = decimal.Parse(row.Cells[4].Value.ToString()); articulo.Estado = row.Cells[5].Value.ToString(); FrmEdArticulos fed = new FrmEdArticulos(); fed.articulo = articulo; fed.ShowDialog(); } catch (Exception ex) { return; } }
private void BtnAgregar_Click(object sender, EventArgs e) { FrmEdArticulos frm = new FrmEdArticulos(); frm.ShowDialog(); }