Example #1
0
 public VegetationListViewModel(INavigation navigation, string fk)
 {
     _navigation           = navigation;
     _vegetationRepository = new VegetationRepository();
     _fk                 = fk;
     AddCommand          = new Command(async() => await ShowAdd(_fk));
     DeleteAllCommand    = new Command(async() => await DeleteAll());
     ShowFilteredCommand = new Command <VEGETATION>(async(x) => await ShowVegetation(x));
     FetchVegetation();
 }
 // public string GetScientific { get; set; }
 public AddVegetationViewModel(INavigation navigation, string selectedID)
 {
     _navigation = navigation;
     _vegetation = new VEGETATION();
     _vegetation.VEGETATIONID = selectedID;
     _vegetationRepository    = new VegetationRepository();
     _fk           = selectedID;
     AddCommand    = new Command(async() => await Update());
     DeleteCommand = new Command(async() => await Delete());
     ListVeg       = PickerService.VegItems().ToList();
 }
Example #3
0
 public VegetationDetailsViewModel(INavigation navigation, string selectedID)
 {
     _navigation = navigation;
     _vegetation = new VEGETATION();
     //_vegetation.VEGETATIONID  = selectedID;
     _vegetationRepository = new VegetationRepository();
     _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);
     IsChanged = false;
 }
        public AddVegetationViewModel(INavigation navigation, string selectedID)
        {
            _navigation                 = navigation;
            _vegetation                 = new VEGETATION();
            _vegetationcensus           = new VEGETATIONCENSUS();
            _vegetation.PLOTID          = selectedID;
            _vegetationRepository       = new VegetationRepository();
            _vegetationcensusRepository = new VegetationCensusRepository();

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