Example #1
0
        public ActionResult ClientHome(int ClientId)
        {
            var ClientList = StoreService.ClientList().Find(x => x.StoreId == ClientId);

            StoreService.StoreId   = ClientId;
            StoreService.StoreName = ClientList.StoreName;
            return(RedirectToAction("Index", "Home"));
        }
Example #2
0
 public ActionResult ClientSearch(string Searchby, string search, int?page)
 {
     ClientList = _storeService.ClientList();
     if (Searchby == "ClientID")
     {
         var model = ClientList.Where(x => search.StartsWith(x.StoreId.ToString()) || search == null).ToList().ToPagedList(page ?? 1, 30);
         return(View("Index", model));
     }
     else if (Searchby == "Name")
     {
         var model = ClientList.Where(x => x.StoreName.ToLower().Contains(search.ToLower()) || search == null).ToList().ToPagedList(page ?? 1, 30);
         return(View("Index", model));
     }
     else
     {
         var model = ClientList.ToPagedList(page ?? 1, 30);
         return(View("Index", model));
     }
 }