Exemple #1
0
        public static XQt1615OutBlock FromQuery(XQt1615 query)
        {
            XQt1615OutBlock block = new XQt1615OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.dwvolume   = query.GetFieldData(block.GetBlockName(), "dwvolume", 0).ParseLong("dwvolume");            // long 12
                block.dwvalue    = query.GetFieldData(block.GetBlockName(), "dwvalue", 0).ParseLong("dwvalue");              // long 12
                block.djvolume   = query.GetFieldData(block.GetBlockName(), "djvolume", 0).ParseLong("djvolume");            // long 12
                block.djvalue    = query.GetFieldData(block.GetBlockName(), "djvalue", 0).ParseLong("djvalue");              // long 12
                block.sum_volume = query.GetFieldData(block.GetBlockName(), "sum_volume", 0).ParseLong("sum_volume");        // long 12
                block.sum_value  = query.GetFieldData(block.GetBlockName(), "sum_value", 0).ParseLong("sum_value");          // long 12
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemple #2
0
        public XQt1615OutBlock GetBlock()
        {
            XQt1615OutBlock instance = XQt1615OutBlock.FromQuery(this);

            return(instance);
        }