/// <summary> /// /// </summary> /// <returns></returns> /// public ActionResult Index(int page = 1, string searchValue = "", string Country = "", string address = "") { int pageSize = 7; int rowCount = 0; List <Customer> listOfCustomer = CatalogBLL.ListOfCustomers(page, pageSize, searchValue, out rowCount, Country, address); var model = new Models.CustomerPaginationResult() { Page = page, PageSize = pageSize, RowCount = rowCount, SeachValue = searchValue, Data = listOfCustomer, Country = Country, Address = address }; return(View(model)); //int rowCount = 0; //List<Customer> model = CatalogBLL.ListOfCustomers(1, 10, "", out rowCount); //ViewBag.RowCount = rowCount; //// truyen model (list) ve View //return View(model); }
/// <summary> /// Hiển thị danh sách khách hàng /// </summary> /// <returns></returns> public ActionResult Index(int page = 1, string searchValue = "") { var model = new Models.CustomerPaginationResult() { Page = page, PageSize = AppSettings.DefaultPageSize, RowCount = CatalogBLL.Customer_Count(searchValue), Data = CatalogBLL.Customer_List(page, AppSettings.DefaultPageSize, searchValue), }; return(View(model)); }
// GET: Customer public ActionResult Index(int page = 1, string searchValue = "") { int pageSize = 10; int rowCount = 0; List <Customer> listOfCustomer = CatelogBLL.ListOfCustomers(page, pageSize, searchValue, out rowCount); var model = new Models.CustomerPaginationResult() { Page = page, PageSize = pageSize, RowCount = rowCount, SearchValue = searchValue, Data = listOfCustomer }; return(View(model)); }
/// <summary> /// View page: List of customers /// </summary> /// <param name="page"></param> /// <param name="searchValue"></param> /// <param name="country"></param> /// <returns></returns> public IActionResult Index(int page = 1, string searchValue = "", string country = "") { int rowCount = 0; int pageSize = 10; List <Customer> listOfCustomer = CatalogBLL.ListOfCustomer(page, pageSize, searchValue ?? "", out rowCount, country ?? ""); var model = new Models.CustomerPaginationResult() { Page = page, Data = listOfCustomer, PageSize = pageSize, RowCount = rowCount, SearchValue = searchValue, SelectedCountry = country, }; return(View(model)); }
// GET: Customer /// <summary> /// hiển thị trang chủ của khách hàng /// </summary> /// <returns></returns> public ActionResult Index(int page = 1, string searchValue = "", string country = "") { int pageSize = 3; int rowCount = 0; List <Customer> listOfCustomer = CataLogBLL.ListOfCustomer(page, pageSize, searchValue, country, out rowCount); var model = new Models.CustomerPaginationResult() { Page = page, PageSize = pageSize, RowCount = rowCount, Data = listOfCustomer, SearchValue = searchValue, Country = country }; // int pagesize = 3; // int rowcount = 0; // list<supplier> model = catalogbll.listofsupplier(page, pagesize, searchvalue, out rowcount); // viewbag.rowcount = rowcount; return(View(model)); }