Beispiel #1
0
        public static StopView ToDomainView(this StopEntityView stop)
        {
            if (stop != null)
            {
                StopView stopView = new StopView
                {
                    StopId = stop.StopId,
                    City   = stop.City,
                    Name   = stop.Name,

                    Duration      = stop.Duration,
                    ArrivalTime   = stop.ArrivalTime,
                    DepartureTime = stop.DepartureTime
                };

                List <Route> routes = new List <Route>();
                for (int i = 0; i < stop.Routes.Count; i++)
                {
                    Route routeView = stop.Routes[i].ToDomain();
                    routes.Add(routeView);
                }
                stopView.Routes = routes;
                return(stopView);
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
 internal void Stop2View_Click(object sender, EventArgs e)
 {
     if (sender == null)
     {
         this.stopViewManager2.StopViews.CheckControlAndUncheckAllOthers(null);
         this.Stop1View_Click(this.selectedStopViewA, e);
         return;
     }
     this.selectedStopViewB = sender as StopView;
     this.stopViewManager2.StopViews.CheckControlAndUncheckAllOthers(this.selectedStopViewB);
     this.Stop1View_Click(this.selectedStopViewA, e);
 }
Beispiel #3
0
        public IList <StopView> GetStops()
        {
            IList <StopEntityView> stops     = _stopRepository.GetAllStops();
            IList <StopView>       stopViews = new List <StopView>();

            foreach (StopEntityView wagonEntity in stops)
            {
                StopView wagon = wagonEntity.ToDomainView();
                stopViews.Add(wagon);
            }
            return(stopViews);
        }
Beispiel #4
0
        public StopView GetStopView(int id)
        {
            StopView stops = _stopRepository.GetStopEntityView(id).ToDomainView();

            return(stops);
        }