Inheritance: 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);
            }
        }
        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);
            }
        }