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

            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);
        }
Exemplo n.º 2
0
        public XQChartExcelOutBlock GetBlock()
        {
            XQChartExcelOutBlock instance = XQChartExcelOutBlock.FromQuery(this);

            return(instance);
        }