示例#1
0
        /// <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));
        }
示例#2
0
        public async Task DeleteLastStopAsync(LastStop ls)
        {
            var db = await App.GetDatabaseAsync();

            await db.DeleteAsync(ls);
        }
示例#3
0
        public async Task InsertLastStopAsync(LastStop ls)
        {
            var db = await App.GetDatabaseAsync();

            await db.InsertAsync(ls);
        }