Inheritance: CustomsOffice
Example #1
0
        public void SetEntryCustomsOffice(EntryCustomsOffice customsOffice)
        {
            var customsOfficeRequiredStatus = requiredCustomsOffices.Value.GetForTransportRoute(this);

            switch (customsOfficeRequiredStatus)
            {
            case CustomsOffices.EntryAndExit:
            case CustomsOffices.Entry:
                this.EntryCustomsOffice = customsOffice;
                break;

            default:
                throw new InvalidOperationException("Cannot set an entry customs office for Notification " + this.Id
                                                    + ". The Notification only requires the following customs offices: " + customsOfficeRequiredStatus);
            }
        }
        public void SetEntryCustomsOffice(EntryCustomsOffice customsOffice)
        {
            var customsOfficeRequiredStatus = requiredCustomsOffices.Value.GetForTransportRoute(this);

            switch (customsOfficeRequiredStatus)
            {
                case CustomsOffices.EntryAndExit:
                case CustomsOffices.Entry:
                    this.EntryCustomsOffice = customsOffice;
                    break;
                default:
                    throw new InvalidOperationException("Cannot set an entry customs office for Notification " + this.Id
                        + ". The Notification only requires the following customs offices: " + customsOfficeRequiredStatus);
            }
        }