Beispiel #1
0
        public override void DeleteTreeViewObject()
        {
            SubrouteInRouteService service = new SubrouteInRouteService();

            service.DeleteSubrouteInRoute(this);
            service.RemoveRelationShips(this);
        }
Beispiel #2
0
        private void RemoveSubrouteFromRoute(SubroutesInRoute subrouteInRoute)
        {
            //remove from database
            SubrouteInRouteService service = new SubrouteInRouteService();

            service.DeleteSubrouteInRoute(subrouteInRoute);

            //remove from overall structure
            service.RemoveRelationShips(subrouteInRoute);

            ArrangeSequences();
        }
Beispiel #3
0
        private void AddSubroutesToSequence(Sequence sequence)
        {
            if (SelectedSubroutes.Count == 0)
            {
                _View.ShowMessage("Select one or multiple routes to add");
                return;
            }


            foreach (Subroute S in SelectedSubroutes)
            {
                //Add to database
                SubrouteInRouteService service         = new SubrouteInRouteService();
                SubroutesInRoute       subrouteInRoute = service.GenerateNewSubrouteInRoute(S, Route, sequence.Id);
                service.CreateSubrouteInRoute(subrouteInRoute);

                //add to overall structure
                service.AddRelationShips(subrouteInRoute, S, Route);
            }

            ArrangeSequences();
        }