Beispiel #1
0
        public static XQCEXAQ31100OutBlock2 FromQuery(XQCEXAQ31100 query)
        {
            XQCEXAQ31100OutBlock2 block = new XQCEXAQ31100OutBlock2();

            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.AcntNm     = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                // char 40
                block.BnsplAmt   = query.GetFieldData(block.GetBlockName(), "BnsplAmt", 0).ParseLong("BnsplAmt");     // long 16
                block.AdjstDfamt = query.GetFieldData(block.GetBlockName(), "AdjstDfamt", 0).ParseLong("AdjstDfamt"); // long 16
                block.TotEvalAmt = query.GetFieldData(block.GetBlockName(), "TotEvalAmt", 0).ParseLong("TotEvalAmt"); // long 16
                block.TotPnlAmt  = query.GetFieldData(block.GetBlockName(), "TotPnlAmt", 0).ParseLong("TotPnlAmt");   // long 16
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Beispiel #2
0
        public XQCEXAQ31100OutBlock2 GetBlock2()
        {
            XQCEXAQ31100OutBlock2 instance = XQCEXAQ31100OutBlock2.FromQuery(this);

            return(instance);
        }