// // GET: /Client/ public ActionResult Index(string search, int?page) { ClientDAL objdal = new ClientDAL(); List <Client> client = new List <Client>(); try { if (!string.IsNullOrEmpty(search)) { client = objdal.GetAll().Where(x => x.ClientName.StartsWith(search, StringComparison.OrdinalIgnoreCase)).ToList(); } else { client = objdal.GetAll().ToList(); } } catch (Exception ex) { View(client); } return(View(client.ToPagedList(page ?? 1, 10))); }
public QueryResponse <List <Client> > GetAll() { return(_clienteDAL.GetAll()); }
public static ObservableCollection <Client> GetAll() { return(ClientDAL.GetAll()); }