// public ICommand SearchCommand { get; private set; } // public bool IsPlotTypeB { get; private set; } public PlotListViewModel(INavigation navigation, string selectedprojectid) { _plot = new PLOT(); _navigation = navigation; _plotRepository = new PlotRepository(); _selectedprojectid = selectedprojectid; AddCommand = new Command(async() => await ShowAdd(_selectedprojectid)); DeleteAllCommand = new Command(async() => await DeleteAll()); ShowFilteredCommand = new Command <PLOT>(async(x) => await ShowTrees(x)); ShowSiteCommand = new Command <PLOT>(async(x) => await ShowSite(x)); ShowSmallTreeCommand = new Command <PLOT>(async(x) => await ShowSmallTree(x)); ShowSmallTreeTallyCommand = new Command <PLOT>(async(x) => await ShowSmallTreeTally(x)); ShowSoilCommand = new Command <PLOT>(async(x) => await ShowSoil(x)); ShowPhotoCommand = new Command <PLOT>(async(x) => await ShowPhoto(x)); ShowVegetationCommand = new Command <PLOT>(async(x) => await ShowVegetation(x)); ShowVegetationCensusCommand = new Command <PLOT>(async(x) => await ShowVegetationCensus(x)); ShowDWDCommand = new Command <PLOT>(async(x) => await ShowDWD(x)); // SearchCommand = new Command<string>(async (text) => await Search(text)); FetchPlots(); }
public StandInfoViewModel(INavigation navigation, PLOT _thisplot) { _navigation = navigation; _plot = new PLOT(); _plot = _thisplot; _plotRepository = new PlotRepository(); if (_plot.STANDINFODATE == System.DateTime.MinValue) { _plot.STANDINFODATE = System.DateTime.Now; } // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList(); ListCanopyOrigin = PickerService.CanopyOriginItems().OrderBy(c => c.NAME).ToList(); ListCanopyStructure = PickerService.CanopyStructureItems().OrderBy(c => c.NAME).ToList(); ListMaturityClass = PickerService.MaturityClassItems().OrderBy(c => c.NAME).ToList(); ListDisturbanceCode = PickerService.DisturbanceItems().OrderBy(c => c.NAME).ToList(); ListMaturityClassRationale = PickerService.MaturityClassRationaleItems().ToList(); OnAppearingCommand = new Command(() => OnAppearing()); OnDisappearingCommand = new Command(() => OnDisappearing()); }
// Update Plot Data public void UpdatePlot(PLOT plot) { sqliteconnection.Update(plot); }
public bool IsUniquePlot(PLOT _plot) { return(_databaseHelper.IsPlotNumUnique(_plot)); }
public void UpdatePlot(PLOT Plot) { Plot.SynchRequired = System.DateTime.UtcNow; _databaseHelper.UpdatePlot(Plot); }
PlotLuckyDraw(PLOT id, string name, string description) : base(id, name, description) { }
// Events ---------------------------------------- // Properties ------------------------------------ // Fields ---------------------------------------- // Initialization -------------------------------- public PlotTravel(PLOT id, string name, string description) : base(id, name, description) { }
PlotTax(PLOT id, string name, string description) : base(id, name, description) { }
public void UpdatePlot(PLOT Plot) { _databaseHelper.UpdatePlot(Plot); }
public void InsertPlot(PLOT Plot, string fk) { Plot.PLOTID = Guid.NewGuid().ToString(); Plot.PROJECTID = fk; _databaseHelper.InsertPlot(Plot); }
public PlotCrewViewModel(INavigation navigation, PLOT _thisplot) { try { _navigation = navigation; _plot = new PLOT(); _plot = _thisplot; _plotRepository = new PlotRepository(); Utils util = new Utils(); // DO DEFAULTS if (_plot.SMALLTREESHRUBDATE == System.DateTime.MinValue) { _plot.SMALLTREESHRUBDATE = System.DateTime.Now; } if (_plot.DEFORMITYDATE == System.DateTime.MinValue) { _plot.DEFORMITYDATE = System.DateTime.Now; } if (_plot.DOWNWOODYDEBRISDATE == System.DateTime.MinValue) { _plot.DOWNWOODYDEBRISDATE = System.DateTime.Now; } if (_plot.UNDERSTORYVEGETATIONDATE == System.DateTime.MinValue) { _plot.UNDERSTORYVEGETATIONDATE = System.DateTime.Now; } if (_plot.UNDERSTORYCENSUSDATE == System.DateTime.MinValue) { _plot.UNDERSTORYCENSUSDATE = System.DateTime.Now; } if (_plot.AGEDATE == System.DateTime.MinValue) { _plot.AGEDATE = System.DateTime.Now; } if (_plot.UNDERSTORYVEGETATIONAREA == 0) { _plot.UNDERSTORYVEGETATIONAREA = Constants.DefaultUnderstoryVegArea; } if (_plot.SMALLTREESHRUBAREA == 0) { _plot.SMALLTREESHRUBAREA = Constants.DefaultSmallTreeArea; } if (_plot.LINELENGTH1 == 0 && _plot.VSNPLOTTYPECODE.Contains("C")) { _plot.LINELENGTH1 = Constants.DefaultDWDLineLength; } if (_plot.LINELENGTH2 == 0 && _plot.VSNPLOTTYPECODE.Contains("C")) { _plot.LINELENGTH2 = Constants.DefaultDWDLineLength; } if (util.UseDefaultPerson) { if (_plot.STANDINFOPERSON == null) { _plot.STANDINFOPERSON = util.DefaultPerson; } if (_plot.SMALLTREEPERSON == null) { _plot.SMALLTREEPERSON = util.DefaultPerson; } if (_plot.AGEPERSON == null) { _plot.AGEPERSON = util.DefaultPerson; } if (_plot.FIELD_CREW1 == null) { _plot.FIELD_CREW1 = util.DefaultPerson; } if (_plot.FORESTHEALTHPERSON == null) { _plot.FORESTHEALTHPERSON = util.DefaultPerson; } } // ListPerson = FillPersonPicker().OrderBy(c => c.NAME).ToList(); ListPerson = PickerService.FillPersonPicker(_plotRepository.GetPersonList(_plot.PROJECTID)).OrderBy(c => c.NAME).ToList(); } catch (System.Exception ex) { var msg = ex.Message; } }
public PlotCommentsViewModel(INavigation navigation, PLOT _thisplot) { _navigation = navigation; _plot = _thisplot; }
public PlotEvent(PLOT id, string name, string description) : base(id, name, description) { }
public Task DeleteTaskAsync(PLOT item) { return(restService.DeleteAsync(tablename, item.PLOTID)); }