internal async static Task <clsBreed> GetBreedAsync(string prBreedName)
        {
            using (HttpClient lcHttpClient = new HttpClient())
            {
                string js = await lcHttpClient.GetStringAsync("http://localhost:60065/api/Data/GetBreed?BreedName=" + prBreedName);

                clsBreed b = JsonConvert.DeserializeObject <clsBreed>(js);
                return(b);
            }
        }
Пример #2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            try
            {
                base.OnNavigatedTo(e);
                if (e.Parameter != null)
                {
                    string lcBreedName = e.Parameter.ToString();
                    _Breed = await ServiceClient.GetBreedAsync(lcBreedName);

                    UpdateForm();
                }
            }
            catch
            {
                txtbMessages.Text = "Navigation error";
            }
        }