private void btnAlta_Click(object sender, EventArgs e) { frmEditar alta = new frmEditar(); if (alta.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.miBinding.Add(alta.Persona); } }
private void btnBaja_Click(object sender, EventArgs e) { frmEditar alta = new frmEditar((Persona)miBinding.Current); if (alta.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.miBinding.Remove((Persona)miBinding.Current); } }
private void btnModificar_Click(object sender, EventArgs e) { Persona p = (Persona)miBinding.Current; int index; index = miBinding.IndexOf(p); frmEditar modificar = new frmEditar(p); if (modificar.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.miBinding[index] = modificar.Persona; } }