コード例 #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            NewPersonForm npf = new NewPersonForm(null);

            if (npf.ShowDialog() == DialogResult.OK)
            {
                UpdateList();
            }
        }
コード例 #2
0
 private void btnEditOld_Click(object sender, EventArgs e)
 {
     if (dgvDetail.SelectedRows.Count >= 1)
     {
         Person        pp  = (Person)dgvDetail.SelectedRows[0].Tag;
         NewPersonForm npf = new NewPersonForm(pp);
         if (npf.ShowDialog() == DialogResult.OK)
         {
             UpdateList();
         }
     }
 }