public override void DeleteTreeViewObject() { SubrouteInRouteService service = new SubrouteInRouteService(); service.DeleteSubrouteInRoute(this); service.RemoveRelationShips(this); }
private void RemoveSubrouteFromRoute(SubroutesInRoute subrouteInRoute) { //remove from database SubrouteInRouteService service = new SubrouteInRouteService(); service.DeleteSubrouteInRoute(subrouteInRoute); //remove from overall structure service.RemoveRelationShips(subrouteInRoute); ArrangeSequences(); }
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(); }