Exemple #1
0
        public static XQCEXAQ21100OutBlock3[] ListFromQuery(XQCEXAQ21100 query)
        {
            int count = query.GetBlockCount(XQCEXAQ21100OutBlock3.BlockName);
            List <XQCEXAQ21100OutBlock3> list = new List <XQCEXAQ21100OutBlock3>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQCEXAQ21100OutBlock3 block = new XQCEXAQ21100OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.AcntNo1          = query.GetFieldData(block.GetBlockName(), "AcntNo1", i).TrimEnd('?');                 // char 20
                    block.OrdDt            = query.GetFieldData(block.GetBlockName(), "OrdDt", i).TrimEnd('?');                   // char 8
                    block.OrdNo            = query.GetFieldData(block.GetBlockName(), "OrdNo", i).ParseLong("OrdNo");             // long 10
                    block.OrgOrdNo         = query.GetFieldData(block.GetBlockName(), "OrgOrdNo", i).ParseLong("OrgOrdNo");       // long 10
                    block.OrdTime          = query.GetFieldData(block.GetBlockName(), "OrdTime", i).TrimEnd('?');                 // char 9
                    block.FnoIsuNo         = query.GetFieldData(block.GetBlockName(), "FnoIsuNo", i).TrimEnd('?');                // char 12
                    block.IsuNm            = query.GetFieldData(block.GetBlockName(), "IsuNm", i).TrimEnd('?');                   // char 40
                    block.BnsTpNm          = query.GetFieldData(block.GetBlockName(), "BnsTpNm", i).TrimEnd('?');                 // char 10
                    block.BnsTpCode        = query.GetFieldData(block.GetBlockName(), "BnsTpCode", i).FirstOrDefault();           // char 1
                    block.MrcTpNm          = query.GetFieldData(block.GetBlockName(), "MrcTpNm", i).TrimEnd('?');                 // char 10
                    block.ErxPrcCndiTpCode = query.GetFieldData(block.GetBlockName(), "ErxPrcCndiTpCode", i).FirstOrDefault();    // char 1
                    block.FnoOrdprcPtnNm   = query.GetFieldData(block.GetBlockName(), "FnoOrdprcPtnNm", i).TrimEnd('?');          // char 40
                    block.OrdCndiPrc       = query.GetFieldData(block.GetBlockName(), "OrdCndiPrc", i).ParseDouble("OrdCndiPrc"); // double 25.8
                    block.OrdPrc           = query.GetFieldData(block.GetBlockName(), "OrdPrc", i).ParseDouble("OrdPrc");         // double 13.2
                    block.OrdQty           = query.GetFieldData(block.GetBlockName(), "OrdQty", i).ParseLong("OrdQty");           // long 16
                    block.OrdTpNm          = query.GetFieldData(block.GetBlockName(), "OrdTpNm", i).TrimEnd('?');                 // char 10
                    block.ExecPrc          = query.GetFieldData(block.GetBlockName(), "ExecPrc", i).ParseDouble("ExecPrc");       // double 13.2
                    block.ExecQty          = query.GetFieldData(block.GetBlockName(), "ExecQty", i).ParseLong("ExecQty");         // long 16
                    block.UnercQty         = query.GetFieldData(block.GetBlockName(), "UnercQty", i).ParseLong("UnercQty");       // long 16
                    block.CommdaCode       = query.GetFieldData(block.GetBlockName(), "CommdaCode", i).TrimEnd('?');              // char 2
                    block.CommdaNm         = query.GetFieldData(block.GetBlockName(), "CommdaNm", i).TrimEnd('?');                // char 40
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
Exemple #2
0
 public XQCEXAQ21100OutBlock3[] GetBlock3s()
 {
     XQCEXAQ21100OutBlock3[] instance = XQCEXAQ21100OutBlock3.ListFromQuery(this);
     return(instance);
 }