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

            block.IsValidData   = true;
            block.InvalidReason = "";
            if (query.QueryResult != null && query.QueryResult.IsSystemError == true)
            {
                block.IsValidData   = false;
                block.InvalidReason = query.ReceiveMessage;
                return(block);
            }
            try
            {
                block.nrec = query.GetFieldData(block.GetBlockName(), "nrec", 0).TrimEnd('?');                 // char 2
            } catch (InvalidDataFormatException e) {
                block.IsValidData   = false;
                block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\"";
            }
            return(block);
        }
Exemplo n.º 2
0
        public XQt1104OutBlock GetBlock()
        {
            XQt1104OutBlock instance = XQt1104OutBlock.FromQuery(this);

            return(instance);
        }