private void cadastrarAutomovel(object sender, EventArgs e) { frmAutomovel frmAutomovel = new frmAutomovel(); frmAutomovel.MdiParent = this.MdiParent; frmAutomovel.Show(); frmAutomovel.WindowState = FormWindowState.Maximized; this.Close(); }
private void editarAutomovel(object sender, EventArgs e) { if (idSelecionado == null) { MessageBox.Show("Por favor, selecione um automóvel na lista"); return; } frmAutomovel frmAutomovel = new frmAutomovel(idSelecionado); frmAutomovel.MdiParent = this.MdiParent; frmAutomovel.Show(); frmAutomovel.WindowState = FormWindowState.Maximized; this.Close(); }