12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using Prism.Commands;
- using Prism.Mvvm;
- using SASDesktop.Models;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- namespace SASDesktop.ViewModels.Transport
- {
- class List : BindableBase
- {
- public System.Collections.Generic.List<Models.Transport> TransportList { get; set; }
- public DelegateCommand AddCmd { get; set; }
- public DelegateCommand EditCmd { get; set; }
- public DelegateCommand DeleteCmd { get; set; }
- public DelegateCommand BackCmd { get; set; }
- public List()
- {
- var db = new Models.SASEntities();
- TransportList = new System.Collections.Generic.List<Models.Transport>(db.Transports);
- AddCmd = new DelegateCommand(AddExecuted);
- EditCmd = new DelegateCommand(EditExecuted);
- DeleteCmd = new DelegateCommand(DeleteExecuted);
- BackCmd = new DelegateCommand(BackExecuted);
- }
- public void AddExecuted()
- {
- Navigation.ToTransportCreateExecuted();
- }
-
- public void EditExecuted()
- {
- Popups.NotImplementedSorry();
- }
- public void DeleteExecuted()
- {
- Popups.NotImplementedSorry();
- }
- public void BackExecuted()
- {
- Navigation.GoBack();
- }
- }
- }
|