예제 #1
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            var row  = dataGridView1.SelectedRows[0].DataBoundItem as Model.Models.Person;
            var form = new EditPerson(repository, row);

            form.ShowDialog();
            Reload();
        }
예제 #2
0
        private void btnEdit_Click(object sender, System.EventArgs e)
        {
            var row  = dataGridView1.SelectedRows[0].DataBoundItem as ServiceReference1.Person;
            var form = new EditPerson(service, row);

            form.ShowDialog();
            Reload();
        }
예제 #3
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            Persona    person     = ((Persona)this.listPersons.SelectedItem);
            EditPerson editPerson = new EditPerson(person);

            if (editPerson.ShowDialog() == DialogResult.OK)
            {
                this.listPersons.Items.Clear();
                foreach (Persona p in PersonDao.loadPersons())
                {
                    this.listPersons.Items.Add(p);
                }
            }
        }