Esempio n. 1
0
        public static XQCSPAT00700OutBlock1 FromQuery(XQCSPAT00700 query)
        {
            XQCSPAT00700OutBlock1 block = new XQCSPAT00700OutBlock1();

            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.OrgOrdNo      = query.GetFieldData(block.GetBlockName(), "OrgOrdNo", 0).ParseLong("OrgOrdNo"); // long 10
                block.AcntNo        = query.GetFieldData(block.GetBlockName(), "AcntNo", 0).TrimEnd('?');            // char 20
                block.InptPwd       = query.GetFieldData(block.GetBlockName(), "InptPwd", 0).TrimEnd('?');           // char 8
                block.IsuNo         = query.GetFieldData(block.GetBlockName(), "IsuNo", 0).TrimEnd('?');             // char 12
                block.OrdQty        = query.GetFieldData(block.GetBlockName(), "OrdQty", 0).ParseLong("OrdQty");     // long 16
                block.OrdprcPtnCode = query.GetFieldData(block.GetBlockName(), "OrdprcPtnCode", 0).TrimEnd('?');     // char 2
                block.OrdCndiTpCode = query.GetFieldData(block.GetBlockName(), "OrdCndiTpCode", 0).FirstOrDefault(); // char 1
                block.OrdPrc        = query.GetFieldData(block.GetBlockName(), "OrdPrc", 0).ParseDouble("OrdPrc");   // double 13.2
                block.CommdaCode    = query.GetFieldData(block.GetBlockName(), "CommdaCode", 0).TrimEnd('?');        // char 2
                block.StrtgCode     = query.GetFieldData(block.GetBlockName(), "StrtgCode", 0).TrimEnd('?');         // char 6
                block.GrpId         = query.GetFieldData(block.GetBlockName(), "GrpId", 0).TrimEnd('?');             // char 20
                block.OrdSeqNo      = query.GetFieldData(block.GetBlockName(), "OrdSeqNo", 0).ParseLong("OrdSeqNo"); // long 10
                block.PtflNo        = query.GetFieldData(block.GetBlockName(), "PtflNo", 0).ParseLong("PtflNo");     // long 10
                block.BskNo         = query.GetFieldData(block.GetBlockName(), "BskNo", 0).ParseLong("BskNo");       // long 10
                block.TrchNo        = query.GetFieldData(block.GetBlockName(), "TrchNo", 0).ParseLong("TrchNo");     // long 10
                block.ItemNo        = query.GetFieldData(block.GetBlockName(), "ItemNo", 0).ParseLong("ItemNo");     // long 10
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Esempio n. 2
0
        public static XQCSPAT00700OutBlock2 FromQuery(XQCSPAT00700 query)
        {
            XQCSPAT00700OutBlock2 block = new XQCSPAT00700OutBlock2();

            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.OrdNo             = query.GetFieldData(block.GetBlockName(), "OrdNo", 0).ParseLong("OrdNo");          // long 10
                block.PrntOrdNo         = query.GetFieldData(block.GetBlockName(), "PrntOrdNo", 0).ParseLong("PrntOrdNo");  // long 10
                block.OrdTime           = query.GetFieldData(block.GetBlockName(), "OrdTime", 0).TrimEnd('?');              // char 9
                block.OrdMktCode        = query.GetFieldData(block.GetBlockName(), "OrdMktCode", 0).TrimEnd('?');           // char 2
                block.OrdPtnCode        = query.GetFieldData(block.GetBlockName(), "OrdPtnCode", 0).TrimEnd('?');           // char 2
                block.ShtnIsuNo         = query.GetFieldData(block.GetBlockName(), "ShtnIsuNo", 0).TrimEnd('?');            // char 9
                block.PrgmOrdprcPtnCode = query.GetFieldData(block.GetBlockName(), "PrgmOrdprcPtnCode", 0).TrimEnd('?');    // char 2
                block.StslOrdprcTpCode  = query.GetFieldData(block.GetBlockName(), "StslOrdprcTpCode", 0).FirstOrDefault(); // char 1
                block.StslAbleYn        = query.GetFieldData(block.GetBlockName(), "StslAbleYn", 0).FirstOrDefault();       // char 1
                block.MgntrnCode        = query.GetFieldData(block.GetBlockName(), "MgntrnCode", 0).TrimEnd('?');           // char 3
                block.LoanDt            = query.GetFieldData(block.GetBlockName(), "LoanDt", 0).TrimEnd('?');               // char 8
                block.CvrgOrdTp         = query.GetFieldData(block.GetBlockName(), "CvrgOrdTp", 0).FirstOrDefault();        // char 1
                block.LpYn        = query.GetFieldData(block.GetBlockName(), "LpYn", 0).FirstOrDefault();                   // char 1
                block.MgempNo     = query.GetFieldData(block.GetBlockName(), "MgempNo", 0).TrimEnd('?');                    // char 9
                block.OrdAmt      = query.GetFieldData(block.GetBlockName(), "OrdAmt", 0).ParseLong("OrdAmt");              // long 16
                block.BnsTpCode   = query.GetFieldData(block.GetBlockName(), "BnsTpCode", 0).FirstOrDefault();              // char 1
                block.SpareOrdNo  = query.GetFieldData(block.GetBlockName(), "SpareOrdNo", 0).ParseLong("SpareOrdNo");      // long 10
                block.CvrgSeqno   = query.GetFieldData(block.GetBlockName(), "CvrgSeqno", 0).ParseLong("CvrgSeqno");        // long 10
                block.RsvOrdNo    = query.GetFieldData(block.GetBlockName(), "RsvOrdNo", 0).ParseLong("RsvOrdNo");          // long 10
                block.MnyOrdAmt   = query.GetFieldData(block.GetBlockName(), "MnyOrdAmt", 0).ParseLong("MnyOrdAmt");        // long 16
                block.SubstOrdAmt = query.GetFieldData(block.GetBlockName(), "SubstOrdAmt", 0).ParseLong("SubstOrdAmt");    // long 16
                block.RuseOrdAmt  = query.GetFieldData(block.GetBlockName(), "RuseOrdAmt", 0).ParseLong("RuseOrdAmt");      // long 16
                block.AcntNm      = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                     // char 40
                block.IsuNm       = query.GetFieldData(block.GetBlockName(), "IsuNm", 0).TrimEnd('?');                      // char 40
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }