private void bt_Cadastrar_Click(object sender, EventArgs e) { this.Hide(); CadVeiculo cadVei = new CadVeiculo(0); cadVei.ShowDialog(); Consulta(); this.Show(); }
private void bt_Modificar_Click(object sender, EventArgs e) { if (grd_Dados.Rows.Count > 0) { int ln = grd_Dados.CurrentRow.Index; int codigo = Convert.ToInt32(grd_Dados.Rows[ln].Cells[0].Value.ToString()); this.Hide(); CadVeiculo cadVei = new CadVeiculo(codigo); cadVei.ShowDialog(); Consulta(); this.Show(); } }