public AddDWDViewModel(INavigation navigation, string selectedID)
        {
            _navigation     = navigation;
            _dwd            = new DWD();
            _dwd.DWDID      = selectedID;
            _dwdRepository  = new DWDRepository();
            _fk             = selectedID;
            AddCommand      = new Command(async() => await Update());
            AddAccumCommand = new Command(async() => await Update(true));

            DeleteCommand   = new Command(async() => await Delete());
            ListSpecies     = PickerService.SpeciesItems().ToList();
            ListOrigin      = PickerService.OriginItems().ToList();
            ListDecompClass = PickerService.DecompClassItems().ToList();
            ListLine        = PickerService.LineItems().ToList();
        }
示例#2
0
        public DWDDetailsViewModel(INavigation navigation, string selectedID)
        {
            _navigation = navigation;
            _dwd        = new DWD();
            //_vegetation.VEGETATIONID  = selectedID;
            _dwdRepository  = new DWDRepository();
            _fk             = selectedID;
            AddCommand      = new Command(async() => await Update(false));
            AddAccumCommand = new Command(async() => await Update(true));

            DeleteCommand   = new Command(async() => await Delete());
            ListSpecies     = PickerService.SpeciesItems().ToList();
            ListOrigin      = PickerService.OriginItems().ToList();
            ListDecompClass = PickerService.DecompClassItems().ToList();
            ListLine        = PickerService.LineItems().ToList();
            FetchDetails(selectedID);
        }
        public AddDWDViewModel(INavigation navigation, string selectedID, bool IsAccumulation = false)
        {
            _navigation     = navigation;
            _dwd            = new DWD();
            _isaccum        = IsAccumulation;
            _dwd.DWDID      = selectedID;
            _dwdRepository  = new DWDRepository();
            _fk             = selectedID;
            _dwd.BURNED     = "N";
            _dwd.HOLLOW     = "N";
            AddCommand      = new Command(async() => await Update());
            AddAccumCommand = new Command(async() => await Update(IsAccumulation));

            DeleteCommand         = new Command(async() => await Delete());
            ListSpecies           = PickerService.SpeciesItems().ToList();
            ListOrigin            = PickerService.OriginItems().ToList();
            ListDecompClass       = PickerService.DecompClassItems().ToList();
            ListLine              = PickerService.LineItems().ToList();
            IsChanged             = false;
            OnAppearingCommand    = new Command(() => OnAppearing());
            OnDisappearingCommand = new Command(() => OnDisappearing());
        }