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.Customers_List(page, AppSettings.DefaultPageSize, searchValue), searchValue = searchValue }; return(View(model)); }
public static List <SelectListItem> Customer(bool allowSelectAll = true) { List <SelectListItem> list = new List <SelectListItem>(); if (allowSelectAll) { list.Add(new SelectListItem() { Value = "", Text = "-- All Customers --" }); } foreach (var customer in CatalogBLL.Customers_List(1, CatalogBLL.Customer_Count(""), "")) { list.Add(new SelectListItem() { Value = customer.CustomerID, Text = customer.CompanyName }); } return(list); }