Пример #1
0
        public ActionResult IndexDH(string searchTerm, int page = 1, int pageSize = 11)
        {
            var SanPhams = new DONHANGsController();
            var mode     = SanPhams.ListAllPaging1(searchTerm, page, pageSize);

            ViewBag.SearchTerm = searchTerm;

            return(View(mode));
        }
Пример #2
0
        public ActionResult IndexKH(string searchTerm, int page = 1, int pageSize = 11)
        {
            if (Session["KH_ID"] != null)
            {
                string id = Session["KH_ID"].ToString();

                var SanPhams = new DONHANGsController();
                var mode     = SanPhams.ListAllPaging2(id, searchTerm, page, pageSize);
                ViewBag.SearchTerm = searchTerm;
                return(View(mode));
            }
            else
            {
                return(RedirectToAction("LoginKH", "Logins"));
            }
        }