Ejemplo n.º 1
0
        protected override async void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);
            TimeEvents.SelectedRoute   = RouteDataAccess.GetRouteById(RouteId);
            TimeEvents.SelectedService = ServiceTemplateDataAccess.GetServiceTemplateById(ServiceId);
            TimeEvents.LocationList    = new BindableCollection <LocationModel>(LocationDataAccess.GetAllLocationsPerRoute(RouteId));
            var temp = FullTimeEventDataAccess.GetAllFullTimeEventsPerServiceTemplate(ServiceId)
                       .OrderBy(p => p.Order)
                       .ToList();

            TimeEvents.FilteredFullTimeEventList = new BindableCollection <FullTimeEventModel>(temp);
            TimeEventTypeList = TimeEventTypeDataAccess.GetAllTimeEventTypeStrings();
            NotifyOfPropertyChange(() => TimeEventTypeList);
            NotifyOfPropertyChange(() => TimeEvents);
        }
Ejemplo n.º 2
0
        protected override async void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);
            RouteModel rm = RouteDataAccess.GetRouteById(RouteId);

            ServiceTemplateUI.RouteName = rm.RouteName;
            RouteId = rm.Id;
            ServiceTemplateUI.ServiceTemplateList = new BindableCollection <ServiceTemplateModel>(ServiceTemplateDataAccess.GetServiceTemplatesPerRoute(RouteId));
            ServiceDirectionList = new BindableCollection <ServiceDirectionModel>(ServiceDirectionDataAccess.GetAllServiceDirectionsPerRoute(RouteId));
            ServiceClassList     = ServiceClassDataAccess.GetAllServiceClasses();
            TimeEventTypeList    = TimeEventTypeDataAccess.GetAllTimeEventTypes();
            NotifyOfPropertyChange(() => TimeEventTypeList);
            NotifyOfPropertyChange(() => ServiceClassList);
            NotifyOfPropertyChange(() => ServiceTemplateUI);
            NotifyOfPropertyChange(() => ServiceDirectionList);
        }