Beispiel #1
0
        public async Task Init()
        {
            IsLoading = true;

            if (timeEntryList == null)
            {
                timeEntryList = await TimeEntryGroup.GetTimeEntryDataList(timeEntryIds);
            }

            // Create model.
            if (timeEntryList.Count > 1)
            {
                model = new TimeEntryGroup(timeEntryList);
            }
            else if (timeEntryList.Count == 1)
            {
                model = new TimeEntryModel(timeEntryList [0]);
            }

            await model.LoadAsync();

            projectList = new WorkspaceProjectsView();
            await projectList.ReloadAsync();

            if (model.Workspace == null || model.Workspace.Id == Guid.Empty)
            {
                model = null;
            }

            IsLoading = false;
        }
Beispiel #2
0
 public ProjectListAdapter(RecyclerView owner, WorkspaceProjectsView collectionView) : base(owner, collectionView)
 {
     this.owner          = owner;
     this.collectionView = collectionView;
 }