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

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.mdvolume = query.GetFieldData(block.GetBlockName(), "mdvolume", 0).ParseLong("mdvolume");                 // long 8
                block.mdchecnt = query.GetFieldData(block.GetBlockName(), "mdchecnt", 0).ParseLong("mdchecnt");                 // long 8
                block.msvolume = query.GetFieldData(block.GetBlockName(), "msvolume", 0).ParseLong("msvolume");                 // long 8
                block.mschecnt = query.GetFieldData(block.GetBlockName(), "mschecnt", 0).ParseLong("mschecnt");                 // long 8
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Пример #2
0
        public XQt2210OutBlock GetBlock()
        {
            XQt2210OutBlock instance = XQt2210OutBlock.FromQuery(this);

            return(instance);
        }