Esempio n. 1
0
        public PlotDetailsViewModel(INavigation navigation, string selectedPlotID)
        {
            _navigation     = navigation;
            _plot           = new PLOT();
            _plot.PLOTID    = selectedPlotID;
            _plotRepository = new PlotRepository();

            UpdatePlotCommand   = new Command(async() => await UpdatePlot());
            DeletePlotCommand   = new Command(async() => await DeletePlot());
            ListFMU             = PickerService.ForestItems().OrderBy(c => c.NAME).ToList();
            CommentsCommand     = new Command(async() => await ShowComments());
            ListSpecies         = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList();
            ListCanopyOrigin    = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList();
            ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList();
            ListMaturityClass   = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList();
            ListMeasurementType = PickerService.MeasurementTypeItems().OrderBy(c => c.NAME).ToList();
            ListNonStandardType = PickerService.NonStandardTypeItems().OrderBy(c => c.NAME).ToList();
            ListAccessCondition = PickerService.AccessConditionItems().OrderBy(c => c.NAME).ToList();
            StandInfoCommand    = new Command(async() => await ShowStandInfo());
            ForestHealthCommand = new Command(async() => await ShowForestHealth());
            PlotCrewCommand     = new Command(async() => await ShowPlotCrew());
            PhotoCommand        = new Command(async() => await ShowPhoto());
            LocationCommand     = new Command(async() => await DoLocation());
            ValidateCommand     = new Command(async() => await DoValidate());

            ListGrowthPlot     = PickerService.GrowthPlotItems().OrderBy(c => c.NAME).ToList();
            ListGrowthPlotType = PickerService.GrowthPlotTypeItems().OrderBy(c => c.NAME).ToList();
            FetchPlotDetails();
            IsChanged             = false;
            OnAppearingCommand    = new Command(() => OnAppearing());
            OnDisappearingCommand = new Command(() => OnDisappearing());
//            ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList();
            ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList();
        }
Esempio n. 2
0
        public AddPlotViewModel(INavigation navigation, string fk)
        {
            _navigation         = navigation;
            _plotValidator      = new PlotValidator();
            _plot               = new PLOT();
            _plotRepository     = new PlotRepository();
            _selectedprojectid  = fk;
            AddCommand          = new Command(async() => await AddPlot(_selectedprojectid));
            ViewAllCommand      = new Command(async() => await ShowList());
            ListFMU             = PickerService.ForestItems().OrderBy(c => c.NAME).ToList();
            ListSpecies         = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList();
            ListCanopyOrigin    = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList();
            ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList();
            ListMaturityClass   = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList();

            CommentsCommand = new Command(async() => await ShowComments());
        }
        public PlotDetailsViewModel(INavigation navigation, string selectedPlotID)
        {
            _navigation     = navigation;
            _plot           = new PLOT();
            _plot.PLOTID    = selectedPlotID;
            _plotRepository = new PlotRepository();

            UpdatePlotCommand   = new Command(async() => await UpdatePlot());
            DeletePlotCommand   = new Command(async() => await DeletePlot());
            ListFMU             = PickerService.ForestItems().OrderBy(c => c.NAME).ToList();
            CommentsCommand     = new Command(async() => await ShowComments());
            ListSpecies         = PickerService.SpeciesItems().OrderBy(c => c.NAME).ToList();
            ListCanopyOrigin    = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList();
            ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList();
            ListMaturityClass   = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList();
            FetchPlotDetails();
        }
        public StandInfoViewModel(INavigation navigation, PLOT _thisplot)
        {
            _navigation     = navigation;
            _plot           = new PLOT();
            _plot           = _thisplot;
            _plotRepository = new PlotRepository();
            if (_plot.STANDINFODATE == System.DateTime.MinValue)
            {
                _plot.STANDINFODATE = System.DateTime.Now;
            }

//            ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList();
            ListPerson                 = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList();
            ListCanopyOrigin           = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList();
            ListCanopyStructure        = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList();
            ListMaturityClass          = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList();
            ListDisturbanceCode        = PickerService.DisturbanceItems().OrderBy(c => c.NAME).ToList();
            ListMaturityClassRationale = PickerService.MaturityClassRationaleItems().ToList();
            OnAppearingCommand         = new Command(() => OnAppearing());
            OnDisappearingCommand      = new Command(() => OnDisappearing());
        }