Пример #1
0
        public static XQCEXAQ31100OutBlock3[] ListFromQuery(XQCEXAQ31100 query)
        {
            int count = query.GetBlockCount(XQCEXAQ31100OutBlock3.BlockName);
            List <XQCEXAQ31100OutBlock3> list = new List <XQCEXAQ31100OutBlock3>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQCEXAQ31100OutBlock3 block = new XQCEXAQ31100OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.FnoIsuNo    = query.GetFieldData(block.GetBlockName(), "FnoIsuNo", i).TrimEnd('?');                // char 12
                    block.IsuNm       = query.GetFieldData(block.GetBlockName(), "IsuNm", i).TrimEnd('?');                   // char 40
                    block.BnsTpCode   = query.GetFieldData(block.GetBlockName(), "BnsTpCode", i).FirstOrDefault();           // char 1
                    block.BnsTpNm     = query.GetFieldData(block.GetBlockName(), "BnsTpNm", i).TrimEnd('?');                 // char 10
                    block.UnsttQty    = query.GetFieldData(block.GetBlockName(), "UnsttQty", i).ParseLong("UnsttQty");       // long 16
                    block.LqdtAbleQty = query.GetFieldData(block.GetBlockName(), "LqdtAbleQty", i).ParseLong("LqdtAbleQty"); // long 16
                    block.FnoAvrPrc   = query.GetFieldData(block.GetBlockName(), "FnoAvrPrc", i).ParseDouble("FnoAvrPrc");   // double 19.8
                    block.BasePrc     = query.GetFieldData(block.GetBlockName(), "BasePrc", i).ParseDouble("BasePrc");       // double 30.10
                    block.NowPrc      = query.GetFieldData(block.GetBlockName(), "NowPrc", i).ParseDouble("NowPrc");         // double 13.2
                    block.CmpPrc      = query.GetFieldData(block.GetBlockName(), "CmpPrc", i).ParseDouble("CmpPrc");         // double 13.2
                    block.EvalAmt     = query.GetFieldData(block.GetBlockName(), "EvalAmt", i).ParseLong("EvalAmt");         // long 16
                    block.EvalPnl     = query.GetFieldData(block.GetBlockName(), "EvalPnl", i).ParseLong("EvalPnl");         // long 16
                    block.PnlRat      = query.GetFieldData(block.GetBlockName(), "PnlRat", i).ParseDouble("PnlRat");         // double 12.6
                    block.UnsttAmt    = query.GetFieldData(block.GetBlockName(), "UnsttAmt", i).ParseLong("UnsttAmt");       // long 16
                    block.BnsplAmt    = query.GetFieldData(block.GetBlockName(), "BnsplAmt", i).ParseLong("BnsplAmt");       // long 16
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
Пример #2
0
 public XQCEXAQ31100OutBlock3[] GetBlock3s()
 {
     XQCEXAQ31100OutBlock3[] instance = XQCEXAQ31100OutBlock3.ListFromQuery(this);
     return(instance);
 }