Exemple #1
0
 /// <remarks/>
 public void PlaceOrdersNoReceiptAsync(PlaceOrdersNoReceiptRequest placeOrdersNoReceiptRequest, object userState) {
     if ((this.PlaceOrdersNoReceiptOperationCompleted == null)) {
         this.PlaceOrdersNoReceiptOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPlaceOrdersNoReceiptOperationCompleted);
     }
     this.InvokeAsync("PlaceOrdersNoReceipt", new object[] {
                 placeOrdersNoReceiptRequest}, this.PlaceOrdersNoReceiptOperationCompleted, userState);
 }
Exemple #2
0
 /// <remarks/>
 public void PlaceOrdersNoReceiptAsync(PlaceOrdersNoReceiptRequest placeOrdersNoReceiptRequest) {
     this.PlaceOrdersNoReceiptAsync(placeOrdersNoReceiptRequest, null);
 }
Exemple #3
0
 /// <remarks/>
 public System.IAsyncResult BeginPlaceOrdersNoReceipt(PlaceOrdersNoReceiptRequest placeOrdersNoReceiptRequest, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("PlaceOrdersNoReceipt", new object[] {
                 placeOrdersNoReceiptRequest}, callback, asyncState);
 }
Exemple #4
0
 public PlaceOrdersNoReceiptResponse PlaceOrdersNoReceipt(PlaceOrdersNoReceiptRequest placeOrdersNoReceiptRequest) {
     object[] results = this.Invoke("PlaceOrdersNoReceipt", new object[] {
                 placeOrdersNoReceiptRequest});
     return ((PlaceOrdersNoReceiptResponse)(results[0]));
 }
        public long[] PlaceOrdersNoReceipt(DataTable betsToPlaceData, bool wantAllOrNothing, byte withdrawSeqNo)
        {
            // First, put together collection of orders.
            SimpleOrderRequest[] orders = new SimpleOrderRequest[betsToPlaceData.Rows.Count];

            int counter = 0;
            foreach (DataRow thisBetRow in betsToPlaceData.Rows)
            {
                SimpleOrderRequest thisOrder = new SimpleOrderRequest();

                thisOrder.SelectionId = long.Parse(thisBetRow["Selection Id"].ToString());
                thisOrder.Polarity = byte.Parse(thisBetRow["Polarity"].ToString());
                thisOrder.Stake = decimal.Parse(thisBetRow["Amount"].ToString());
                thisOrder.Price = decimal.Parse(thisBetRow["Odds"].ToString());
                thisOrder.ExpectedSelectionResetCount = byte.Parse(thisBetRow["ResetCount"].ToString());
                thisOrder.ExpectedWithdrawalSequenceNumber = withdrawSeqNo;

                orders[counter++] = thisOrder;
            }

            // Add the orders to the request object.
            PlaceOrdersNoReceiptRequest request = new PlaceOrdersNoReceiptRequest();
            request.Orders = orders;
            request.WantAllOrNothingBehaviour = wantAllOrNothing;

            // Finally, call the API and return the results if successful.
            PlaceOrdersNoReceiptResponse response = _proxy.PlaceOrdersNoReceipt(request);
            if (response.ReturnStatus.Code != 0)
                throw new Exception(response.ReturnStatus.Description);

            return response.OrderHandles;
        }
        public long[] PlaceOrdersNoReceipt(long selectionId, byte polarity, decimal amount
			, decimal odds, byte resetCount)
        {
            SimpleOrderRequest order = new SimpleOrderRequest();
            order.SelectionId = selectionId;
            order.Polarity = polarity;
            order.Stake = amount;
            order.Price = odds;
            order.ExpectedSelectionResetCount = resetCount;

            PlaceOrdersNoReceiptRequest request = new PlaceOrdersNoReceiptRequest();
            request.Orders = new SimpleOrderRequest[1] {order};

            PlaceOrdersNoReceiptResponse response = _proxy.PlaceOrdersNoReceipt(request);
            if (response.ReturnStatus.Code != 0)
                throw new Exception(response.ReturnStatus.Description);

            return response.OrderHandles;
        }