示例#1
0
        public JsonResult GetModalChart(DateTime StartDate, DateTime EndDate, String Type)
        {
            object obj = null;

            switch (Type)
            {
            case "Spend":
                obj = dashboardData.GetSpendChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "Sales":
                obj = dashboardData.GetSaleChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "Acos":
                obj = dashboardData.GetAcosChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "Impressions":
                obj = dashboardData.GetImpressionsChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "Clicks":
                obj = dashboardData.GetClicksChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "CTR":
                obj = dashboardData.GetCTRChartData(SessionData.UserID, StartDate, EndDate);
                break;

            case "CPC":
                obj = dashboardData.GetCPCChartData(SessionData.UserID, StartDate, EndDate);
                break;

            default:
                break;
            }
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }