Exemplo n.º 1
0
        public static XQCSPAT00800OutBlock2 FromQuery(XQCSPAT00800 query)
        {
            XQCSPAT00800OutBlock2 block = new XQCSPAT00800OutBlock2();

            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.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.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);
        }
Exemplo n.º 2
0
        public XQCSPAT00800OutBlock2 GetBlock2()
        {
            XQCSPAT00800OutBlock2 instance = XQCSPAT00800OutBlock2.FromQuery(this);

            return(instance);
        }