예제 #1
0
        protected MdQueryResult CreateEmptyResult(MdQuery q)
        {
            var result = new MdQueryResult();

            foreach (var dim in q.Dimensions)
            {
                var dimModel = model.Dimensions.Single(p => p.Name == dim);
                result.Headers.Add(new HeaderCell(dim, dimModel.Caption, dimModel.Type, HeaderType.DimensionHeader));
            }
            foreach (var measure in q.Measures)
            {
                var measureModel = model.Measures.Single(p => p.Name == measure);
                result.Headers.Add(new HeaderCell(measure, measureModel.Caption, measureModel.Type, HeaderType.MeasureHeader));
            }


            return(result);
        }
예제 #2
0
        protected MdQueryResult CreateEmptyResult(MdQuery q)
        {
            var result = new MdQueryResult();
            foreach (var dim in q.Dimensions)
            {
                var dimModel = model.Dimensions.Single(p => p.Name == dim);
                result.Headers.Add(new HeaderCell(dim, dimModel.Caption, dimModel.Type, HeaderType.DimensionHeader));
            }
            foreach (var measure in q.Measures)
            {
                var measureModel = model.Measures.Single(p => p.Name == measure);
                result.Headers.Add(new HeaderCell(measure, measureModel.Caption, measureModel.Type, HeaderType.MeasureHeader));
            }

            return result;
        }