Example #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;
        }
Example #2
0
        private async void Refresh()
        {
            IsBusy     = true;
            UserGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());

            IsBusy = false;
        }
Example #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;
        }
Example #4
0
 private async void Initialize()
 {
     AvailableGroups = await _groupDataService.GetGroupsAvailableForUser(AccountHelper.GetCurrentUserId());
 }