//
        // 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)));
        }
Esempio n. 2
0
 public QueryResponse <List <Client> > GetAll()
 {
     return(_clienteDAL.GetAll());
 }
Esempio n. 3
0
 public static ObservableCollection <Client> GetAll()
 {
     return(ClientDAL.GetAll());
 }