public static IEnumerable <QuerySucceededOrderResult> ExtractFrom(TabulateData data)
        {
            if (columnIndices == null)
            {
                columnIndices = columns.Select(c => data.GetColumnIndex(c)).ToArray();
            }

            var subData = data.GetSubColumns(columnIndices);

            foreach (var row in subData.Rows)
            {
                QuerySucceededOrderResult result = new QuerySucceededOrderResult();

                int index = 0;
                result.OrderNo      = int.Parse(row[index++]);
                result.DealNo       = int.Parse(row[index++]);
                result.DealTime     = row[index++];
                result.SecurityCode = row[index++];
                result.SecurityName = row[index++];
                result.BuySellFlag  = row[index++];
                result.DealPrice    = TradingHelper.SafeParseFloat(row[index++]);
                result.DealVolume   = TradingHelper.SafeParseFloat(row[index++]);
                result.DealAmount   = TradingHelper.SafeParseFloat(row[index++]);

                yield return(result);
            }
        }
        public IEnumerable <QuerySucceededOrderResult> QuerySucceededOrderHistory(DateTime startDate, DateTime endDate, out string error)
        {
            TabulateData data;

            if (!QueryHistoryData(HistoryDataCategory.OrderSucceededInHistory, startDate, endDate, out data, out error))
            {
                return(null);
            }

            return(QuerySucceededOrderResult.ExtractFrom(data));
        }
        public IEnumerable <QuerySucceededOrderResult> QuerySucceededOrderToday(out string error)
        {
            TabulateData data;

            if (!QueryData(DataCategory.OrderSucceededToday, out data, out error))
            {
                return(new List <QuerySucceededOrderResult>());
            }

            return(QuerySucceededOrderResult.ExtractFrom(data));
        }