public static XQChartIndexOutBlock FromQuery(XQCHARTINDEX query) { XQChartIndexOutBlock block = new XQChartIndexOutBlock(); block.IsValidData = true; block.InvalidReason = ""; if (query.QueryResult != null && query.QueryResult.IsSystemError == true) { block.IsValidData = false; block.InvalidReason = query.ReceiveMessage; return(block); } try { block.indexid = query.GetFieldData(block.GetBlockName(), "indexid", 0).ParseLong("indexid"); // long 10 block.rec_cnt = query.GetFieldData(block.GetBlockName(), "rec_cnt", 0).ParseLong("rec_cnt"); // long 5 block.validdata_cnt = query.GetFieldData(block.GetBlockName(), "validdata_cnt", 0).ParseLong("validdata_cnt"); // long 2 } catch (InvalidDataFormatException e) { block.IsValidData = false; block.InvalidReason = $"FieldName == {e.DataFieldName}, FieldData == \"{e.DataValue}\""; } return(block); }
public XQChartIndexOutBlock GetBlock() { XQChartIndexOutBlock instance = XQChartIndexOutBlock.FromQuery(this); return(instance); }