/// <summary> /// Конструктор по умолчанию. /// </summary> public ChangeStatusViewModel() { ChangeStatus = new RelayCommand <string>(async s => { IsWork = true; var request = new StatusSetRequest() { Text = s, GroupID = GroupID }; var response = await request.ExecuteAsync(); if (response.Error.ErrorType == VKErrors.None) { var profile = ServiceLocator.Current.GetInstance <SidebarViewModel>().Profile; if (profile != null) { profile.Status = s; } NavigationHelper.GoBack(); } else { await ServiceHelper.DialogService.ShowMessage("При изменении статуса произошла ошибка. Повторите попытку позднее.", "Не удалось изменить статус"); } IsWork = false; }); }
public Task <StatusData <string> > UpdateUserAvailability(StatusSetRequest request, SystemSession session) { return(_jUnitOfWork.Profile.UpdateUserAvailability(request, session)); }
public async Task <HttpResponseMessage> UserAvailabilityUpdate([FromBody] StatusSetRequest request) { var response = await _profileService.UpdateUserAvailability(request, Request.GetSession()).ConfigureAwait(false); return(Request.SystemResponse(response)); }