private BComOrderResponse OrderTN()
        {
            // Create an HTTPS_ Interface.
            HTTPS_Interface httpsInterface = new HTTPS_Interface();

            // Create Order Request
            BComOrderRequest request =
                new BComOrderRequest();

            request.Order = new Order();
            request.Order.ExistingTelephoneNumberOrderType =
                new ExistingTelephoneNumberOrderType();
            request.Order.ExistingTelephoneNumberOrderType.TelephoneNumberList =
                new TelephoneNumberList();

            // Generate a pseudo oppid from coid.
            this.oppid = PseudoOppid(coid);

            // Load the request.
            try
            {
                request.Order.CustomerOrderId = this.coid.ToString();
                request.Order.SiteId          = this.siteid.ToString();
                request.Order.PeerId          = this.peerid.ToString();
                request.Order.Name            = Settings.GenerateOrderName(this.oppid, "PCO");
                request.Order.ExistingTelephoneNumberOrderType.TelephoneNumberList.Add(TN);
                request.Order.PartialAllowed = "true"; // Set to true to allow error messages.
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Failed creating order from details: " + ex.Message);
            }

            // Send the request and get the response.
            BComOrderResponse response =
                httpsInterface.OrderTNs(request);

            // Do not update NativeOrders here as the TN needs to be extracted.
            // Instead make a copy of the requests raw xml.
            this.requestXML = request.ToXml();

            // Return the response.
            return(response);
        }
        private BComOrderResponse OrderTN(DataTable aviatorData)
        {
            // Create an HTTPS_ Interface.
            HTTPS_Interface httpsInterface = new HTTPS_Interface();

            // Create SipPeer Request
            BComOrderRequest request =
                new BComOrderRequest();

            request.Order = new Order();
            request.Order.ExistingTelephoneNumberOrderType =
                new ExistingTelephoneNumberOrderType();

            // Load the request.
            try
            {
                request.Order.CustomerOrderId = this.coid.ToString();
                request.Order.SiteId          = this.siteid.ToString();
                request.Order.PeerId          = this.peerid.ToString();
                request.Order.Name            = Settings.GenerateOrderName(
                    aviatorData.Rows[0]["oppid"].SafeToString(), "OMNL");
                for (int i = 0; i < aviatorData.Rows.Count; i++)
                {
                    request.Order.ExistingTelephoneNumberOrderType.TelephoneNumberList.Add(aviatorData.Rows[i]["TN"].ToString());
                }
                request.Order.PartialAllowed = "true"; // Set to true to allow error messages.
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Failed loading Aviator data into order: " + ex.Message);
            }

            // Send the request and get the response.
            BComOrderResponse response =
                httpsInterface.OrderTNs(request);

            // Do not update NativeOrders here as the TN needs to be extracted.
            // Instead make a copy of the requests raw xml.
            this.requestXML = request.ToXml();

            // Return the response.
            return(response);
        }
示例#3
0
        private BComOrderResponse OrderTN(DataRow aviatorData)
        {
            // Create an HTTPS_ Interface.
            HTTPS_Interface httpsInterface = new HTTPS_Interface();

            // Create SipPeer Request
            BComOrderRequest request =
                new BComOrderRequest();

            request.Order = new Order();
            request.Order.RateCenterSearchAndOrderType =
                new RateCenterSearchAndOrderType();

            // Load the request.
            try
            {
                request.Order.CustomerOrderId = this.coid.ToString();
                request.Order.SiteId          = this.siteid.ToString();
                request.Order.PeerId          = this.peerid.ToString();
                request.Order.Name            = Settings.GenerateOrderName(
                    aviatorData["oppid"].SafeToString(), "OSNL");
                request.Order.RateCenterSearchAndOrderType.EnableLCA  = "false";
                request.Order.RateCenterSearchAndOrderType.Quantity   = "1";
                request.Order.RateCenterSearchAndOrderType.RateCenter = this.rc;
                request.Order.RateCenterSearchAndOrderType.State      = this.rcState;
                request.Order.PartialAllowed = "true"; // Set to true to allow error messages.
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Failed loading Aviator data into order: " + ex.Message);
            }

            // Send the request and get the response.
            BComOrderResponse response =
                httpsInterface.OrderTNs(request);

            // Do not update NativeOrders here as the TN needs to be extracted.
            // Instead make a copy of the requests raw xml.
            this.requestXML = request.ToXml();

            // Return the response.
            return(response);
        }
示例#4
0
 public BComOrderResponse OrderTNs(BComOrderRequest request)
 {
     return(new HTTPS_Interface().OrderTNs(request));
 }