Exemple #1
0
        // GET: PhieuNhap
        public ActionResult All(int page = 1, int pageSize = 10, string search = null)
        {
            List <PhieuNhap> DMPhieu = null;

            ViewBag.cultureInfo = CultureInfo;
            if (!String.IsNullOrEmpty(search))
            {
                DMPhieu           = PhieuNhapManager.filter(search);
                ViewBag.SearchKey = search;
            }
            else
            {
                DMPhieu = PhieuNhapManager.getAll();
            }
            ViewBag.tongTien = DMPhieu.Sum(ph => ph.TongTien);
            //ViewBag.tongSoLuong = DMPhieu.Sum(ph => ph.ChiTiet.Sum(ct => ct.SoLuong));
            var models = DMPhieu.ToPagedList(page, pageSize);

            setAlertMessage();
            return(View(models));
        }
Exemple #2
0
 private void LoadDSPM()
 {
     __DSPN = PhieuNhapManager.getAll();
     gdvPhieuNhap.DataSource = __DSPN;
 }