Beispiel #1
0
        public static XQt1422OutBlock FromQuery(XQt1422 query)
        {
            XQt1422OutBlock block = new XQt1422OutBlock();

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.cnt = query.GetFieldData(block.GetBlockName(), "cnt", 0).ParseLong("cnt");                 // long 4
                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);
        }
Beispiel #2
0
        public XQt1422OutBlock GetBlock()
        {
            XQt1422OutBlock instance = XQt1422OutBlock.FromQuery(this);

            return(instance);
        }