Esempio n. 1
0
 public VegetationCensusListViewModel(INavigation navigation, string fk)
 {
     _navigation = navigation;
     _vegetationCensusRepository = new VegetationCensusRepository();
     _fk                 = fk;
     _vegetation         = new VEGETATIONCENSUS();
     AddCommand          = new Command(async() => await ShowAdd(_fk));
     DeleteAllCommand    = new Command(async() => await DeleteAll());
     ShowFilteredCommand = new Command <VEGETATIONCENSUS>(async(x) => await ShowVegetation(x));
     FetchVegetation();
 }
 public VegetationCensusDetailsViewModel(INavigation navigation, string selectedID)
 {
     _navigation = navigation;
     _vegetation = new VEGETATIONCENSUS();
     //_vegetation.VEGETATIONID  = selectedID;
     _vegetationCensusRepository = new VegetationCensusRepository();
     _fk                   = selectedID;
     AddCommand            = new Command(async() => await Update());
     DeleteCommand         = new Command(async() => await Delete());
     ListVeg               = PickerService.VegItems().ToList();
     OnAppearingCommand    = new Command(() => OnAppearing());
     OnDisappearingCommand = new Command(() => OnDisappearing());
     FetchDetails(selectedID);
 }
        public AddVegetationCensusViewModel(INavigation navigation, string selectedID)
        {
            _navigation                 = navigation;
            _vegetation                 = new VEGETATIONCENSUS();
            _vegetation.PLOTID          = selectedID;
            _vegetationCensusRepository = new VegetationCensusRepository();

            _fk                   = selectedID;
            AddCommand            = new Command(async() => await Update());
            DeleteCommand         = new Command(async() => await Delete());
            ListVeg               = PickerService.VegItems().ToList();
            OnAppearingCommand    = new Command(() => OnAppearing());
            OnDisappearingCommand = new Command(() => OnDisappearing());
            IsChanged             = false;
        }