Beispiel #1
0
        public static XQt1537OutBlock FromQuery(XQt1537 query)
        {
            XQt1537OutBlock block = new XQt1537OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.upcnt  = query.GetFieldData(block.GetBlockName(), "upcnt", 0).ParseLong("upcnt");            // long 4
                block.tmcnt  = query.GetFieldData(block.GetBlockName(), "tmcnt", 0).ParseLong("tmcnt");            // long 4
                block.uprate = query.GetFieldData(block.GetBlockName(), "uprate", 0).ParseLong("uprate");          // long 4
                block.tmname = query.GetFieldData(block.GetBlockName(), "tmname", 0).TrimEnd('?');                 // char 36
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Beispiel #2
0
        public XQt1537OutBlock GetBlock()
        {
            XQt1537OutBlock instance = XQt1537OutBlock.FromQuery(this);

            return(instance);
        }