示例#1
0
 private void dgridOpenOrders_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex < 0)
     {
         return;
     }
     if (gvMyOpenOrders.Column(e.ColumnIndex).Name == "delete")
     {
         string orderid = (string)gvMyOpenOrders.CellValue("openUuid", e.RowIndex);
         dgridOpenOrders.Rows.Remove(dgridOpenOrders.Rows[e.RowIndex]);
         tradeLogic.CancellMyOrder(new OpenOrder()
         {
             openUuid = orderid
         }, CancellOrder_UIResultHandler);
         UpdateMyOpenOrders();
     }
 }
示例#2
0
        public void buttonCancellAllOrders_UIResultHandler(RequestItemGroup resultResponse)
        {
            if (Helper.IsResultHasErrors(resultResponse))
            {
                return;
            }
            List <OpenOrder> myOpenOrders = (List <OpenOrder>)resultResponse.items[0].result.resultData;

            foreach (OpenOrder order in myOpenOrders)
            {
                tradeLogic.CancellMyOrder(order, CancellOrder_UIResultHandler);
                break;
            }
        }