Ejemplo n.º 1
0
        private async void Initialize()
        {
            IsBusy          = true;
            AvailableGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());

            AvailableTaskStatuses = await _taskItemDataService.GetAvailableTaskStatuses();

            SelectedTaskStatus = AvailableTaskStatuses.First();
            SelectedGroup      =
                AvailableGroups.SingleOrDefault(g => g.GroupName.Contains(Constants.DefaultGroupForUserNamePrefix));

            if (_associatedTaskItem != null)
            {
                Id                 = _associatedTaskItem.Id;
                Name               = _associatedTaskItem.Name;
                Description        = _associatedTaskItem.Description;
                SelectedTaskStatus = _availableTaskStatuses.Single(s => s.Id == _associatedTaskItem.TaskStatusId);
                SelectedGroup      = _availableGroups.Single(g => g.Id == _associatedTaskItem.GroupId);
                StartDateTime      = _associatedTaskItem.StartDateTime.Value;
                EndDateTime        = _associatedTaskItem.EndDateTime.Value;
                IsCompleted        = _associatedTaskItem.IsCompleted;
                IsDeleted          = _associatedTaskItem.IsDeleted;
            }
            IsBusy = false;
        }
Ejemplo n.º 2
0
        private async void Refresh()
        {
            IsBusy     = true;
            UserGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());

            IsBusy = false;
        }
Ejemplo n.º 3
0
        private async void Refresh()
        {
            try
            {
                IsBusy = true;
                var userId = AccountHelper.GetCurrentUserId();
                //string userInternalId = await _userDataService.GetUserInternalId(userId, Constants.MainAuthenticationDomain);
                UserGroups = await _groupDataService.GetGroupsAvailableForUser(userId);

                UserGroups = UserGroups.OrderBy(g => g.GroupNameTruncated).ToObservableCollection();
            }
            catch (Exception ex)
            {
            }
            IsBusy = false;
        }
Ejemplo n.º 4
0
 private async void Initialize()
 {
     AvailableGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());
 }