public FileContentResult GetImage(int id) { _solutionServices = new SolutionServiceViewModel { Services = _repository.Services }; Service service = _solutionServices.Services.FirstOrDefault(s => s.Id == id); return(service != null?File(service.ImageData, service.ImageMimeType) : null); }
public FileContentResult GetImage(int id) { solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; var solution = solutionservices.Solutions.FirstOrDefault(s => s.Id == id); return(solution != null?File(solution.ImageData, solution.ImageMimeType) : null); }
public ActionResult Edit(int id) { _solutionServices = new SolutionServiceViewModel { Services = _repository.Services }; var service = _repository.FindById(id); return(View("Edit", service)); }
// GET: SiteAdmin public ActionResult Index() { solutionservices = new SolutionServiceViewModel { Solutions = _solutionrepository.Solutions, Services = _servicerepository.Services }; return(View(solutionservices)); }
public ActionResult Edit(int id) { solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; var solution = _repository.Solutions.FirstOrDefault(p => p.Id == id); return(View("Edit", solution)); }
public FileContentResult GetImage(int id) { _solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; var solution = _repository.FindById(id); return(solution != null?File(solution.ImageData, solution.ImageMimeType) : null); }
public ViewResult Detail(int id) { solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; ViewBag.NavTitle = "Solutions"; var solution = _repository.Solutions.FirstOrDefault(p => p.Id == id); solutionservices.Solution = solution; return(View("Index", solutionservices)); }
// GET: Home public ActionResult Index() { solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; ViewBag.NavTitle = "Solutions"; var solution = _repository.Solutions.FirstOrDefault(p => p.Id == 1); solutionservices.Solution = solution; return(View(solutionservices)); //View(solutionservices); }
public ViewResult Detail(int id) { _solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; ViewBag.NavTitle = "Solutions"; var solution = _repository.FindById(id); _solutionservices.Solution = solution; return(View("Index", _solutionservices)); }
public ActionResult Detail(int id) { var solutionservices = new SolutionServiceViewModel { Services = _repository.Services }; ViewBag.NavTitle = "Services"; var service = _repository.FindById(id); solutionservices.Service = service; return(View("../Solutions/Index", solutionservices)); }
public ViewResult DetailByUrlString(string urlString) { _solutionServices = new SolutionServiceViewModel { Service = _repository.FindByUrl(urlString), Services = _repository.Services }; ViewBag.NavTitle = "Services"; if (_solutionServices.Service == null) { return(View("Error")); } return(View("../Solutions/Index", _solutionServices)); }
public ActionResult DetailByUrlString(string urlString) { _solutionservices = new SolutionServiceViewModel { Solution = _repository.FindByUrl(urlString), Solutions = _repository.Solutions }; ViewBag.NavTitle = "Solutions"; if (_solutionservices.Solution == null) { return(View("Error")); } return(View("Index", _solutionservices)); }
// GET: Services public ActionResult Index() { var solutionservices = new SolutionServiceViewModel() { Services = _repository.Services }; ViewBag.NavTitle = "Services"; var service = _repository.Services.FirstOrDefault(p => p.Id == 1); solutionservices.Service = service; return(View("../Solutions/Index", solutionservices)); }
// GET: Home public ActionResult Index() { _solutionservices = new SolutionServiceViewModel { Solutions = _repository.Solutions }; ViewBag.NavTitle = "Solutions"; Solution solution = new Solution(); if (_repository.Solutions.Any()) { solution = _repository.Solutions.ToList()[0] ?? new Solution(); } _solutionservices.Solution = solution; return(View(_solutionservices)); }
// GET: Services public ActionResult Index() { var solutionservices = new SolutionServiceViewModel { Services = _repository.Services }; ViewBag.NavTitle = "Services"; Service service = new Service(); if (_repository.Services.Any()) { service = _repository.Services.ToList()[0] ?? new Service(); } solutionservices.Service = service; return(View("../Solutions/Index", solutionservices)); }