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

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.date = query.GetFieldData(block.GetBlockName(), "date", 0).TrimEnd('?');                 // char 8
                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 XQt1633OutBlock GetBlock()
        {
            XQt1633OutBlock instance = XQt1633OutBlock.FromQuery(this);

            return(instance);
        }