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

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQCCEAQ01100OutBlock3 block = new XQCCEAQ01100OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.BnsDt              = query.GetFieldData(block.GetBlockName(), "BnsDt", i).TrimEnd('?');                                   // char 8
                    block.OrdNo              = query.GetFieldData(block.GetBlockName(), "OrdNo", i).ParseLong("OrdNo");                             // long 10
                    block.CtrctNo            = query.GetFieldData(block.GetBlockName(), "CtrctNo", i).ParseLong("CtrctNo");                         // long 10
                    block.ExecNo             = query.GetFieldData(block.GetBlockName(), "ExecNo", i).ParseLong("ExecNo");                           // long 10
                    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.BgnCtrctIdxExecPrc = query.GetFieldData(block.GetBlockName(), "BgnCtrctIdxExecPrc", i).ParseDouble("BgnCtrctIdxExecPrc"); // double 13.2
                    block.BgnAmt             = query.GetFieldData(block.GetBlockName(), "BgnAmt", i).ParseLong("BgnAmt");                           // long 16
                    block.CtrctQty           = query.GetFieldData(block.GetBlockName(), "CtrctQty", i).ParseLong("CtrctQty");                       // long 16
                    block.ExecPrc            = query.GetFieldData(block.GetBlockName(), "ExecPrc", i).ParseDouble("ExecPrc");                       // double 13.2
                    block.CtrctAmt           = query.GetFieldData(block.GetBlockName(), "CtrctAmt", i).ParseLong("CtrctAmt");                       // long 16
                    block.CmsnAmt            = query.GetFieldData(block.GetBlockName(), "CmsnAmt", i).ParseLong("CmsnAmt");                         // long 16
                    block.BnsplAmt           = query.GetFieldData(block.GetBlockName(), "BnsplAmt", i).ParseLong("BnsplAmt");                       // long 16
                    block.CmsnAddupCode      = query.GetFieldData(block.GetBlockName(), "CmsnAddupCode", i).TrimEnd('?');                           // char 2
                    block.CommdaCodeNm       = query.GetFieldData(block.GetBlockName(), "CommdaCodeNm", i).TrimEnd('?');                            // char 40
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
Пример #2
0
 public XQCCEAQ01100OutBlock3[] GetBlock3s()
 {
     XQCCEAQ01100OutBlock3[] instance = XQCCEAQ01100OutBlock3.ListFromQuery(this);
     return(instance);
 }