public ActionResult charttechniciencolumn()
        {
            String id = "" + DateTime.Now.Year;



            StatByTechnicien s    = new StatByTechnicien();
            List <String>    name = new List <string>();



            foreach (var i in s.find_all(id))
            {
                name.Add(i.tichnicien.Nom);
            }
            List <int> nb = new List <int>();

            foreach (var i in s.find_all(id))
            {
                nb.Add(i.NbTick);
            }

            new Chart(width: 350, height: 350).AddSeries(

                chartType: "column",
                xValue: name,
                yValues: nb
                ).Write("png");



            return(null);
        }
Example #2
0
        public ActionResult chart()
        {
            String           mytheme = @"
                <Chart BackColor = ""Transparent"">

        <ChartAreas><ChartArea Name=""Defult"" BackColor=""Transparent""></ChartArea>
        </ChartAreas>

                </Chart>";
            StatByTechnicien s       = new StatByTechnicien();
            List <String>    name    = new List <string>();

            foreach (var i in s.find_all("2017"))
            {
                name.Add(i.tichnicien.Nom);
            }
            List <int> nb = new List <int>();

            foreach (var i in s.find_all("2017"))
            {
                nb.Add(i.NbTick);
            }

            new Chart(width: 500, height: 500, theme: mytheme).AddSeries(

                chartType: "pie",
                xValue: name,
                yValues: nb
                ).Write("png");



            return(null);
        }
Example #3
0
        // GET: StatByTechnicien
        public ActionResult Index()
        {
            StatByTechnicien s = new StatByTechnicien();

            ViewBag.date = "" + DateTime.Now.Year;

            return(View(s));
        }
Example #4
0
        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));
        }
Example #5
0
        public ActionResult charttechnicienpie()
        {
            allobjet o = new allobjet();


            String id = o.find();



            StatByTechnicien s    = new StatByTechnicien();
            List <String>    name = new List <string>();
            Ticket           t    = new Ticket();
            int pors = 0;



            foreach (var i in s.find_all(id))
            {
                pors = pors + i.NbTick;
            }

            foreach (var i in s.find_all(id))
            {
                int p = (i.NbTick * 100) / pors;
                name.Add(i.tichnicien.Nom + "" + p + "%");
            }
            List <int> nb = new List <int>();

            foreach (var i in s.find_all(id))
            {
                nb.Add(i.NbTick);
            }

            new Chart(width: 350, height: 350).AddSeries(

                chartType: "pie",
                xValue: name,
                yValues: nb
                ).Write("png");



            return(null);
        }
Example #6
0
 public ActionResult Index(StatByTechnicien s)
 {
     ViewBag.date = s.date;
     return(View(s));
 }