Exemplo n.º 1
0
        public object Clone()
        {
            var route = new RouteModel()
            {
                Id   = Id,
                Mark = Mark,
                Name = Name
            };

            route.RailwayStations = new ObservableCollection <RailwayStationModel>(RailwayStations);
            return(route);
        }
Exemplo n.º 2
0
        public async Task ExecuteAsync()
        {
            _oldRoute = await _routeService.GetRouteAsync(_newRoute.Id);

            await _routeService.UpdateRouteAsync(_newRoute);
        }
Exemplo n.º 3
0
 public AddRouteCommand(IRouteService routeService, RouteModel routeModel)
 {
     _routeService = routeService;
     _routeModel   = routeModel.Clone() as RouteModel;
 }
Exemplo n.º 4
0
 public EditRouteCommand(IRouteService routeService, RouteModel newRoute)
 {
     _routeService = routeService;
     _newRoute     = newRoute.Clone() as RouteModel;
 }
Exemplo n.º 5
0
 public RemoveRouteCommand(IRouteService routeService, RouteModel route)
 {
     _routeService = routeService;
     _route        = route;
 }