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