private void OF_SpreadCorrectPrice_Click(object sender, EventArgs e) { if (m_UserAccount == "") { MessageBox.Show("請選擇海期帳號"); return; } string strExchangeName; string strStockNo; string strStockNo2; string strYearMonth; string strYearMonth2; int nNewClose; int nTradeType; int nSpecialTradeType; string strOrder; string strOrderNumerator; string strOrderD; //string strTrigger; //string strTriggerNumerator; //int nQty; if (txt_ExchangeNo.Text.Trim() == "") { MessageBox.Show("請輸入原委託交易所代號"); return; } strExchangeName = txt_ExchangeNo.Text.Trim(); if (txt_StockNo1.Text.Trim() == "") { MessageBox.Show("請輸入原委託商品代碼"); return; } strStockNo = txt_StockNo1.Text.Trim(); if (txt_StockNo2.Text.Trim() == "") { MessageBox.Show("請輸入原委託第二腳商品代碼"); return; } strStockNo2 = txt_StockNo2.Text.Trim(); if (txt_YearM1.Text.Trim() == "") { MessageBox.Show("請輸入原委託年月"); return; } strYearMonth = txt_YearM1.Text.Trim(); if (txt_YearM2.Text.Trim() == "") { MessageBox.Show("請輸入原委託第二腳年月"); return; } strYearMonth2 = txt_YearM2.Text.Trim(); double dPrice = 0.0; strOrder = txt_CorrectPrice.Text.Trim(); if (boxSpecialTradeType.SelectedIndex == 0) { if (double.TryParse(txt_CorrectPriceN.Text.Trim(), out dPrice) == false) { MessageBox.Show("委託價分子請輸入數字"); return; } } strOrderNumerator = txt_CorrectPriceN.Text.Trim(); if (boxSpecialTradeType.SelectedIndex == 0) { if (double.TryParse(txt_CorrectPriceD.Text.Trim(), out dPrice) == false) { MessageBox.Show("委託價分母請輸入數字"); return; } } strOrderD = txt_CorrectPriceD.Text.Trim(); if (box_NewClose_1.SelectedIndex < 0) { MessageBox.Show("請選擇原委託倉別"); return; } nNewClose = box_NewClose_1.SelectedIndex; if (box_TradeType_1.SelectedIndex < 0) { MessageBox.Show("請選擇原委託委託條件"); return; } nTradeType = box_TradeType_1.SelectedIndex; if (box_SpecOrderType.SelectedIndex < 0) { MessageBox.Show("請選擇改價後委託類型"); return; } nSpecialTradeType = box_SpecOrderType.SelectedIndex; OVERSEAFUTUREORDERFORGW pOFOrder = new OVERSEAFUTUREORDERFORGW(); pOFOrder.bstrFullAccount = m_UserAccount; pOFOrder.bstrExchangeNo = strExchangeName; pOFOrder.bstrOrderPrice = strOrder; pOFOrder.bstrOrderNumerator = strOrderNumerator; pOFOrder.bstrOrderDenominator = strOrderD; pOFOrder.bstrStockNo = strStockNo; pOFOrder.bstrStockNo2 = strStockNo2; pOFOrder.bstrYearMonth = strYearMonth; pOFOrder.bstrYearMonth2 = strYearMonth2; //pOFOrder.sBuySell = (short)nBuySell; //pOFOrder.sBuySell2 =(short)nBuySell2; //pOFOrder.sDayTrade = (short)nDayTrade; pOFOrder.nNewClose = nNewClose; pOFOrder.nSpecialTradeType = nSpecialTradeType; pOFOrder.nTradeType = nTradeType; pOFOrder.bstrBookNo = txt_BookNo2.Text.Trim(); pOFOrder.bstrSeqNo = txt_SeqNo2.Text.Trim(); if (OnCorrectSpreadOrderByBookSignal != null) { OnCorrectSpreadOrderByBookSignal(m_UserID, true, pOFOrder); } }
private void overseaFutureOrderControl1_OnCorrectOptionOrderByBookSignal(string strLogInID, bool bAsyncOrder, OVERSEAFUTUREORDERFORGW pOrder) { string strMessage = ""; m_nCode = m_pSKOrder.OverSeaOptionCorrectPriceByBookNo(strLogInID, bAsyncOrder, pOrder, out strMessage); WriteMessage("海選依書號改價:" + strMessage); SendReturnMessage("Order", m_nCode, "OverSeaOptionCorrectPriceOrderByBookNo"); }