Exemplo n.º 1
0
        public ActionResult ClientsOuput(Manage.Models.ClientFilter model)
        {
            using (var db = new Db.TipTraceEntities())
            {
                if (string.IsNullOrEmpty(model.Filter))
                {
                    ViewBag.Clients = (from item in db.Clients.Include("ClientType").Include("UrlViews") select item).ToList();
                }
                else
                {
                    ViewBag.Clients = (from item in db.Clients.Include("ClientType").Include("UrlViews") where item.Name.Contains(model.Filter) select item).ToList();
                }
            }

            return(View(model));
        }
Exemplo n.º 2
0
 public ActionResult Clients(Manage.Models.ClientFilter model)
 {
     return(ClientsOuput(model));
 }