コード例 #1
0
 public async Task RemoveEntryAsync(CateringEntry entry)
 {
     var url = new Uri(_baseUri,
                       string.Format("entry/{0}", entry.Id));
     var response = await SendRequestAsync <CateringEntry>(url,
                                                           HttpMethod.Delete, _headers);
 }
コード例 #2
0
        public async Task <CateringEntry> AddEntryAsync(CateringEntry entry)
        {
            var url      = new Uri(_baseUri, "/entry");
            var response = await SendRequestAsync <CateringEntry>(url,
                                                                  HttpMethod.Post, _headers, entry);

            return(response);
        }
コード例 #3
0
        public async Task <CateringEntry> UpdateEntryAsync(CateringEntry entry)
        {
            var url = new Uri(_baseUri,
                              string.Format("/entry/{0}", entry.Id));
            var response = await SendRequestAsync <CateringEntry>(url,
                                                                  new HttpMethod("PATCH"), _headers, entry);

            return(response);
        }
コード例 #4
0
        // ...

        async Task ExecuteSelectPlaceCommand()
        {
            var newItem = new CateringEntry
            {
                Title     = Title,
                Latitude  = Latitude,
                Longitude = Longitude,
                Date      = Date,
                Notes     = Notes
            };
            await NavService.NavigateTo <SelectPlaceViewModel, CateringEntry>(newItem);
        }
コード例 #5
0
ファイル: MainViewModel.cs プロジェクト: lipowskm/Catering
 async Task ExecuteViewCommand(CateringEntry entry)
 {
     await NavService.NavigateTo <DetailViewModel, CateringEntry>(entry);
 }