Exemplo n.º 1
0
 private void AddStateOfImportIds(Draft.StateOfImport stateOfImport, TransportRouteIdContainer idContainer)
 {
     if (stateOfImport != null)
     {
         idContainer.AddCompetentAuthority(stateOfImport.CompetentAuthorityId);
         idContainer.AddEntryOrExitPoint(stateOfImport.EntryPointId);
     }
 }
Exemplo n.º 2
0
        private StateOfImport GenerateStateOfImport(Draft.StateOfImport stateOfImport,
                                                    TransportRouteLookups lookups)
        {
            var returnValue = new StateOfImport();

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

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

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

            return(returnValue);
        }