예제 #1
0
 public void AddButton_Click(object sender, EventArgs e)
 {
     using (var form = new EditPersonForm())
     {
         form.ShowDialog();
     }
     UpdateGrid();
 }
예제 #2
0
        public void EditButton_Click(object sender, EventArgs e)
        {
            var p = accountDataGrid.CurrentRow?.DataBoundItem as Person;

            if (p == null)
            {
                return;
            }
            using (var form = new EditPersonForm(p))
            {
                form.ShowDialog();
            }
            UpdateGrid();
        }