示例#1
0
 public void InsertVegetation(VEGETATION vegetation, string fk)
 {
     vegetation.VEGETATIONID = Guid.NewGuid().ToString();
     vegetation.PLOTID       = fk;
     _databaseHelper.InsertVegetation(vegetation);
     _databaseHelper.SetPlotSynch(vegetation.PLOTID);
 }
 // Insert new to DB
 public void InsertVegetation(VEGETATION vegetation)
 {
     try
     {
         sqliteconnection.Insert(vegetation);
     }
     catch (Exception ex)
     { logger.LogWrite(ex.Message); }
 }
示例#3
0
        public void DeleteVegetation(VEGETATION _table)
        {
            _table.IsDeleted    = "Y";
            _table.LastModified = System.DateTime.UtcNow;
            _databaseHelper.UpdateVegetation(_table);
            _databaseHelper.SetPlotSynch(_table.PLOTID);

            //        _databaseHelper.DeleteVegetation(ID);
        }
示例#4
0
 public VegetationListViewModel(INavigation navigation, string fk)
 {
     _navigation           = navigation;
     _vegetationRepository = new VegetationRepository();
     _fk                 = fk;
     _vegetation         = new VEGETATION();
     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();
 }
示例#6
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());
        }
 // Update Data
 public void UpdateVegetation(VEGETATION vegetation)
 {
     sqliteconnection.Update(vegetation);
 }
示例#9
0
 async Task ShowVegetation(VEGETATION _vegetation)
 {
     // launch the form - filtered to a specific projectid
     await _navigation.PushAsync(new VegetationDetailsPage(_vegetation.VEGETATIONID));
 }
示例#10
0
 public void UpdateVegetation(VEGETATION vegetation)
 {
     _databaseHelper.UpdateVegetation(vegetation);
     _databaseHelper.SetPlotSynch(vegetation.PLOTID);
 }
 public void UpdateVegetation(VEGETATION vegetation)
 {
     _databaseHelper.UpdateVegetation(vegetation);
 }
 public Task DeleteTaskAsync(VEGETATION item)
 {
     return(restService.DeleteAsync(tablename, item.VEGETATIONID));
 }