Esempio n. 1
0
        /// <summary>
        /// This method is used to create an order, exhibitor, and assign a booth at the same time. This a process used for venues and is similar to the process ESC does. It does not rely on the exhibitor
        /// record explicitly. It will create an Exhibitor record if one is not provided, as well as create a booth record if it does not match an existing one.
        /// </summary>
        /// <param name="orgCode">Organization code</param>
        /// <param name="Event">The event ID of the event attached to the order</param>
        /// <param name="orderStatus">This is the user-configurable status code on the order</param>
        /// <param name="accountCode">This should be a single account code</param>
        /// <param name="function">The event ID of the event attached to the order. Must be of type </param>
        /// <param name="billToAccount"></param>
        /// <param name="priceList">The price list code. You can find this on the Price List window in Ungerboeck under the "Code" field (Database column CC715_PRICE_LIST).</param>
        /// <param name="booth">This is a comma seperated list of booths to assign to this order</param>
        /// <param name="exhibitor">The exhibitorID to add this order to. This is optional and will be used if specified, otherwise we will find an existing exhibitor on the event if they exist,
        ///   or add a new one otherwise</param>
        public ServiceOrdersModel AddOrderWithBooth(string orgCode, int Event, string orderStatus, string accountCode, int function, string billToAccount, string priceList, string booth, int exhibitor = 0)
        {
            var myServiceOrder = new ServiceOrdersModel
            {
                OrganizationCode = orgCode,
                Event            = Event,
                OrderStatus      = orderStatus,
                Account          = accountCode,
                Function         = function,
                BillToAccount    = billToAccount,
                PriceList        = priceList,
                BoothNumber      = booth,
                Exhibitor        = exhibitor,
            };

            if (!string.IsNullOrEmpty(booth))
            {
                // Adding a booth will flag the order as a booth order automatically, but we will be explicit
                myServiceOrder.BoothOrder = "Y";
            }

            return(APIUtil.AddServiceOrder(USISDKClient, myServiceOrder));
        }