private void PickDestAddressBtn_Click(object sender, EventArgs e) { addressList.ShowDialog(); Entities.Address addr = addressList.SelectedAddress; if (addr != null) { destinationTextBox.Text = addr.ToString(); } }
private void ViewAddressBookBtn_Click(object sender, EventArgs e) { addressList.ShowDialog(); Entities.Address addr = addressList.SelectedAddress; if (addr != null) { AorBForm ab = new AorBForm("Source", "Destination"); ab.ShowDialog(); if (ab.selectedOption == "Source") { sourceTextBox.Text = addr.ToString(); } else { destinationTextBox.Text = addr.ToString(); } } }