private async Task NewViusalReportCommandExecue() { BuildingLocation_Visual visualForm = new BuildingLocation_Visual(); visualForm = new BuildingLocation_Visual(); //visualForm.Id = Guid.NewGuid().ToString(); visualForm.BuildingLocationId = BuildingLocation.Id; VisualBuildingLocationPhotoDataStore.Clear(); App.VisualEditTracking = new List <MultiImage>(); App.VisualEditTrackingForInvasive = new List <MultiImage>(); VisualBuildingLocationPhotoDataStore.Clear(); InvasiveVisualBuildingLocationPhotoDataStore.Clear(); //await VisualFormProjectLocationDataStore.AddItemAsync(vloc); // VisualFormProjectLocationItems = new ObservableCollection<ProjectLocation_Visual>(await VisualFormProjectLocationDataStore.GetItemsAsyncByProjectLocationId(ProjectLocation.Id)); await Shell.Current.Navigation.PushAsync(new VisualBuildingLocationForm() { BindingContext = new VisualBuildingLocationFormViewModel() { BuildingLocation = BuildingLocation, VisualForm = visualForm } }); //{ BindingContext = new EditProjectLocationImageViewModel() { Title = "New Common Location Image", ProjectCommonLocationImages = new ProjectCommonLocationImages() { ImageUrl = "blank.png" }, ProjectLocation = ProjectLocation } }); }
private async Task GoToVisualForm(BuildingLocation_Visual parm) { VisualBuildingLocationFormViewModel vm = new VisualBuildingLocationFormViewModel(); vm.ExteriorElements = new ObservableCollection <string>(parm.ExteriorElements.Split(',').ToList()); vm.WaterProofingElements = new ObservableCollection <string>(parm.WaterProofingElements.Split(',').ToList()); vm.CountExteriorElements = vm.ExteriorElements.Count.ToString(); vm.CountWaterProofingElements = vm.WaterProofingElements.Count.ToString(); vm.RadioList_VisualReviewItems.Where(c => c.Name == parm.VisualReview).Single().IsChecked = true; vm.RadioList_AnyVisualSignItems.Where(c => c.Name == parm.AnyVisualSign).Single().IsChecked = true; vm.RadioList_FurtherInasiveItems.Where(c => c.Name == parm.FurtherInasive).Single().IsChecked = true; vm.RadioList_ConditionAssessment.Where(c => c.Name == parm.ConditionAssessment).Single().IsChecked = true; vm.RadioList_LifeExpectancyEEE.Where(c => c.Name == parm.LifeExpectancyEEE).Single().IsChecked = true; vm.RadioList_LifeExpectancyLBC.Where(c => c.Name == parm.LifeExpectancyLBC).Single().IsChecked = true; vm.RadioList_LifeExpectancyAWE.Where(c => c.Name == parm.LifeExpectancyAWE).Single().IsChecked = true; App.VisualEditTracking = new List <MultiImage>(); App.VisualEditTrackingForInvasive = new List <MultiImage>(); VisualBuildingLocationPhotoDataStore.Clear(); InvasiveVisualBuildingLocationPhotoDataStore.Clear(); // vm.ExteriorElements = new CheakBoxListReturntModel() {selectedList= parm.ExteriorElements.Split(',').ToList(),Count= parm.ExteriorElements.Split(',').ToList().Count }; // vm.CountExteriorElements = vm.ExteriorElements.selectedList.Count.ToString(); //foreach (var item in parm.ExteriorElements.Split(',').ToList()) //{ // vm.ExteriorElements=new CheakBoxListReturntModel() {selectedList } //} //vm.CountExteriorElements = vm.ExteriorElements.selectedList.Count.ToString(); vm.VisualForm = parm; vm.BuildingLocation = BuildingLocation; vm.VisualBuildingLocationPhotoItems = new ObservableCollection <VisualBuildingLocationPhoto>(await VisualBuildingLocationPhotoDataStore.GetItemsAsyncByProjectVisualID(parm.Id, true)); if (App.IsInvasive == false) { if (Shell.Current.Navigation.NavigationStack[Shell.Current.Navigation.NavigationStack.Count - 1].GetType() != typeof(VisualBuildingLocationForm)) { await Shell.Current.Navigation.PushAsync(new VisualBuildingLocationForm() { BindingContext = vm }); } } else { vm.InvasiveVisualBuildingLocationPhotoItems = new ObservableCollection <VisualBuildingLocationPhoto>(await InvasiveVisualBuildingLocationPhotoDataStore.GetItemsAsyncByProjectVisualID(parm.Id, true)); if (Shell.Current.Navigation.NavigationStack[Shell.Current.Navigation.NavigationStack.Count - 1].GetType() != typeof(Views._8_VisualReportForm.TabbedPageInvasive)) { await Shell.Current.Navigation.PushAsync(new Views._8_VisualReportForm.TabbedPageInvasive(vm)); } } //vm.WaterProofingElements.selectedList = parm.ExteriorElements.Split(',').ToList(); //await Shell.Current.Navigation.PushAsync(new EditProjectLocationImage() //{ BindingContext = new EditProjectLocationImageViewModel() { Title = "New Common Location Image", ProjectCommonLocationImages = new ProjectCommonLocationImages() { ImageUrl = "blank.png" }, ProjectLocation = ProjectLocation } }); }