예제 #1
0
 private void contactList_SelectedIndexChanged(object sender, EventArgs e)
 {
     BusinessLogic.Contact c = this.contactList.SelectedItem as BusinessLogic.Contact;
     this.shwName.Text   = c.Name;
     this.shwPhnNum.Text = c.PhoneNumber;
     this.shwAddr.Text   = c.Address;
 }
예제 #2
0
 private void newContactSubmit_Click(object sender, EventArgs e)
 {
     BusinessLogic.Contact newContact = new BusinessLogic.Contact();
     newContact.Name        = this.nameImput.Text;
     newContact.Address     = this.addressInput.Text;
     newContact.PhoneNumber = this.phoneNumInput.Text;
     this.book.AddContact(newContact);
     this.contacts.UpdateContacts();
     this.Hide();
 }