public JsonResult LoadProd(int page, int pageSize = 3)
        {
            var model1 = _ProduitRepository.GetAll();

            model1 = model1.OrderBy(x => x.Libelle);



            return(Json(new
            {
                status = true,
                droplist = model1
            }, JsonRequestBehavior.AllowGet));
        }
        public HttpResponseMessage Get()
        {
            ProduitRepository ProdRepo = new ProduitRepository(connexion);
            var prod = ProdRepo.GetAll().ToList();

            return(Request.CreateResponse(HttpStatusCode.OK, prod));
        }
        public JsonResult LoadData(int page, int pageSize = 3)
        {
            var model  = _DepotRepository.GetAll();
            var model1 = _ProduitRepository.GetAll();

            model1 = model1.OrderBy(x => x.Libelle);
            var userId = User.Identity.GetUserId();


            int totalRow = model.Count();

            model = model.OrderByDescending(x => x.Nom)
                    .Skip((page - 1) * pageSize)
                    .Take(pageSize);


            return(Json(new
            {
                data = model,
                droplist = model1,
                total = totalRow,
                status = true
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        public void GetAllProduits()
        {
            var ctx = new ProduitRepository(connexion);

            ctx.GetAll();
        }
Esempio n. 5
0
 public ActionResult All()
 {
     return(View(_produitRepository.GetAll()));
 }