예제 #1
0
        //[HttpPost]
        // public ActionResult OnSaveFieldChanges()
        public ActionResult AggregateFunctionChanged(string aggregateFunctionId)
        {
            AvrPivotGridModel model = GetModelFromSession();

            if (model == null)
            {
                return(View("AvrServiceError", (object)m_ErrorMessage));
            }
            int intPrecision = -1;

            if (model.PivotSettings.SelectedField != null)
            {
                long aggrId = bv.common.Core.Utils.ToLong(aggregateFunctionId);
                CustomSummaryType summaryTypeType = AvrPivotGridHelper.ParseSummaryType(aggrId);
                if (model.PivotSettings.SelectedField.PrecisionDictionary.ContainsKey(summaryTypeType))
                {
                    intPrecision = model.PivotSettings.SelectedField.PrecisionDictionary[summaryTypeType];
                }
                else
                {
                    string strPrecision = LookupCache.GetLookupValue((long)summaryTypeType, LookupTables.AggregateFunction,
                                                                     "intDefaultPrecision");
                    intPrecision = int.TryParse(strPrecision, out intPrecision)
                        ? intPrecision
                        : -1;
                }
            }
            return(new JsonResult {
                Data = new { precision = (decimal)intPrecision }, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
예제 #2
0
 public static string AggregateFunctionName(this AvrViewColumn obj)
 {
     return(LookupCache.GetLookupValue(obj.AggregateFunction, EIDSS.LookupTables.AggregateFunction, "AggregateFunctionName"));
 }
예제 #3
0
        public static List <System.Web.Mvc.SelectListItem> GetBarViews2()
        {
            var lst = new List <System.Web.Mvc.SelectListItem>()
            {
                new System.Web.Mvc.SelectListItem()
                {
                    Text = "", Value = ""
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrArea, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrArea.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrArea3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrArea3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrBar, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrBar.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrBar3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrBar3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrDoughnut, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrDoughnut.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrDoughnut3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrDoughnut3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrFullStackedBar, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrFullStackedBar.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrFullStackedBar3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrFullStackedBar3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrLine, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrLine.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrLine3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrLine3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrPie, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrPie.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrPie3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrPie3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrPoint, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrPoint.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrSpline, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrSpline.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrSpline3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrSpline3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrStackedBar, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrStackedBar.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrStackedBar3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrStackedBar3D.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrStepLine, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrStepLine.ToString()
                },
                new System.Web.Mvc.SelectListItem()
                {
                    Text  = LookupCache.GetLookupValue(DBChartType.chrStepLine3D, BaseReferenceType.rftChart, "name"),
                    Value = DBChartType.chrStepLine3D.ToString()
                }
            };

            return(lst);
        }