private void button1_Click(object sender, EventArgs e) { m = new MetodosCasting(); if (nombre.Text.Length == 0 || apellido.Text.Length == 0 || dir.Text.Length == 0) { MessageBox.Show("Complete los campos obligatorios"); pic1.Visible = true; pic2.Visible = true; } else { m.ActualizarAgente(Id, nombre.Text, apellido.Text, dir.Text, comboBox1.SelectedItem.ToString()); editar = new EditarAgente(); editar.MdiParent = this.MdiParent; editar.Show(); this.Dispose(); } }
private void agentesToolStripMenuItem_Click(object sender, EventArgs e) { EditarAgente edi = new EditarAgente(); edi.MdiParent = this; edi.Show(); }