Ejemplo n.º 1
0
        private async Task CheckForNewArtifacts()
        {
            // added ahl - check for new artifacts to upload
            var fileStore    = new Utility.FileStore();
            var newArtifacts = await fileStore.CheckForNewArtifacts();

            if (newArtifacts.Count > 0)
            {
                // added ahl 2/25
                var msg = new Windows.UI.Popups.MessageDialog("New artifacts found.");
                msg.Commands.Add(new Windows.UI.Popups.UICommand(
                                     "Edit New Artifacts.", null
                                     ));
                msg.Commands.Add(new Windows.UI.Popups.UICommand(
                                     "Use Defualt Artifacts Attributes.", null
                                     ));
                await msg.ShowAsync();
            }
        }
Ejemplo n.º 2
0
 private async Task CheckForNewArtifacts()
 {
     var fileStore = new Utility.FileStore();
     await fileStore.CheckForNewArtifacts();
 }
Ejemplo n.º 3
0
        private async void Save_Click(object sender, RoutedEventArgs e)
        {
            //var artifactRepo = new ArtifactRepository(_database);
            //var newArtifact = new Artifact{
            //    Active = true,
            //    Title = "a new artifact",
            //    DateAdded = DateTime.Now
            //};
            //await artifactRepo.SaveAsync(newArtifact);
            //var test = await artifactRepo.Get(newArtifact.ID);

            //Status.Text = test.Title;


            // var seeder = new BoeingSalesApp.Utility.FakeSeeder();
            //await seeder.FakeSeedArtifacts();
            //await seeder.FakeSeedCategories();
            //await seeder.CreateTestArtifactSalesBagRelationship();
            //await seeder.CreateTestArtifactCategoryRelationsip();


            //await seeder.CreateArtifactCategory();
            //Status.Text = "done creating acr table";
            //await seeder.CreateTestArtifactSalesBagRelationship();
            //Status.Text = "Artifact Salesbag relationship should have been added";

            //await seeder.FakeSeedArtifacts();
            //await FetchCategories();
            //await seeder.FakeSeedCategories();
            //await FetchCategories();

            //Status.Text = "Seeded artifacts and categories";


            //var artifactRepo = new ArtifactRepository();
            //var duckDocs = await artifactRepo.GetArtifactsByTitle("Duck");
            //var duckDoc = duckDocs[0];
            //var blueTrucks = await artifactRepo.GetArtifactsByTitle("Blue Truck");
            //var blueTruck = blueTrucks[0];

            //var categoryRepo = new CategoryRepository();
            //var planeCats = await categoryRepo.GetCategoriesByName("Planes");
            //var planCat = planeCats[0];
            //Status.Text = string.Format("Name: {0} ", planCat.Name);

            //var artifactsCategories = new Artifact_CategoryRepository();
            ////await artifactsCategories.AddRelationship(duckDoc, planCat);
            ////await artifactsCategories.AddRelationship(blueTruck, planCat);
            //await artifactsCategories.RemoveArtifactFromCategory(duckDoc, planCat);

            //var planeArtifacts = await artifactsCategories.GetAllArtifactsForCategory(planCat);

            //foreach (var artifact in planeArtifacts)
            //{
            //    Status.Text += "  Title: " + artifact.Title;
            //}

            //await _categoryRepository.SaveAsync(_category);
            //await FetchCategories();

            //Status.Text = string.Format("Name: {0} has been saved to your database.", _category.Name);

            var fileUploader = new Utility.FileStore();
            await fileUploader.CheckForNewArtifacts();

            Status.Text = "done";
        }