示例#1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            PersonDialog newContactWindow = new PersonDialog(_baseAddress);

            //newContactWindow.MdiParent = this;
            newContactWindow.ShowDialog();
            if (newContactWindow.DialogResult == DialogResult.OK)
            {
                Update();
            }
        }
示例#2
0
 private void btnChange_Click(object sender, EventArgs e)
 {
     if (listView.SelectedItems.Count != 0)
     {
         ListViewItem item             = listView.SelectedItems[0];
         PersonDialog newContactWindow = new PersonDialog(_baseAddress, (int)item.Tag, item.SubItems[0].Text, item.SubItems[1].Text, DateTime.Parse(item.SubItems[2].Text));
         newContactWindow.ShowDialog();
         if (newContactWindow.DialogResult == DialogResult.OK)
         {
             Update();
         }
     }
 }