private void button1_Click(object sender, EventArgs e) { CadMarca cad = new CadMarca(); cad.ShowDialog(); CarregarGrid(); }
private void btnEditar_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { Marca marca = new Marca(); marca.mar_id = Convert.ToInt32(listView1.SelectedItems[0].Text); CadMarca cad = new CadMarca(marca); cad.ShowDialog(); CarregarGrid(); } else { MessageBox.Show("Nenhum Registro Selecionado!"); } }