public ActionResult tick() { String id = "" + DateTime.Now.Year; StatByTicket s = new StatByTicket(); List <String> name = new List <string>(); if (s.find_all(id) == null) { ViewBag.val1 = 0; } foreach (var i in s.find_all(id)) { name.Add(i.etatticket); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.NbTick); } new Chart(width: 400, height: 400).AddSeries( chartType: "bar", xValue: name, yValues: nb ).Write("png"); return(null); }
// GET: StatByTicket public ActionResult Index() { ViewBag.date = "" + DateTime.Now.Year; StatByTicket s = new StatByTicket(); return(View(s)); }
public ActionResult tick() { allobjet o = new allobjet(); String id = o.find(); StatByTicket s = new StatByTicket(); List <String> name = new List <string>(); foreach (var i in s.find_all(id)) { name.Add(i.etatticket); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.NbTick); } new Chart(width: 400, height: 400).AddSeries( chartType: "column", xValue: name, yValues: nb ).Write("png"); return(null); }
public ActionResult Index(allobjet o) { ViewBag.date = o.StatByTechnicien.date; String date; if ((o.day == null) && (o.month == null)) { date = o.year; } else { if (o.day == null) { date = o.month + "/" + o.year; } else { date = o.day + "/" + o.month + "/" + o.year; } } ViewBag.date = date; o.save(date); String id = date; StatByProbleme s = new StatByProbleme(); ViewBag.val2 = 1; if (s.find_all(id).Count == 0) { ViewBag.val2 = 0; } ViewBag.val3 = 1; StatByTechnicien s1 = new StatByTechnicien(); if (s1.find_all(id).Count == 0) { ViewBag.val3 = 0; } ViewBag.val4 = 1; StatByTicket s2 = new StatByTicket(); if (s2.find_all(id).Count == 0) { ViewBag.val4 = 0; } return(View(o)); }
public ActionResult TicketPie() { allobjet o = new allobjet(); String mytheme = @" <Chart BackColor = ""Transparent""> <ChartAreas><ChartArea Name=""Defult"" BackColor=""Transparent""></ChartArea> </ChartAreas> </Chart>"; String id = o.find(); StatByTicket s = new StatByTicket(); List <String> name = new List <string>(); foreach (var i in s.find_all(id)) { name.Add(i.etatticket); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.NbTick); } new Chart(width: 400, height: 400).AddSeries( chartType: "pie", xValue: name, yValues: nb ).Write("png"); return(null); }
public ActionResult Index(StatByTicket s) { ViewBag.date = s.date; return(View(s)); }