title: How to apply alert dialog after response
body: <pre><code>public async Task&lt;ObservableCollection&lt;CustomerModel&gt;&gt; GetCustomer(string customerNumber, string department)
          {
              try
              {
                  progressBar.Visibility = ViewStates.Visible;
                  progressBar.Progress = 0;
                  listofItems = new ObservableCollection&lt;CustomerModel&gt;();
                  string url = _client.BaseAddress + "/getcustomers(Number='" + customerNumber + "',department='" +
                               department + "')";
                  var response = await _client.GetAsync(url);
                  if (response.IsSuccessStatusCode)
                  {
                      progressBar.Visibility = ViewStates.Invisible;
                      progressBar.Progress = 100;
                      string returnjson = await response.Content.ReadAsStringAsync();
                      ReplyCustomerModel replyCustomerModel =
                          JsonConvert.DeserializeObject&lt;ReplyCustomerModel&gt;(returnjson);
                      if (replyCustomerModel != null)
                      {
                          listofItems = replyCustomerModel.Customers;
                      }
  
                  }
                  else
                  {
  
                      AlertDialog.Builder alertDiag = new AlertDialog.Builder();
                      alertDiag.SetTitle("Butikscanner App");
                      alertDiag.SetMessage("User Does not exist");
                      alertDiag.SetPositiveButton("OK",
                          (senderAlert, args) =&gt; { });
                      alertDiag.SetNegativeButton("Cancel", (senderAlert, args) =&gt; { alertDiag.Dispose(); });
                      Dialog diag = alertDiag.Create();
                      diag.Show();
  
  
                  }
  
                  return listofItems;
              }
              catch (Exception ex)
              {
                  Console.WriteLine(ex);
                  throw;
              }
          }
  </code></pre>
  
  <p>Actually that is what i am doing if my response is false i am trying to show alert dialog that user does not exist I am working  my project in MVVM light </p>
  
  <p>Actually that is what i am doing if my response is false i am trying to show alert dialog that user does not exist I am working  my project in MVVM light </p>
  
  <p>Actually that is what i am doing if my response is false i am trying to show alert dialog that user does not exist I am working  my project in MVVM light </p>