GetEntryOrExitPoint() public method

public GetEntryOrExitPoint ( System.Guid id ) : EntryOrExitPoint
id System.Guid
return EntryOrExitPoint
示例#1
0
        private TransitState GenerateTransitState(Draft.TransitState transitState, TransportRouteLookups lookups)
        {
            var returnValue = new TransitState();

            if (transitState.CompetentAuthorityId.HasValue)
            {
                var competentAuthority = lookups.GetCompetentAuthority(transitState.CompetentAuthorityId);

                returnValue.CompetentAuthorityCode = competentAuthority.Code;
                returnValue.CompetentAuthorityName = competentAuthority.Name;
            }

            if (transitState.CountryId.HasValue)
            {
                returnValue.CountryName = lookups.GetCountry(transitState.CountryId).Name;
            }

            if (transitState.EntryPointId.HasValue)
            {
                returnValue.EntryPointName = lookups.GetEntryOrExitPoint(transitState.EntryPointId).Name;
            }

            if (transitState.ExitPointId.HasValue)
            {
                returnValue.ExitPointName = lookups.GetEntryOrExitPoint(transitState.ExitPointId).Name;
            }

            return(returnValue);
        }
示例#2
0
        private StateOfExport GenerateStateOfExport(Draft.StateOfExport stateOfExport,
                                                    TransportRouteLookups lookups)
        {
            var returnValue = new StateOfExport();

            if (stateOfExport.CompetentAuthorityId.HasValue)
            {
                var competentAuthority = lookups.GetCompetentAuthority(stateOfExport.CompetentAuthorityId);

                returnValue.CompetentAuthorityName = competentAuthority.Name;
                returnValue.CompetentAuthorityCode = competentAuthority.Code;
            }

            if (stateOfExport.CountryId.HasValue)
            {
                returnValue.CountryName = lookups.GetCountry(stateOfExport.CountryId).Name;
            }

            if (stateOfExport.ExitPointId.HasValue)
            {
                returnValue.ExitPointName = lookups.GetEntryOrExitPoint(stateOfExport.ExitPointId).Name;
            }

            return(returnValue);
        }
        private StateOfExport GenerateStateOfExport(Draft.StateOfExport stateOfExport,
            TransportRouteLookups lookups)
        {
            var returnValue = new StateOfExport();

            if (stateOfExport.CompetentAuthorityId.HasValue)
            {
                var competentAuthority = lookups.GetCompetentAuthority(stateOfExport.CompetentAuthorityId);

                returnValue.CompetentAuthorityName = competentAuthority.Name;
                returnValue.CompetentAuthorityCode = competentAuthority.Code;
            }

            if (stateOfExport.CountryId.HasValue)
            {
                returnValue.CountryName = lookups.GetCountry(stateOfExport.CountryId).Name;
            }

            if (stateOfExport.ExitPointId.HasValue)
            {
                returnValue.ExitPointName = lookups.GetEntryOrExitPoint(stateOfExport.ExitPointId).Name;
            }

            return returnValue;
        }
        private TransitState GenerateTransitState(Draft.TransitState transitState, TransportRouteLookups lookups)
        {
            var returnValue = new TransitState();

            if (transitState.CompetentAuthorityId.HasValue)
            {
                var competentAuthority = lookups.GetCompetentAuthority(transitState.CompetentAuthorityId);

                returnValue.CompetentAuthorityCode = competentAuthority.Code;
                returnValue.CompetentAuthorityName = competentAuthority.Name;
            }

            if (transitState.CountryId.HasValue)
            {
                returnValue.CountryName = lookups.GetCountry(transitState.CountryId).Name;
            }

            if (transitState.EntryPointId.HasValue)
            {
                returnValue.EntryPointName = lookups.GetEntryOrExitPoint(transitState.EntryPointId).Name;
            }

            if (transitState.ExitPointId.HasValue)
            {
                returnValue.ExitPointName = lookups.GetEntryOrExitPoint(transitState.ExitPointId).Name;
            }

            return returnValue;
        }