상속: CustomsOffice
예제 #1
0
        public void SetExitCustomsOffice(ExitCustomsOffice customsOffice)
        {
            var customsOfficeRequiredStatus = requiredCustomsOffices.Value.GetForTransportRoute(this);

            switch (customsOfficeRequiredStatus)
            {
            case CustomsOffices.EntryAndExit:
            case CustomsOffices.Exit:
                this.ExitCustomsOffice = customsOffice;
                break;

            default:
                throw new InvalidOperationException("Cannot set an exit customs office for Notification " + this.Id
                                                    + ". The Notification only requires the following customs offices: " + customsOfficeRequiredStatus);
            }
        }
예제 #2
0
        public void SetExitCustomsOffice(ExitCustomsOffice customsOffice)
        {
            var customsOfficeRequiredStatus = requiredCustomsOffices.Value.GetForTransportRoute(this);

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