Example #1
0
        private async Task FetchCategoryContents(Guid categoryId)
        {
            var artifactCategoryRepo = new DataAccess.Repository.Artifact_CategoryRepository();
            var category             = await _categoryRepo.Get(categoryId);

            var allArtifacts = await artifactCategoryRepo.GetAllDisplayArtifactsForCategory(category);

            ArtifactsGridView.ItemsSource = allArtifacts;
            lblCurrentCategory.Text       = category.Name;
        }
Example #2
0
        public async Task <List <Utility.DisplayArtifact> > GetAllUncategorizedArtifacts()
        {
            var allArtifacts = await GetAllAsync();

            var artifactCategoryRepo   = new Artifact_CategoryRepository();
            var uncategorizedArtifacts = new List <Utility.DisplayArtifact>();

            foreach (var artifact in allArtifacts)
            {
                if (!await artifactCategoryRepo.DoesArtifactHaveCategory(artifact))
                {
                    uncategorizedArtifacts.Add(new Utility.DisplayArtifact(artifact));
                }
            }

            return(uncategorizedArtifacts);
        }