示例#1
0
        public static XQCEXAT11300OutBlock2 FromQuery(XQCEXAT11300 query)
        {
            XQCEXAT11300OutBlock2 block = new XQCEXAT11300OutBlock2();

            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 XQCEXAT11300OutBlock2 GetBlock2()
        {
            XQCEXAT11300OutBlock2 instance = XQCEXAT11300OutBlock2.FromQuery(this);

            return(instance);
        }