Exemple #1
0
        public static XQCCEAQ01100OutBlock2 FromQuery(XQCCEAQ01100 query)
        {
            XQCCEAQ01100OutBlock2 block = new XQCCEAQ01100OutBlock2();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.RecCnt        = query.GetFieldData(block.GetBlockName(), "RecCnt", 0).ParseLong("RecCnt");               // long 5
                block.AcntNm        = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                      // char 40
                block.BnsplAmt      = query.GetFieldData(block.GetBlockName(), "BnsplAmt", 0).ParseLong("BnsplAmt");           // long 16
                block.FnoCtrctAmt   = query.GetFieldData(block.GetBlockName(), "FnoCtrctAmt", 0).ParseLong("FnoCtrctAmt");     // long 16
                block.CmsnAmtSumAmt = query.GetFieldData(block.GetBlockName(), "CmsnAmtSumAmt", 0).ParseLong("CmsnAmtSumAmt"); // long 16
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemple #2
0
        public static XQCCEAQ01100OutBlock1 FromQuery(XQCCEAQ01100 query)
        {
            XQCCEAQ01100OutBlock1 block = new XQCCEAQ01100OutBlock1();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.RecCnt     = query.GetFieldData(block.GetBlockName(), "RecCnt", 0).ParseLong("RecCnt");  // long 5
                block.AcntNo     = query.GetFieldData(block.GetBlockName(), "AcntNo", 0).TrimEnd('?');         // char 20
                block.Pwd        = query.GetFieldData(block.GetBlockName(), "Pwd", 0).TrimEnd('?');            // char 8
                block.QrySrtDt   = query.GetFieldData(block.GetBlockName(), "QrySrtDt", 0).TrimEnd('?');       // char 8
                block.QryEndDt   = query.GetFieldData(block.GetBlockName(), "QryEndDt", 0).TrimEnd('?');       // char 8
                block.StnlnSeqTp = query.GetFieldData(block.GetBlockName(), "StnlnSeqTp", 0).FirstOrDefault(); // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemple #3
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());
        }