示例#1
0
        internal override void updateReferencesAfterDeserialize(SFRefereceResolver i_ReferenceResolver, bool i_ShouldAddToRelatedLists = true)
        {
            JToken objectJson = removeObjectJTokenFromAdditionalDictionary("ServiceCrew");

            ServiceCrew = DeserializationUtils.GetSingleObjectReference <ServiceCrew>(ServiceCrewId, objectJson, i_ReferenceResolver);
            if (ServiceCrew != null)
            {
                ServiceCrew.ServiceResources.Add(this);
            }

            DeserializationUtils.ProcessRelatedObjectsCollection(serviceTerritoriesCollection, i_ReferenceResolver);
            ServiceTerritoriesByType     = ServiceTerritories.ToLookup(stm => stm.TerritoryType);
            serviceTerritoriesCollection = null;

            DeserializationUtils.ProcessRelatedObjectsCollection(serviceResourceCapacitiesCollection, i_ReferenceResolver);
            serviceResourceCapacitiesCollection = null;

            DeserializationUtils.ProcessRelatedObjectsCollection(serviceResourceSkillsCollection, i_ReferenceResolver);
            serviceResourceSkillsCollection = null;

            DeserializationUtils.ProcessRelatedObjectsCollection(serviceCrewMembersCollection, i_ReferenceResolver);
            serviceCrewMembersCollection = null;

            DeserializationUtils.ProcessRelatedObjectsCollection(resourceShiftsCollection, i_ReferenceResolver);
            resourceShiftsCollection = null;

            base.updateReferencesAfterDeserialize(i_ReferenceResolver);
        }
 public TerritoriesController(IConfiguration configuration)
 {
     _configuration      = configuration;
     _serviceTerritories = new ServiceTerritories(_configuration);
 }
示例#3
0
 public IEnumerable <ServiceTerritoryMember> GetServiceTerritoryMembersWhichOverlapHorizon(DateTime i_HorizonStart, DateTime?i_HorizonEnd = null)
 {
     return(ServiceTerritories.Where(stm => (stm.TerritoryType != "S" && stm.IsOverlapsHorizon(i_HorizonStart, i_HorizonEnd))).OrderByDescending(stm => stm.TerritoryType));
 }