示例#1
0
 public void InsertEcosite(ECOSITE ecosite, string fk)
 {
     ecosite.ECOSITEID = Guid.NewGuid().ToString();
     ecosite.PLOTID    = fk;
     _databaseHelper.InsertEcosite(ecosite);
     _databaseHelper.SetPlotSynch(ecosite.PLOTID);
 }
 public EcositeCode(ECOSITE _ecosite)
 {
     InitializeComponent();
     _viewmodel          = new EcositeCodeViewModel(Navigation, _ecosite);
     this.BindingContext = _viewmodel;
     Initialize();
 }
示例#3
0
        public void DeleteEcosite(ECOSITE _table)
        {
//            _databaseHelper.DeleteEcosite(ID);
            _table.IsDeleted = "Y";
            _databaseHelper.UpdateEcosite(_table);
            _databaseHelper.SetPlotSynch(_table.PLOTID);
        }
示例#4
0
        public EcositeDetailsViewModel(INavigation navigation, string selectedID)
        {
            _navigation        = navigation;
            _ecosite           = new ECOSITE();
            _ecosite.PLOTID    = selectedID;
            _ecositeRepository = new EcositeRepository();
            _fk                = selectedID;
            UpdateCommand      = new Command(async() => await Update());
            DeleteCommand      = new Command(async() => await Delete());
            CommentsCommand    = new Command(async() => await ShowComments());
            EcositeCommand     = new Command(async() => await ShowEcosite());
            PhotoCommand       = new Command(async() => await ShowPhoto());
            ListDrainage       = PickerService.DrainageItems().ToList();
            ListPorePattern    = PickerService.PorePatternItems().ToList();
            ListMoistureRegime = PickerService.MoistureRegimeItems().ToList();
            ListHumusForm      = PickerService.HumusFormItems().ToList();
            ListDepthClass     = PickerService.DepthClassItems().ToList();
            ListDeposition     = PickerService.DepositionItems().ToList();

            // Get the ecosite if it exists
            if (_ecositeRepository.IsEcositeExists(_fk))
            {
                FetchDetails(_fk);
            }
        }
 // Insert new to DB
 public void InsertEcosite(ECOSITE ecosite)
 {
     try
     {
         sqliteconnection.Insert(ecosite);
     }
     catch (Exception ex)
     { logger.LogWrite(ex.Message); }
 }
示例#6
0
 public TextureViewModel(INavigation navigation, ECOSITE ecosite)
 {
     _navigation  = navigation;
     _ecosite     = new ECOSITE();
     _ecosite     = ecosite;
     TEXTURE      = _ecosite.MINERALTEXTURECODE;
     ClearCommand = new Command(() => ClearItems());
     _temp        = _thistexture;
     //       SetCalc();
 }
示例#7
0
 public EcositeComments(ECOSITE _ecosite)
 {
     try
     {
         InitializeComponent();
         _viewmodel          = new EcositeCommentsViewModel(Navigation, _ecosite);
         this.BindingContext = _viewmodel;
     }
     catch (Exception e)
     {
         var myerror = e.Message; // error
                                  //  Log.Fatal(e);
     };
 }
 public EcositeDetailsViewModel(INavigation navigation, string selectedID)
 {
     _navigation        = navigation;
     _ecosite           = new ECOSITE();
     _ecosite.PLOTID    = selectedID;
     _ecositeRepository = new EcositeRepository();
     _fk                   = selectedID;
     UpdateCommand         = new Command(async() => await Update());
     DeleteCommand         = new Command(async() => await Delete());
     CommentsCommand       = new Command(async() => await ShowComments());
     EcositeCommand        = new Command(async() => await ShowEcosite());
     PhotoCommand          = new Command(async() => await ShowPhoto());
     SoilCommand           = new Command(async() => await ShowSoil());
     TextureCommand        = new Command(async() => await ShowTexture());
     ListDrainage          = PickerService.DrainageItems().ToList();
     ListPorePattern       = PickerService.PorePatternItems().ToList();
     ListMoistureRegime    = PickerService.MoistureRegimeItems().ToList();
     ListHumusForm         = PickerService.HumusFormItems().ToList();
     ListDepthClass        = PickerService.DepthClassItems().ToList();
     ListDeposition        = PickerService.DepositionItems().ToList();
     ListPerson            = PickerService.FillPersonPicker(_ecositeRepository.GetPersonList()).OrderBy(c => c.NAME).ToList();
     ImageCommand          = new Command(async() => await ShowImage());
     OnAppearingCommand    = new Command(() => OnAppearing());
     OnDisappearingCommand = new Command(() => OnDisappearing());
     // Get the ecosite if it exists
     if (_ecositeRepository.IsEcositeExists(_fk))
     {
         FetchDetails(_fk);
     }
     else
     {
         _ecosite.SUBSTRATEDATE                    = System.DateTime.Now;
         _ecosite.DEPTHTOCARBONATES                = 999;
         _ecosite.DEPTHTOBEDROCK                   = 999;
         _ecosite.DEPTHTODISTINCTMOTTLES           = 999;
         _ecosite.DEPTHTOGLEY                      = 999;
         _ecosite.DEPTHTOIMPASSABLECOARSEFRAGMENTS = 999;
         _ecosite.DEPTHTOPROMINENTMOTTLES          = 999;
         _ecosite.DEPTHTOROOTRESTRICTION           = 999;
         _ecosite.DEPTHTOSEEPAGE                   = 999;
         _ecosite.DEPTHTOWATERTABLE                = 999;
         _ecosite.STRATIFIED      = "N";
         _ecosite.PROBLEMATICSITE = "N";
         _ecosite.PRI_ECO_PCT     = 100;
     }
     Refresh();
 }
 // Update Tree Data
 public void UpdateEcosite(ECOSITE ecosite)
 {
     sqliteconnection.Update(ecosite);
 }
示例#10
0
 public EcositeCommentsViewModel(INavigation navigation, ECOSITE _thisecosite)
 {
     _navigation = navigation;
     _ecosite    = _thisecosite;
 }
示例#11
0
 public void UpdateEcosite(ECOSITE ecosite)
 {
     _databaseHelper.UpdateEcosite(ecosite);
     _databaseHelper.SetPlotSynch(ecosite.PLOTID);
 }
 public void UpdateEcosite(ECOSITE ecosite)
 {
     _databaseHelper.UpdateEcosite(ecosite);
 }
 public Texture(ECOSITE ecosite)
 {
     InitializeComponent();
     _viewmodel          = new TextureViewModel(Navigation, ecosite);
     this.BindingContext = _viewmodel;
 }
 public Task DeleteTaskAsync(ECOSITE item)
 {
     return(restService.DeleteAsync(tablename, item.ECOSITEID));
 }
 public CameraViewModel(ECOSITE _ecosite)
 {
 }
 public CameraPage(ECOSITE _ecosite)
 {
     InitializeComponent();
     BindingContext = new CameraViewModel(_ecosite);
 }