protected void PopulatePage(ABPerson contact) { // save the ID of our person contactID = contact.Id; // set the data on the page txtFirstName.Text = contact.FirstName; txtLastName.Text = contact.LastName; tableDataSource = new AddressBookScreen.PhoneNumberTableSource(contact.GetPhones()); tblPhoneNumbers.Source = tableDataSource; // wire up our delete clicked handler tableDataSource.DeleteClicked += (object sender, PhoneNumberTableSource.PhoneNumberClickedEventArgs e) => { DeletePhoneNumber(e.PhoneNumberID); }; }
protected void PopulatePage(ABPerson contact) { // save the ID of our person contactID = contact.Id; // set the data on the page txtFirstName.Text = contact.FirstName; txtLastName.Text = contact.LastName; tableDataSource = new AddressBookScreen.PhoneNumberTableSource (contact.GetPhones ()); tblPhoneNumbers.Source = tableDataSource; // wire up our delete clicked handler tableDataSource.DeleteClicked += (object sender, PhoneNumberTableSource.PhoneNumberClickedEventArgs e) => { DeletePhoneNumber (e.PhoneNumberID); }; }