Exemplo n.º 1
0
        public static XQt1411OutBlock FromQuery(XQt1411 query)
        {
            XQt1411OutBlock block = new XQt1411OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.jkrate  = query.GetFieldData(block.GetBlockName(), "jkrate", 0).ParseLong("jkrate");       // long 3
                block.sjkrate = query.GetFieldData(block.GetBlockName(), "sjkrate", 0).ParseLong("sjkrate");     // long 3
                block.idx     = query.GetFieldData(block.GetBlockName(), "idx", 0).ParseLong("idx");             // long 4
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemplo n.º 2
0
        public XQt1411OutBlock GetBlock()
        {
            XQt1411OutBlock instance = XQt1411OutBlock.FromQuery(this);

            return(instance);
        }