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); }
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); }