public SmallTreeTallyListViewModel(INavigation navigation, string fk) { _navigation = navigation; _smallTreeTallyRepository = new SmallTreeTallyRepository(); _fk = fk; _smallTreeTally = new SMALLTREETALLY(); AddCommand = new Command(async() => await ShowAdd(_fk)); DeleteAllCommand = new Command(async() => await DeleteAll()); ShowFilteredCommand = new Command <SMALLTREETALLY>(async(x) => await ShowSmallTreeTally(x)); FetchSmallTreeTally(); }
public AddSmallTreeTallyViewModel(INavigation navigation, string selectedID) { _navigation = navigation; _smallTreeTally = new SMALLTREETALLY(); _smallTreeTally.PLOTID = selectedID; _smallTreeTallyRepository = new SmallTreeTallyRepository(); _fk = selectedID; AddCommand = new Command(async() => await Update()); DeleteCommand = new Command(async() => await Delete()); ListSpecies = PickerService.SpeciesItems().OrderBy(c => c.ID).ToList(); IsChanged = false; OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }