示例#1
0
        public static XQFOCCQ33600OutBlock3[] ListFromQuery(XQFOCCQ33600 query)
        {
            int count = query.GetBlockCount(XQFOCCQ33600OutBlock3.BlockName);
            List <XQFOCCQ33600OutBlock3> list = new List <XQFOCCQ33600OutBlock3>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQFOCCQ33600OutBlock3 block = new XQFOCCQ33600OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.BaseDt           = query.GetFieldData(block.GetBlockName(), "BaseDt", i).TrimEnd('?');                            // char 8
                    block.FdEvalAmt        = query.GetFieldData(block.GetBlockName(), "FdEvalAmt", i).ParseLong("FdEvalAmt");               // long 19
                    block.EotEvalAmt       = query.GetFieldData(block.GetBlockName(), "EotEvalAmt", i).ParseLong("EotEvalAmt");             // long 19
                    block.InvstAvrbalPramt = query.GetFieldData(block.GetBlockName(), "InvstAvrbalPramt", i).ParseLong("InvstAvrbalPramt"); // long 16
                    block.BnsctrAmt        = query.GetFieldData(block.GetBlockName(), "BnsctrAmt", i).ParseLong("BnsctrAmt");               // long 16
                    block.MnyinSecinAmt    = query.GetFieldData(block.GetBlockName(), "MnyinSecinAmt", i).ParseLong("MnyinSecinAmt");       // long 16
                    block.MnyoutSecoutAmt  = query.GetFieldData(block.GetBlockName(), "MnyoutSecoutAmt", i).ParseLong("MnyoutSecoutAmt");   // long 16
                    block.EvalPnlAmt       = query.GetFieldData(block.GetBlockName(), "EvalPnlAmt", i).ParseLong("EvalPnlAmt");             // long 16
                    block.TermErnrat       = query.GetFieldData(block.GetBlockName(), "TermErnrat", i).ParseDouble("TermErnrat");           // double 11.3
                    block.Idx = query.GetFieldData(block.GetBlockName(), "Idx", i).ParseDouble("Idx");                                      // double 13.2
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }
示例#2
0
        public static XQFOCCQ33600OutBlock2 FromQuery(XQFOCCQ33600 query)
        {
            XQFOCCQ33600OutBlock2 block = new XQFOCCQ33600OutBlock2();

            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.BnsctrAmt        = query.GetFieldData(block.GetBlockName(), "BnsctrAmt", 0).ParseLong("BnsctrAmt");               // long 16
                block.MnyinAmt         = query.GetFieldData(block.GetBlockName(), "MnyinAmt", 0).ParseLong("MnyinAmt");                 // long 16
                block.MnyoutAmt        = query.GetFieldData(block.GetBlockName(), "MnyoutAmt", 0).ParseLong("MnyoutAmt");               // long 16
                block.InvstAvrbalPramt = query.GetFieldData(block.GetBlockName(), "InvstAvrbalPramt", 0).ParseLong("InvstAvrbalPramt"); // long 16
                block.InvstPlAmt       = query.GetFieldData(block.GetBlockName(), "InvstPlAmt", 0).ParseLong("InvstPlAmt");             // long 16
                block.InvstErnrat      = query.GetFieldData(block.GetBlockName(), "InvstErnrat", 0).ParseDouble("InvstErnrat");         // double 9.2
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
示例#3
0
        public static XQFOCCQ33600OutBlock1 FromQuery(XQFOCCQ33600 query)
        {
            XQFOCCQ33600OutBlock1 block = new XQFOCCQ33600OutBlock1();

            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.TermTp   = query.GetFieldData(block.GetBlockName(), "TermTp", 0).FirstOrDefault();     // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }