public Dictionary <string, object> CalculatedField(string action, string headerTag, string currentReport)
 {
     htmlHelper.PopulateData(currentReport);
     dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData(), null, headerTag);
     return(dict);
 }
        public Dictionary <string, object> InitializeGrid(Dictionary <string, object> jsonResult)
        {
            dynamic customData = serializer.Deserialize <dynamic>(jsonResult["customObject"].ToString());

            if (jsonResult.ContainsKey("currentReport"))
            {
                htmlHelper.PopulateData(jsonResult["currentReport"].ToString());
            }
            else
            {
                htmlHelper.PivotReport = BindDefaultData((customData is Dictionary <string, object> && jsonResult.ContainsKey("isCalculatedField")) ? customData["isCalculatedField"] : false);
            }
            if ((customData is Dictionary <string, object> && customData.ContainsKey("isPaging") && customData["isPaging"]))
            {
                htmlHelper.PivotReport.EnablePaging = true;
                htmlHelper.PivotReport.PagerOptions.CategoricalPageSize    = 5;
                htmlHelper.PivotReport.PagerOptions.SeriesPageSize         = 5;
                htmlHelper.PivotReport.PagerOptions.CategoricalCurrentPage = 1;
                htmlHelper.PivotReport.PagerOptions.SeriesCurrentPage      = 1;
            }
            dict = htmlHelper.GetJsonData(jsonResult["action"].ToString(), ProductSales.GetSalesData(), jsonResult["valueSorting"].ToString());
            return(dict);
        }
예제 #3
0
 public Dictionary <string, object> InitializeGrid(string action)
 {
     htmlHelper.PivotReport = BindDefaultData();
     dict = htmlHelper.GetJsonData(action, ProductSales.GetSalesData());
     return(dict);
 }