Esempio 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);
        }
Esempio n. 2
0
 private void AddStateOfExportIds(Draft.StateOfExport stateOfExport, TransportRouteIdContainer idContainer)
 {
     if (stateOfExport != null)
     {
         idContainer.AddCompetentAuthority(stateOfExport.CompetentAuthorityId);
         idContainer.AddEntryOrExitPoint(stateOfExport.ExitPointId);
     }
 }