示例#1
0
 public static extern int SKQuoteLib_GetStockByNo(string pStockNo, out STOCK TStock);
示例#2
0
        private void OnUpDateDataRow(STOCK pStock)
        {
            string strStockNo = pStock.m_caStockNo;

            DataRow drFind = m_dtStocks.Rows.Find(strStockNo);

            if (drFind == null)
            {
                try
                {
                    DataRow myDataRow = m_dtStocks.NewRow();

                    myDataRow["m_sStockidx"] = pStock.m_sStockidx;
                    myDataRow["m_sDecimal"]  = pStock.m_sDecimal;
                    myDataRow["m_sTypeNo"]   = pStock.m_sTypeNo;
                    myDataRow["m_cMarketNo"] = pStock.m_cMarketNo;
                    myDataRow["m_caStockNo"] = pStock.m_caStockNo;
                    myDataRow["m_caName"]    = pStock.m_caName;
                    myDataRow["m_nOpen"]     = pStock.m_nOpen / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nHigh"]     = pStock.m_nHigh / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nLow"]      = pStock.m_nLow / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nClose"]    = pStock.m_nClose / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nTickQty"]  = pStock.m_nTickQty;
                    myDataRow["m_nRef"]      = pStock.m_nRef / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nBid"]      = pStock.m_nBid / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nBc"]       = pStock.m_nBc;
                    myDataRow["m_nAsk"]      = pStock.m_nAsk / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nAc"]       = pStock.m_nAc;
                    myDataRow["m_nTBc"]      = pStock.m_nTBc;
                    myDataRow["m_nTAc"]      = pStock.m_nTAc;
                    myDataRow["m_nFutureOI"] = pStock.m_nFutureOI;
                    myDataRow["m_nTQty"]     = pStock.m_nTQty;
                    myDataRow["m_nYQty"]     = pStock.m_nYQty;
                    myDataRow["m_nUp"]       = pStock.m_nUp / (Math.Pow(10, pStock.m_sDecimal));
                    myDataRow["m_nDown"]     = pStock.m_nDown / (Math.Pow(10, pStock.m_sDecimal));

                    m_dtStocks.Rows.Add(myDataRow);
                }
                catch (Exception ex)
                {
                    string msg = ex.Message;
                }
            }
            else
            {
                drFind["m_sStockidx"] = pStock.m_sStockidx;
                drFind["m_sDecimal"]  = pStock.m_sDecimal;
                drFind["m_sTypeNo"]   = pStock.m_sTypeNo;
                drFind["m_cMarketNo"] = pStock.m_cMarketNo;
                drFind["m_caStockNo"] = pStock.m_caStockNo;
                drFind["m_caName"]    = pStock.m_caName;
                drFind["m_nOpen"]     = pStock.m_nOpen / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nHigh"]     = pStock.m_nHigh / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nLow"]      = pStock.m_nLow / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nClose"]    = pStock.m_nClose / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nTickQty"]  = pStock.m_nTickQty;
                drFind["m_nRef"]      = pStock.m_nRef / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nBid"]      = pStock.m_nBid / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nBc"]       = pStock.m_nBc;
                drFind["m_nAsk"]      = pStock.m_nAsk / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nAc"]       = pStock.m_nAc;
                drFind["m_nTBc"]      = pStock.m_nTBc;
                drFind["m_nTAc"]      = pStock.m_nTAc;
                drFind["m_nFutureOI"] = pStock.m_nFutureOI;
                drFind["m_nTQty"]     = pStock.m_nTQty;
                drFind["m_nYQty"]     = pStock.m_nYQty;
                drFind["m_nUp"]       = pStock.m_nUp / (Math.Pow(10, pStock.m_sDecimal));
                drFind["m_nDown"]     = pStock.m_nDown / (Math.Pow(10, pStock.m_sDecimal));
            }
        }
示例#3
0
 public static extern int SKQuoteLib_GetStockByIndex(short sMarketNo, short sIndex, out STOCK TStock);