/// <summary> /// Initializes a new instance of the LineDetailsViewModel class. /// </summary> public LineDetailsViewModel(IDataBaseService dbService, INavigationService navigationService, IApplicationBarService appBarServ) { if (ViewModelBase.IsInDesignModeStatic) { Line = new Line() { LineId = 1, NumLigne = "1", LineType = LineType.Tramway, OneDirection = "François Mitterand / Jamet", OppositeDirection = "Beaujoire / Ranzay", FontColor = "FFFEFF", BackColor = "007944" }; SelectedLastStop = new LastStop() { Name = "François Mitterand / Jamet" }; } _db = dbService; _navigationService = navigationService; this.StopSelectionChangedCommand = new RelayCommand <Stop>(e => SelectionChanged(e)); }
public async Task DeleteLastStopAsync(LastStop ls) { var db = await App.GetDatabaseAsync(); await db.DeleteAsync(ls); }
public async Task InsertLastStopAsync(LastStop ls) { var db = await App.GetDatabaseAsync(); await db.InsertAsync(ls); }