Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ChartSession cs = SessionManager.ChartSession;

            if (!cs.IsEmpty())
            {
                LineChartConfig cfg = cs.ChartConfig as LineChartConfig;
                if (cs.Name == SessionChartName.P2Hour ||
                    cs.Name == SessionChartName.PDuringWL ||
                    cs.Name == SessionChartName.PDuringFlux ||
                    cs.Name == SessionChartName.PDuringAmount)
                {
                    CreateLineConfig(cfg, cs.DataSource);
                    //LineChartConfig cfg = Create(cs.DataSource);
                }

                //if (cs.Name == SessionChartName.PDuringWL)
                //{
                //    LineChartConfig cfg = cs.ChartConfig as LineChartConfig;
                //    CreateLineConfig(cfg, cs.DataSource);
                //}
                //if (cs.Name == "...")
                //{

                //}

                ChartFactory f = new ChartFactory();
                OpenFlashChart.OpenFlashChart chart = f.Create(cs.DataSource as DataTable, cfg);
                Response.Write(chart.ToString());
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int i = 2 - 1;
            ChartSession cs = SessionManager.ChartSessionManager.GetChartSession(i);
            LineChartConfig cfg = cs.ChartConfig as LineChartConfig;

            ChartFactory f = new ChartFactory();
            OpenFlashChart.OpenFlashChart chart = f.Create(cs.DataSource as DataTable, cfg);
            Response.Write(chart.ToString());
        }
Exemplo n.º 3
0
        public override async Task <ChartModel <string, int> > GetWidgetData(int widgetId, WidgetOptions options)
        {
            string sql = null;

            object[] parameters = new object[] { this.CompanyId };

            switch (widgetId)
            {
            case 1:
                sql = "quarry.WidgetQuarryMaterialCounts @CompanyId = {0}";
                break;

            case 2:
                sql = "quarry.WidgetQuarryProductTypeMaterialCounts @CompanyId = {0}";
                break;

            case 3:
                sql = "quarry.WidgetQuarryMaterialColourMaterialCounts @CompanyId = {0}";
                break;

            case 4:
                sql = "quarry.WidgetProductTypeMaterialCounts @CompanyId = {0}";
                break;

            case 5:
                sql = "quarry.WidgetProductTypeQuarryMaterialCounts @CompanyId = {0}";
                break;

            case 6:
                sql = "quarry.WidgetProductTypeMaterialColourMaterialCounts @CompanyId = {0}";
                break;

            case 7:
                sql = "quarry.WidgetMaterialColourMaterialCounts @CompanyId = {0}";
                break;

            case 8:
                sql = "quarry.WidgetMaterialColourQuarryMaterialCounts @CompanyId = {0}";
                break;

            case 9:
                sql = "quarry.WidgetMaterialColourProductTypeMaterialCounts @CompanyId = {0}";
                break;

            case 10:
                sql = "quarry.WidgetYardMaterialCounts @CompanyId = {0}";
                break;

            case 11:
                sql = "quarry.WidgetYardProductTypeMaterialCounts @CompanyId = {0}";
                break;
            }

            return(await ChartFactory.Create <string, int>(options, this.repository.DbContext, sql, parameters));
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int             i   = 2 - 1;
            ChartSession    cs  = SessionManager.ChartSessionManager.GetChartSession(i);
            LineChartConfig cfg = cs.ChartConfig as LineChartConfig;

            ChartFactory f = new ChartFactory();

            OpenFlashChart.OpenFlashChart chart = f.Create(cs.DataSource as DataTable, cfg);
            Response.Write(chart.ToString());
        }
Exemplo n.º 5
0
        public override async Task <ChartModel <string, int> > GetWidgetData(int widgetId, WidgetOptions options)
        {
            string sql = null;

            object[] parameters = new object[] { this.CompanyId };

            switch (widgetId)
            {
            default:
                break;
            }

            return(await ChartFactory.Create <string, int, FleetDbContext>(options, this.repository.DbContext, sql, parameters));
        }