示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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;
            }
        }