Ejemplo n.º 1
0
 private async void ChangePhoneNumber()
 {
     AddressBookServiceClient proxy = new AddressBookServiceClient("BasicHttpBinding_IAddressBookService");
     try
     {    
         await proxy.ChangePhoneNumberAsync(_id,_phoneNumber.Insert(0,"(").Insert(4,") ").Insert(9,"-"));
         Contacts = await proxy.FindContactbyPhoneAsync(_phoneNumber);
     }
     catch (Exception e)
     {
         MessageBox.Show("Error " + e.Message);
     }
     finally
     {
         proxy.Close();
     }
 }
Ejemplo n.º 2
0
 private async void FindContact()
 {
     AddressBookServiceClient proxy = new AddressBookServiceClient("BasicHttpBinding_IAddressBookService");
     try
     {
         Contacts = await proxy.FindContactbyPhoneAsync(_phoneNumber);
     }
     catch (Exception e)
     {
         MessageBox.Show("Error " + e.Message);
     }
     finally
     {
         proxy.Close();
     }
 }