Example #1
0
        public IActionResult Search(string search, int?pagenumber)
        {
            pageNumber = pagenumber ?? 1;
            DiaChiBUS        diachi     = new DiaChiBUS();
            List <DiaChi>    list       = diachi.Search(search, pageSize, pageNumber);
            List <DiaChi>    tong       = diachi.Search(search, pageSize);
            List <TinhThanh> tinhThanhs = diachi.GetTinhThanhs();

            ViewBag.TrangHienTai  = pageNumber;
            ViewBag.TongTrang     = TongTrang(tong);
            ViewBag.TrangThai     = "search";
            ViewBag.Search        = search;
            ViewBag.ListTinhThanh = tinhThanhs;
            return(View("Index", list));
        }
Example #2
0
        public IActionResult Index(string thongbao, int?pagenumber)
        {
            //Thông báo
            if (thongbao != null)
            {
                ViewBag.ThongBao = thongbao;
            }
            //Trang
            pageNumber = pagenumber ?? 1;
            //List
            DiaChiBUS        diachi     = new DiaChiBUS();
            List <DiaChi>    list       = diachi.GetDiaChis(pageNumber, pageSize);
            List <DiaChi>    tong       = diachi.GetDiaChis();
            List <TinhThanh> tinhThanhs = diachi.GetTinhThanhs();

            //ViewBag
            ViewBag.TongTrang     = TongTrang(tong);
            ViewBag.TrangHienTai  = pageNumber;
            ViewBag.TrangThai     = "index";
            ViewBag.ListTinhThanh = tinhThanhs;
            return(View(list));
        }