public async Task <string> UpdateItem(SingleTaskModel model) { var userInfo = await _local.GetItemAsync <UserModel>("user"); var _token = userInfo.AccessToken; var request = new HttpRequestMessage(HttpMethod.Put, _baseURL); request.Headers.Authorization = new AuthenticationHeaderValue("bearer", _token); var content = JsonConvert.SerializeObject(model); request.Content = new StringContent(content, Encoding.UTF8, "application/json"); var client = _client.CreateClient(); HttpResponseMessage response = await client.SendAsync(request); return(response.ReasonPhrase); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { TaskPriority priority = (TaskPriority)value; return(SingleTaskModel.PriorityDescription(priority)); }
public SingleTaskViewModel(string description, DateTime creationDate, DateTime realizationDate, TaskPriority priority, bool isAccomplished) { singleTaskModel = new SingleTaskModel(description, creationDate, realizationDate, priority, isAccomplished); }
public SingleTaskViewModel(SingleTaskModel task) { singleTaskModel = task; }