// GET: Facture public ActionResult Index() { srf = new FactureService(); IEnumerable <Facture> facutres = srf.GetAll(); return(View(facutres)); }
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))); } } }