private void b_agregar_Click(object sender, EventArgs e) { frm_Restaurantes rest = new frm_Restaurantes(); rest.accion = "Insertar"; rest.Show(); }
private void dgv_restaurante_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { frm_Restaurantes rest = new frm_Restaurantes(); rest.accion = "Editar"; rest.codigo = dgv_restaurante.Rows[e.RowIndex].Cells[0].Value.ToString().Replace(" ", ""); rest.ShowDialog(); } }