Beispiel #1
0
        /// <summary>
        /// 将数据导出到成交表(TradeTable)中。
        /// </summary>
        public virtual void Export2TradeTable(DbDataReader reader, IExportCallback callback, IExport2TradeTable tradeService)
        {
            if (reader == null)
                return;
            TradeTable tradeTable = new TradeTable();
            if (!tradeTable.Open())
                return;

            while (reader.Read())
            {
                if (this.TheProject.HasStop)
                {
                    tradeService.ImportState = EImportStatus.Interrupt;
                    break;
                }

                TradeRow data = tradeService.GetTradeRow(reader);
                tradeTable.Add(data);
                callback.CurrentIndex++;
                callback.ValidIndex++;
            }

            tradeTable.Close();
        }