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

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.tqty      = query.GetFieldData(block.GetBlockName(), "tqty", 0).ParseLong("tqty");         // long 18
                block.tcheqty   = query.GetFieldData(block.GetBlockName(), "tcheqty", 0).ParseLong("tcheqty");   // long 18
                block.tordrem   = query.GetFieldData(block.GetBlockName(), "tordrem", 0).ParseLong("tordrem");   // long 18
                block.cmss      = query.GetFieldData(block.GetBlockName(), "cmss", 0).ParseLong("cmss");         // long 18
                block.tamt      = query.GetFieldData(block.GetBlockName(), "tamt", 0).ParseLong("tamt");         // long 18
                block.tmdamt    = query.GetFieldData(block.GetBlockName(), "tmdamt", 0).ParseLong("tmdamt");     // long 18
                block.tmsamt    = query.GetFieldData(block.GetBlockName(), "tmsamt", 0).ParseLong("tmsamt");     // long 18
                block.tax       = query.GetFieldData(block.GetBlockName(), "tax", 0).ParseLong("tax");           // long 18
                block.cts_ordno = query.GetFieldData(block.GetBlockName(), "cts_ordno", 0).TrimEnd('?');         // char 10
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
示例#2
0
        public XQt0425OutBlock GetBlock()
        {
            XQt0425OutBlock instance = XQt0425OutBlock.FromQuery(this);

            return(instance);
        }