Example #1
0
        public static XQFOCCQ33700OutBlock1 FromQuery(XQFOCCQ33700 query)
        {
            XQFOCCQ33700OutBlock1 block = new XQFOCCQ33700OutBlock1();

            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.BaseAmtTp     = query.GetFieldData(block.GetBlockName(), "BaseAmtTp", 0).FirstOrDefault();     // char 1
                block.QryTermTp     = query.GetFieldData(block.GetBlockName(), "QryTermTp", 0).FirstOrDefault();     // char 1
                block.PnlCalcTpCode = query.GetFieldData(block.GetBlockName(), "PnlCalcTpCode", 0).FirstOrDefault(); // char 1
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Example #2
0
        public static XQFOCCQ33700OutBlock2 FromQuery(XQFOCCQ33700 query)
        {
            XQFOCCQ33700OutBlock2 block = new XQFOCCQ33700OutBlock2();

            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.InAmt               = query.GetFieldData(block.GetBlockName(), "InAmt", 0).ParseLong("InAmt");                             // long 16
                block.OutAmt              = query.GetFieldData(block.GetBlockName(), "OutAmt", 0).ParseLong("OutAmt");                           // long 16
                block.FnoCtrctAmt         = query.GetFieldData(block.GetBlockName(), "FnoCtrctAmt", 0).ParseLong("FnoCtrctAmt");                 // long 16
                block.InvstPramtAvrbalAmt = query.GetFieldData(block.GetBlockName(), "InvstPramtAvrbalAmt", 0).ParseLong("InvstPramtAvrbalAmt"); // long 16
                block.FutsAdjstDfamt      = query.GetFieldData(block.GetBlockName(), "FutsAdjstDfamt", 0).ParseLong("FutsAdjstDfamt");           // long 16
                block.OptBsnPnlAmt        = query.GetFieldData(block.GetBlockName(), "OptBsnPnlAmt", 0).ParseLong("OptBsnPnlAmt");               // long 16
                block.OptEvalPnlAmt       = query.GetFieldData(block.GetBlockName(), "OptEvalPnlAmt", 0).ParseLong("OptEvalPnlAmt");             // long 16
                block.InvstPlAmt          = query.GetFieldData(block.GetBlockName(), "InvstPlAmt", 0).ParseLong("InvstPlAmt");                   // long 16
                block.ErnRat              = query.GetFieldData(block.GetBlockName(), "ErnRat", 0).ParseDouble("ErnRat");                         // double 12.6
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Example #3
0
        public static XQFOCCQ33700OutBlock3[] ListFromQuery(XQFOCCQ33700 query)
        {
            int count = query.GetBlockCount(XQFOCCQ33700OutBlock3.BlockName);
            List <XQFOCCQ33700OutBlock3> list = new List <XQFOCCQ33700OutBlock3>();

            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                return(list.ToArray());
            }
            for (int i = 0; i < count; i++)
            {
                XQFOCCQ33700OutBlock3 block = new XQFOCCQ33700OutBlock3();
                block.IsValidData   = true;
                block.InvalidReason = "";
                try
                {
                    block.TrdDt            = query.GetFieldData(block.GetBlockName(), "TrdDt", i).TrimEnd('?');                             // char 8
                    block.FdDpsastAmt      = query.GetFieldData(block.GetBlockName(), "FdDpsastAmt", i).ParseLong("FdDpsastAmt");           // long 16
                    block.EotDpsastAmt     = query.GetFieldData(block.GetBlockName(), "EotDpsastAmt", i).ParseLong("EotDpsastAmt");         // 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.InvstAvrbalPramt = query.GetFieldData(block.GetBlockName(), "InvstAvrbalPramt", i).ParseLong("InvstAvrbalPramt"); // long 16
                    block.InvstPlAmt       = query.GetFieldData(block.GetBlockName(), "InvstPlAmt", i).ParseLong("InvstPlAmt");             // long 16
                    block.Ernrat           = query.GetFieldData(block.GetBlockName(), "Ernrat", i).ParseDouble("Ernrat");                   // double 12.6
                    block.FnoCtrctAmt      = query.GetFieldData(block.GetBlockName(), "FnoCtrctAmt", i).ParseLong("FnoCtrctAmt");           // long 16
                    block.Trnrat           = query.GetFieldData(block.GetBlockName(), "Trnrat", i).ParseDouble("Trnrat");                   // double 12.6
                    block.FutsAdjstDfamt   = query.GetFieldData(block.GetBlockName(), "FutsAdjstDfamt", i).ParseLong("FutsAdjstDfamt");     // 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
                } catch (InvalidDataFormatException e) {
                    block.IsValidData   = false;
                    block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
                }
                list.Add(block);
            }
            return(list.ToArray());
        }