Beispiel #1
0
        public async Task SaveAppAsync(AppToSend item)
        {
            var json = await Task.Run(() => JsonConvert.SerializeObject(item));

            var content = await Task.Run(() => new StringContent("data=" + json, Encoding.UTF8, "application/json"));

            HttpResponseMessage response = null;

            response = await client.PostAsync("http://timekeeperapi.azurewebsites.net/api.php/table4", content);
        }
Beispiel #2
0
        public void setAllApps(string name, string classification)
        {
            foreach (User user in userList)
            {
                foreach (AppData app in user.getApplicationLog())
                {
                    if (app.getName().Equals(name))
                    {
                        app.setClassification(classification);
                    }
                }
            }
            AppToSend myAppToSend = new AppToSend(name, classification);

            setAppDatabase(myAppToSend);
        }
Beispiel #3
0
 public async void setAppDatabase(AppToSend item)
 {
     RestService myService = new RestService();
     await myService.SaveAppAsync(item);
 }