コード例 #1
0
        // GET: Facture
        public ActionResult Index()
        {
            srf = new FactureService();
            IEnumerable <Facture> facutres = srf.GetAll();

            return(View(facutres));
        }
コード例 #2
0
        public ActionResult genererFacture(int?page)
        {
            using (WakilRecouvContext WakilContext = new WakilRecouvContext())
            {
                using (UnitOfWork UOW = new UnitOfWork(WakilContext))
                {
                    LotService     LotService     = new LotService(UOW);
                    FactureService factureService = new FactureService(UOW);
                    List <Facture> factureList    = factureService.GetAll().OrderByDescending(f => f.DateExtrait).ToList();
                    ViewData["list"] = new SelectList(NumLotListForDropDown(LotService), "Value", "Text");


                    ViewBag.total = factureList.Count();

                    int pageSize   = 10;
                    int pageNumber = (page ?? 1);

                    return(View(factureList.ToPagedList(pageNumber, pageSize)));
                }
            }
        }