Example #1
0
        public async void Get()
        {
            HttpClient client = new HttpClient();

            var response = await client.GetAsync("http://orderio.czech-trip-transport.com/produkt.php");

            string json = await response.Content.ReadAsStringAsync();

            //dynamic c = JsonConvert.DeserializeObject(json);
            List <Objects.Product> c = JsonConvert.DeserializeObject <List <Objects.Product> >(json);

            //string text = c[0].Gender;

            // test.Content = text;
            int ctr = c.Count();

            for (int i = 0; i < ctr; i++)
            {
                Objects.Product product = new Objects.Product();
                product.Name  = c[i].Name;
                product.Price = c[i].Price;


                ProduktList.Items.Add(product);
            }
        }
Example #2
0
        private void ProduktList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            test = (Objects.Product)ProduktList.SelectedItem;

            /*product.Name = test.Name;
             * product.Price = test.Price;*/

            SkladList.Items.Add(test);
            // Sklad
            Send();
        }