Ejemplo n.º 1
0
        public static XQCFOEQ82600OutBlock1 FromQuery(XQCFOEQ82600 query)
        {
            XQCFOEQ82600OutBlock1 block = new XQCFOEQ82600OutBlock1();

            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.QryTp            = query.GetFieldData(block.GetBlockName(), "QryTp", 0).FirstOrDefault();            // char 1
                block.StnlnSeqTp       = query.GetFieldData(block.GetBlockName(), "StnlnSeqTp", 0).FirstOrDefault();       // char 1
                block.FnoBalEvalTpCode = query.GetFieldData(block.GetBlockName(), "FnoBalEvalTpCode", 0).FirstOrDefault(); // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Ejemplo n.º 2
0
        public static XQCFOEQ82600OutBlock2 FromQuery(XQCFOEQ82600 query)
        {
            XQCFOEQ82600OutBlock2 block = new XQCFOEQ82600OutBlock2();

            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.FutsAdjstDfamt = query.GetFieldData(block.GetBlockName(), "FutsAdjstDfamt", 0).ParseLong("FutsAdjstDfamt"); // long 16
                block.OptBnsplAmt    = query.GetFieldData(block.GetBlockName(), "OptBnsplAmt", 0).ParseLong("OptBnsplAmt");       // long 16
                block.FnoCmsnAmt     = query.GetFieldData(block.GetBlockName(), "FnoCmsnAmt", 0).ParseLong("FnoCmsnAmt");         // long 16
                block.PnlSumAmt      = query.GetFieldData(block.GetBlockName(), "PnlSumAmt", 0).ParseLong("PnlSumAmt");           // long 16
                block.MnyinSumAmt    = query.GetFieldData(block.GetBlockName(), "MnyinSumAmt", 0).ParseLong("MnyinSumAmt");       // long 16
                block.MnyoutSumAmt   = query.GetFieldData(block.GetBlockName(), "MnyoutSumAmt", 0).ParseLong("MnyoutSumAmt");     // long 16
                block.AcntNm         = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                        // char 40
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Ejemplo n.º 3
0
        public static XQCFOEQ82600OutBlock3[] ListFromQuery(XQCFOEQ82600 query)
        {
            int count = query.GetBlockCount(XQCFOEQ82600OutBlock3.BlockName);
            List <XQCFOEQ82600OutBlock3> list = new List <XQCFOEQ82600OutBlock3>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQCFOEQ82600OutBlock3 block = new XQCFOEQ82600OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.QryDt         = query.GetFieldData(block.GetBlockName(), "QryDt", i).TrimEnd('?');                       // char 8
                    block.DpstgTotamt   = query.GetFieldData(block.GetBlockName(), "DpstgTotamt", i).ParseLong("DpstgTotamt");     // long 16
                    block.DpstgMny      = query.GetFieldData(block.GetBlockName(), "DpstgMny", i).ParseLong("DpstgMny");           // long 16
                    block.FnoMgn        = query.GetFieldData(block.GetBlockName(), "FnoMgn", i).ParseLong("FnoMgn");               // long 16
                    block.FutsPnlAmt    = query.GetFieldData(block.GetBlockName(), "FutsPnlAmt", i).ParseLong("FutsPnlAmt");       // long 16
                    block.OptBsnPnlAmt  = query.GetFieldData(block.GetBlockName(), "OptBsnPnlAmt", i).ParseLong("OptBsnPnlAmt");   // long 16
                    block.OptEvalPnlAmt = query.GetFieldData(block.GetBlockName(), "OptEvalPnlAmt", i).ParseLong("OptEvalPnlAmt"); // long 16
                    block.CmsnAmt       = query.GetFieldData(block.GetBlockName(), "CmsnAmt", i).ParseLong("CmsnAmt");             // long 16
                    block.SumAmt1       = query.GetFieldData(block.GetBlockName(), "SumAmt1", i).ParseLong("SumAmt1");             // long 16
                    block.SumAmt2       = query.GetFieldData(block.GetBlockName(), "SumAmt2", i).ParseLong("SumAmt2");             // long 16
                    block.PnlSumAmt     = query.GetFieldData(block.GetBlockName(), "PnlSumAmt", i).ParseLong("PnlSumAmt");         // long 16
                    block.FutsBuyAmt    = query.GetFieldData(block.GetBlockName(), "FutsBuyAmt", i).ParseLong("FutsBuyAmt");       // long 16
                    block.FutsSellAmt   = query.GetFieldData(block.GetBlockName(), "FutsSellAmt", i).ParseLong("FutsSellAmt");     // long 16
                    block.OptBuyAmt     = query.GetFieldData(block.GetBlockName(), "OptBuyAmt", i).ParseLong("OptBuyAmt");         // long 16
                    block.OptSellAmt    = query.GetFieldData(block.GetBlockName(), "OptSellAmt", i).ParseLong("OptSellAmt");       // long 16
                    block.InAmt         = query.GetFieldData(block.GetBlockName(), "InAmt", i).ParseLong("InAmt");                 // long 16
                    block.OutAmt        = query.GetFieldData(block.GetBlockName(), "OutAmt", i).ParseLong("OutAmt");               // long 16
                    block.EvalAmt       = query.GetFieldData(block.GetBlockName(), "EvalAmt", i).ParseLong("EvalAmt");             // long 16
                    block.AddupEvalAmt  = query.GetFieldData(block.GetBlockName(), "AddupEvalAmt", i).ParseLong("AddupEvalAmt");   // long 16
                    block.Amt2          = query.GetFieldData(block.GetBlockName(), "Amt2", i).ParseLong("Amt2");                   // long 16
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }