public ActionResult Search(string parameter = "", int page = 1)
 {
     ViewBag.pagination = "1";
     ViewBag.parameter  = parameter;
     ViewBag.Clients    = _repositoryClient.GetAll();
     ViewBag.Requests   = _requestService.GetAll();
     return(View("Index", _repository.Search(parameter, page)));
 }
        public ActionResult Search(string parameter = "", int page = 1)
        {
            var model = _repository.Search(parameter, page);

            if (model != null)
            {
                ViewBag.pagination = "1";
                ViewBag.parameter  = parameter;
                return(View("Index", model));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }