Пример #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Person     person = (Person)bindSrcTowns.List[bindSrcTowns.Position];
            PersonForm ft     = new PersonForm(person);

            if (ft.ShowDialog() == DialogResult.OK)
            {
                bindSrcTowns.List[bindSrcTowns.Position] = person;
            }
        }
Пример #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Person     person = new Person();
            PersonForm ft     = new PersonForm(person);

            if (ft.ShowDialog() == DialogResult.OK)
            {
                bindSrcTowns.Add(person);
            }
        }