コード例 #1
0
        public static XQt2106OutBlock FromQuery(XQt2106 query)
        {
            XQt2106OutBlock block = new XQt2106OutBlock();

            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);
        }
コード例 #2
0
        public XQt2106OutBlock GetBlock()
        {
            XQt2106OutBlock instance = XQt2106OutBlock.FromQuery(this);

            return(instance);
        }