Ejemplo n.º 1
0
        private async Task NewViusalReportCommandExecue()
        {
            Apartment_Visual visualForm = new Apartment_Visual();

            visualForm = new Apartment_Visual();
            // visualForm.Id = Guid.NewGuid().ToString();
            visualForm.BuildingApartmentId = BuildingApartment.Id;



            App.VisualEditTracking            = new List <MultiImage>();
            App.VisualEditTrackingForInvasive = new List <MultiImage>();
            VisualApartmentLocationPhotoDataStore.Clear();
            InvasiveVisualApartmentLocationPhotoDataStore.Clear();
            //await VisualFormProjectLocationDataStore.AddItemAsync(vloc);
            //  VisualFormProjectLocationItems = new ObservableCollection<ProjectLocation_Visual>(await VisualFormProjectLocationDataStore.GetItemsAsyncByProjectLocationId(ProjectLocation.Id));
            await Shell.Current.Navigation.PushAsync(new VisualApartmentLocationForm()
            {
                BindingContext = new VisualApartmentFormViewModel()
                {
                    BuildingApartment = BuildingApartment, VisualForm = visualForm
                }
            });

            //{ BindingContext = new EditProjectLocationeageViewModel() { Title = "New Common Location Image", ProjectCommonLocationImages = new ProjectCommonLocationImages() { ImageUrl = "blank.png" }, ProjectLocation = ProjectLocation } });
        }
Ejemplo n.º 2
0
        private async Task GoToVisualForm(Apartment_Visual parm)
        {
            VisualApartmentFormViewModel vm = new VisualApartmentFormViewModel();

            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;
            //  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();

            App.VisualEditTracking            = new List <MultiImage>();
            App.VisualEditTrackingForInvasive = new List <MultiImage>();
            VisualApartmentLocationPhotoDataStore.Clear();
            InvasiveVisualApartmentLocationPhotoDataStore.Clear();
            // InvasiveVisualApartmentLocationPhotoDataStore.Clear();

            //vm.WaterProofingElements.selectedList = parm.ExteriorElements.Split(',').ToList();
            vm.VisualForm        = parm;
            vm.BuildingApartment = BuildingApartment;
            vm.VisualApartmentLocationPhotoItems = new ObservableCollection <VisualApartmentLocationPhoto>(await VisualApartmentLocationPhotoDataStore.GetItemsAsyncByProjectVisualID(parm.Id, true));
            if (App.IsInvasive == false)
            {
                if (Shell.Current.Navigation.NavigationStack[Shell.Current.Navigation.NavigationStack.Count - 1].GetType() != typeof(VisualApartmentLocationForm))
                {
                    await Shell.Current.Navigation.PushAsync(new VisualApartmentLocationForm()
                    {
                        BindingContext = vm
                    });
                }
            }
            else
            {
                vm.InvasiveVisualApartmentLocationPhotoItems = new ObservableCollection <VisualApartmentLocationPhoto>(await InvasiveVisualApartmentLocationPhotoDataStore.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));
                }
                //await Shell.Current.Navigation.PushAsync(new VisualProjectLocationForm() { BindingContext = vm });
            }

            //await Shell.Current.Navigation.PushAsync(new EditProjectLocationImage()
            //{ BindingContext = new EditProjectLocationImageViewModel() { Title = "New Common Location Image", ProjectCommonLocationImages = new ProjectCommonLocationImages() { ImageUrl = "blank.png" }, ProjectLocation = ProjectLocation } });
        }