public ActionResult Index(string key = "", int page = 1, string chkExport = "0", string selectedId = "") { //if (chkExport.Equals("1")) //{ // var listExcel = _BM_ApartmentUseService.ExcelAllByFirst(key, str, customerstatus); // //Xuất file theo format // PK_CustomerMapFormatCell(listExcel, "Danh_sách_khách_hàng", "Sheet1", "", "Danh sách khách hàng", ""); // return RedirectToAction("Index", new { key = key, customergroup = customergroup, customerstatus = customerstatus, page = page }); //} var pageSize = 20; var list = _BM_ApartmentUseService.GetPagingByFirst(key, page, pageSize); var gridModel = PageModelCustom <BM_ApartmentUse> .GetPage(list, page, pageSize); ViewBag.keyValue = key; return(View(gridModel)); }