internal void render(TextWriter writer, SessionQuery query)
        {
            IDataSetModel l = new DataSetModelStore(Structure, store);

            /*
             * if (query._dataSetModel != null)
             * {
             *  l = query._dataSetModel;
             *  l.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
             *  query._store.SetCriteria(this.Criterias);
             *  query.DatasetModel = l;
             * }
             * else
             * {
             *  l.Initialize(this.Criterias);
             *  l.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
             *  query.DatasetModel = l;
             * }
             */

            if (query.DatasetModel != null)
            {
                //query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y, this.Criterias);
                //fabio baco multilista
                //query._store.SetCriteria(this.Criterias);
            }
            else
            {
                query.DatasetModel = new DataSetModelStore(Structure, store);
                query.DatasetModel.Initialize(this.Criterias);
                //query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y, this.Criterias);
            }

            HtmlRenderer htmlRenderer = new HtmlRenderer(this.codemap, true, _useAttr, cFrom, cTo);


            //  { if (!DataStream.store.ExistsColumn(axisX)) DataStream.layObj.axis_x.Remove(axisX); });
            //this.Criterias.ForEach(c => l.UpdateSliceKeyValue(c.component, c.values.FirstOrDefault()));

            /*
             * for(int i=0; i<layObj.axis_z.Count; i++) {
             *  string criterio=layObj.axis_z[i];
             *  this.Criterias.ForEach(c => {if (c.component==criterio) {l.UpdateSliceKeyValue(c.component, c.values.FirstOrDefault());}});
             * }
             */
            //htmlRenderer.Render(l, writer);
            htmlRenderer.Render(query._dataSetModel, writer);

            //new HtmlRenderer(query.GetComponentCodeDescriptionMap(), true).Render(
            //   query.DatasetModel,
            //   context.Response.Output);
        }
Ejemplo n.º 2
0
        internal void render(TextWriter writer,SessionQuery query)
        {
            IDataSetModel l = new DataSetModelStore(Structure, store);

            /*
            if (query._dataSetModel != null)
            {
                l = query._dataSetModel;
                l.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query._store.SetCriteria(this.Criterias);
                query.DatasetModel = l;
            }
            else
            {
                l.Initialize(this.Criterias);
                l.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query.DatasetModel = l;
            }
            */

            if (query.DatasetModel != null)
            {

                //query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y, this.Criterias);
                query._store.SetCriteria(this.Criterias);
            }
            else
            {
                query.DatasetModel = new DataSetModelStore(Structure, store);
                query.DatasetModel.Initialize(this.Criterias);
                //query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y);
                query.DatasetModel.UpdateAxis(layObj.axis_z, layObj.axis_x, layObj.axis_y, this.Criterias);
            }

            HtmlRenderer htmlRenderer = new HtmlRenderer(this.codemap, true, _useAttr, cFrom, cTo);

              //  { if (!DataStream.store.ExistsColumn(axisX)) DataStream.layObj.axis_x.Remove(axisX); });
            //this.Criterias.ForEach(c => l.UpdateSliceKeyValue(c.component, c.values.FirstOrDefault()));
            /*
            for(int i=0; i<layObj.axis_z.Count; i++) {
                string criterio=layObj.axis_z[i];
                this.Criterias.ForEach(c => {if (c.component==criterio) {l.UpdateSliceKeyValue(c.component, c.values.FirstOrDefault());}});
            }
            */
            //htmlRenderer.Render(l, writer);
            htmlRenderer.Render(query._dataSetModel, writer);

            //new HtmlRenderer(query.GetComponentCodeDescriptionMap(), true).Render(
            //   query.DatasetModel,
            //   context.Response.Output);
        }
Ejemplo n.º 3
0
        private static ISTAT.WebClient.WidgetEngine.Model.DataRender.IDataSetModel GetDataSetModel(DataObjectForStreaming dataStream)
        {
            ISTAT.WebClient.WidgetEngine.Model.DataRender.IDataSetModel dataSetModel;

            dataStream.layObj.axis_x.ForEach(axisX => { if (!dataStream.store.ExistsColumn(axisX)) dataStream.layObj.axis_x.Remove(axisX); });
            dataStream.layObj.axis_y.ForEach(axisY => { if (!dataStream.store.ExistsColumn(axisY)) dataStream.layObj.axis_y.Remove(axisY); });
            dataStream.layObj.axis_z.ForEach(axisZ => { if (!dataStream.store.ExistsColumn(axisZ)) dataStream.layObj.axis_z.Remove(axisZ); });

            dataSetModel = new DataSetModelStore(dataStream.structure, dataStream.store);

            dataSetModel.Initialize();
            dataSetModel.UpdateAxis(dataStream.layObj.axis_z, dataStream.layObj.axis_x, dataStream.layObj.axis_y);

            return dataSetModel;
        }