52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace NKC_WF.site
|
|
{
|
|
public partial class TestChart : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
setGraph();
|
|
}
|
|
|
|
private void setGraph()
|
|
{
|
|
cmp_BatchStatsPlot.Visible = false;
|
|
cmp_DailyStatsPlot.Visible = false;
|
|
Random rnd = new Random();
|
|
switch (ddlChart.SelectedValue)
|
|
{
|
|
case "1":
|
|
int numRec = rnd.Next(50, 250);
|
|
cmp_BatchStatsPlot.PlotType = "Yeld";
|
|
cmp_BatchStatsPlot.ShowLast = numRec;
|
|
cmp_BatchStatsPlot.Legend = $"PROVA | {numRec} | {DateTime.Now:HH:mm:ss}";
|
|
cmp_BatchStatsPlot.Visible = true;
|
|
break;
|
|
case "2":
|
|
cmp_DailyStatsPlot.PlaceCod = "[ALL]";
|
|
cmp_DailyStatsPlot.PlotType = "OEE";
|
|
cmp_DailyStatsPlot.DateStart = DateTime.Today.AddMonths(-1);
|
|
cmp_DailyStatsPlot.DateEnd = DateTime.Today;
|
|
cmp_DailyStatsPlot.Visible = true;
|
|
break;
|
|
case "3":
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
uplBody.Update();
|
|
}
|
|
|
|
protected void lbtRefreshData_Click(object sender, EventArgs e)
|
|
{
|
|
setGraph();
|
|
}
|
|
}
|
|
} |