Beispiel #1
0
 public DWDListViewModel(INavigation navigation, string fk)
 {
     _navigation         = navigation;
     _dwdRepository      = new DWDRepository();
     _fk                 = fk;
     AddCommand          = new Command(async() => await ShowAdd(_fk));
     AddAccumCommand     = new Command(async() => await ShowAddAccum(_fk));
     DeleteAllCommand    = new Command(async() => await DeleteAll());
     ShowFilteredCommand = new Command <DWD>(async(x) => await ShowDWD(x));
     FetchDetails();
 }
        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();
        }
Beispiel #3
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());
        }