public static XQt8404OutBlock FromQuery(XQt8404 query) { XQt8404OutBlock block = new XQt8404OutBlock(); block.IsValidData = true; block.InvalidReason = ""; if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { block.IsValidData = false; block.InvalidReason = query.ReceiveMessage; return(block); } try { block.cts_time = query.GetFieldData(block.GetBlockName(), "cts_time", 0).TrimEnd('?'); // char 10 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQt8404OutBlock GetBlock() { XQt8404OutBlock instance = XQt8404OutBlock.FromQuery(this); return(instance); }