// GET: stat
        public ActionResult Index()
        {
            int nombreResource = ss.nbResource();

            ViewBag.nombreResource = nombreResource;
            int nbUsers = ss.nbUsers();

            ViewBag.nbUsers = nbUsers;
            int nbprojects = ss.nbProjects();

            ViewBag.nbprojects = nbprojects;
            int nbreq = ss.nbRequests();

            ViewBag.nbreq = nbreq;
            int resAV = ss.GetMany(a => a.ressourceStates == 0).ToList().Count();

            ViewBag.resAv = resAV;
            int clients = ss.nbclients();

            ViewBag.clients = clients;



            return(View());
        }
Exemplo n.º 2
0
        public IHttpActionResult nbUsers()
        {
            //  int nombreResource = ss.nbResource();
            int nbUsers = ss.nbUsers();

            //int nbprojects = ss.nbProjects();
            //int nbreq = ss.nbRequests();
            //int resAV = ss.GetMany(a => a.ressourceStates == 0).ToList().Count();
            //int clients = ss.nbclients();


            //var lista = new List<int>();
            //lista.Add(nbUsers);
            //lista.Add(nbprojects);
            //lista.Add(nbreq);
            //lista.Add(clients);
            //lista.Add(resAV);
            //Dictionary<String, int> map = new Dictionary<string, int>();
            //map.Add("users",nbUsers);
            //map.Add("project", nbprojects);

            //map.Add("req", nbreq);
            //map.Add("client", clients);
            //map.Add("resav", resAV);

            //var abc = new List<Dictionary<string,int>>();
            //abc.Add(map);

            return(Json(nbUsers));
        }