GetCountry() public method

public GetCountry ( System.Guid id ) : Domain.Country
id System.Guid
return Domain.Country
Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
        }
        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;
        }