private void btnadd_Click(object sender, EventArgs e) { FrmAddTipoVehiculo frm = new FrmAddTipoVehiculo(); this.Hide(); frm.ShowDialog(); }
private void btnedit_Click(object sender, EventArgs e) { int rowindex = dataGridView1.CurrentCell.RowIndex; int columnindex = dataGridView1.CurrentCell.ColumnIndex; FrmAddTipoVehiculo fed = new FrmAddTipoVehiculo(); this.Hide(); fed.values = Int32.Parse(dataGridView1.Rows[rowindex].Cells[columnindex].Value.ToString()); fed.ShowDialog(); }