Пример #1
0
        public static XQCCEAT00300OutBlock2 FromQuery(XQCCEAT00300 query)
        {
            XQCCEAT00300OutBlock2 block = new XQCCEAT00300OutBlock2();

            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.BrnNm         = query.GetFieldData(block.GetBlockName(), "BrnNm", 0).TrimEnd('?');                       // char 40
                block.AcntNm        = query.GetFieldData(block.GetBlockName(), "AcntNm", 0).TrimEnd('?');                      // char 40
                block.IsuNm         = query.GetFieldData(block.GetBlockName(), "IsuNm", 0).TrimEnd('?');                       // char 50
                block.OrdAbleAmt    = query.GetFieldData(block.GetBlockName(), "OrdAbleAmt", 0).ParseLong("OrdAbleAmt");       // long 16
                block.MnyOrdAbleAmt = query.GetFieldData(block.GetBlockName(), "MnyOrdAbleAmt", 0).ParseLong("MnyOrdAbleAmt"); // long 16
                block.OrdMgn        = query.GetFieldData(block.GetBlockName(), "OrdMgn", 0).ParseLong("OrdMgn");               // long 16
                block.MnyOrdMgn     = query.GetFieldData(block.GetBlockName(), "MnyOrdMgn", 0).ParseLong("MnyOrdMgn");         // long 16
                block.OrdAbleQty    = query.GetFieldData(block.GetBlockName(), "OrdAbleQty", 0).ParseLong("OrdAbleQty");       // long 16
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Пример #2
0
        public static XQCCEAT00300OutBlock1 FromQuery(XQCCEAT00300 query)
        {
            XQCCEAT00300OutBlock1 block = new XQCCEAT00300OutBlock1();

            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.OrdMktCode        = query.GetFieldData(block.GetBlockName(), "OrdMktCode", 0).TrimEnd('?');                // char 2
                block.AcntNo            = query.GetFieldData(block.GetBlockName(), "AcntNo", 0).TrimEnd('?');                    // char 20
                block.Pwd               = query.GetFieldData(block.GetBlockName(), "Pwd", 0).TrimEnd('?');                       // char 8
                block.FnoIsuNo          = query.GetFieldData(block.GetBlockName(), "FnoIsuNo", 0).TrimEnd('?');                  // char 12
                block.FnoOrdPtnCode     = query.GetFieldData(block.GetBlockName(), "FnoOrdPtnCode", 0).TrimEnd('?');             // char 2
                block.OrgOrdNo          = query.GetFieldData(block.GetBlockName(), "OrgOrdNo", 0).ParseLong("OrgOrdNo");         // long 10
                block.CancQty           = query.GetFieldData(block.GetBlockName(), "CancQty", 0).ParseLong("CancQty");           // long 16
                block.CommdaCode        = query.GetFieldData(block.GetBlockName(), "CommdaCode", 0).TrimEnd('?');                // char 2
                block.DscusBnsCmpltTime = query.GetFieldData(block.GetBlockName(), "DscusBnsCmpltTime", 0).TrimEnd('?');         // char 9
                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
                block.MgempNo           = query.GetFieldData(block.GetBlockName(), "MgempNo", 0).TrimEnd('?');                   // char 9
                block.FundId            = query.GetFieldData(block.GetBlockName(), "FundId", 0).TrimEnd('?');                    // char 12
                block.FundOrgOrdNo      = query.GetFieldData(block.GetBlockName(), "FundOrgOrdNo", 0).ParseLong("FundOrgOrdNo"); // long 10
                block.FundOrdNo         = query.GetFieldData(block.GetBlockName(), "FundOrdNo", 0).ParseLong("FundOrdNo");       // long 10
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }