private void btNovaEditora_Click(object sender, EventArgs e) { ((Form)this.TopLevelControl).Hide(); frmEditoraConf ec = new frmEditoraConf(); ec.Show(); }
private void btEditarEditora_Click(object sender, EventArgs e) { if (dgvEditoras.CurrentRow.Cells[0].Value != null) { List <string> campos = new List <string>(); campos.Add(dgvEditoras.CurrentRow.Cells[0].Value.ToString()); campos.Add(dgvEditoras.CurrentRow.Cells[1].Value.ToString()); ((Form)this.TopLevelControl).Hide(); frmEditoraConf fu = new frmEditoraConf(campos, "editar"); fu.Show(); } else { MessageBox.Show("Escolha um registro para editar."); } }