private void InsertBest5(BEST5 Best5) { if (m_dtBest5Ask.Rows.Count == 0 && m_dtBest5Bid.Rows.Count == 0) { DataRow myDataRow; myDataRow = m_dtBest5Ask.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nAskQty1; myDataRow["m_nAsk"] = Best5.m_nAsk1; m_dtBest5Ask.Rows.Add(myDataRow); myDataRow = m_dtBest5Ask.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nAskQty2; myDataRow["m_nAsk"] = Best5.m_nAsk2; m_dtBest5Ask.Rows.Add(myDataRow); myDataRow = m_dtBest5Ask.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nAskQty3; myDataRow["m_nAsk"] = Best5.m_nAsk3; m_dtBest5Ask.Rows.Add(myDataRow); myDataRow = m_dtBest5Ask.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nAskQty4; myDataRow["m_nAsk"] = Best5.m_nAsk4; m_dtBest5Ask.Rows.Add(myDataRow); myDataRow = m_dtBest5Ask.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nAskQty5; myDataRow["m_nAsk"] = Best5.m_nAsk5; m_dtBest5Ask.Rows.Add(myDataRow); myDataRow = m_dtBest5Bid.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nBidQty1; myDataRow["m_nAsk"] = Best5.m_nBid1 ; m_dtBest5Bid.Rows.Add(myDataRow); myDataRow = m_dtBest5Bid.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nBidQty2; myDataRow["m_nAsk"] = Best5.m_nBid2; m_dtBest5Bid.Rows.Add(myDataRow); myDataRow = m_dtBest5Bid.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nBidQty3; myDataRow["m_nAsk"] = Best5.m_nBid3; m_dtBest5Bid.Rows.Add(myDataRow); myDataRow = m_dtBest5Bid.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nBidQty4; myDataRow["m_nAsk"] = Best5.m_nBid4; m_dtBest5Bid.Rows.Add(myDataRow); myDataRow = m_dtBest5Bid.NewRow(); myDataRow["m_nAskQty"] = Best5.m_nBidQty5; myDataRow["m_nAsk"] = Best5.m_nBid5; m_dtBest5Bid.Rows.Add(myDataRow); } else { m_dtBest5Ask.Rows[0]["m_nAskQty"] = Best5.m_nAskQty1; m_dtBest5Ask.Rows[0]["m_nAsk"] = Best5.m_nAsk1; m_dtBest5Ask.Rows[1]["m_nAskQty"] = Best5.m_nAskQty2; m_dtBest5Ask.Rows[1]["m_nAsk"] = Best5.m_nAsk2; m_dtBest5Ask.Rows[2]["m_nAskQty"] = Best5.m_nAskQty3; m_dtBest5Ask.Rows[2]["m_nAsk"] = Best5.m_nAsk3; m_dtBest5Ask.Rows[3]["m_nAskQty"] = Best5.m_nAskQty4; m_dtBest5Ask.Rows[3]["m_nAsk"] = Best5.m_nAsk4; m_dtBest5Ask.Rows[4]["m_nAskQty"] = Best5.m_nAskQty5; m_dtBest5Ask.Rows[4]["m_nAsk"] = Best5.m_nAsk5; m_dtBest5Bid.Rows[0]["m_nAskQty"] = Best5.m_nBidQty1; m_dtBest5Bid.Rows[0]["m_nAsk"] = Best5.m_nBid1; m_dtBest5Bid.Rows[1]["m_nAskQty"] = Best5.m_nBidQty2; m_dtBest5Bid.Rows[1]["m_nAsk"] = Best5.m_nBid2; m_dtBest5Bid.Rows[2]["m_nAskQty"] = Best5.m_nBidQty3; m_dtBest5Bid.Rows[2]["m_nAsk"] = Best5.m_nBid3; m_dtBest5Bid.Rows[3]["m_nAskQty"] = Best5.m_nBidQty4; m_dtBest5Bid.Rows[3]["m_nAsk"] = Best5.m_nBid4; m_dtBest5Bid.Rows[4]["m_nAskQty"] = Best5.m_nBidQty5; m_dtBest5Bid.Rows[4]["m_nAsk"] = Best5.m_nBid5; } }
public void OnNotifyBest5(BEST5 bfi) { m_best5 = bfi; }