Ejemplo n.º 1
0
 /// <summary>
 /// Updates the phone from API.
 /// </summary>
 /// <param name="v">The v.</param>
 private async Task UpdatePhoneFromApi(string v)
 {
     using (var client = new HttpClient())
     {
         client.BaseAddress = new Uri(v);
         var response = client.PutAsJsonAsync("api/Phone/" + PhoneNumber?.PhoneId.ToString(), PhoneNumber).Result;
         if (response.IsSuccessStatusCode)
         {
             SharedContext.IsRefreshed = true;
             PhoneDetailsView.Close();
         }
         else
         {
             SharedContext.IsRefreshed = false;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Called when [cancel].
 /// </summary>
 private void OnCancel()
 {
     SharedContext.IsRefreshed = false;
     PhoneDetailsView.Close();
 }