예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public ActionResult Edit(int id)
        {
            _solutionServices = new SolutionServiceViewModel {
                Services = _repository.Services
            };

            var service = _repository.FindById(id);

            return(View("Edit", service));
        }
예제 #4
0
        // GET: SiteAdmin
        public ActionResult Index()
        {
            solutionservices = new SolutionServiceViewModel
            {
                Solutions = _solutionrepository.Solutions,
                Services  = _servicerepository.Services
            };

            return(View(solutionservices));
        }
예제 #5
0
        public ActionResult Edit(int id)
        {
            solutionservices = new SolutionServiceViewModel {
                Solutions = _repository.Solutions
            };

            var solution = _repository.Solutions.FirstOrDefault(p => p.Id == id);

            return(View("Edit", solution));
        }
예제 #6
0
        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);
        }
예제 #7
0
        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));
        }
예제 #8
0
        // 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);
        }
예제 #9
0
        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));
        }
예제 #10
0
        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));
        }
예제 #11
0
        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));
        }
예제 #12
0
        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));
        }
예제 #13
0
        // 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));
        }
예제 #14
0
        // 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));
        }
예제 #15
0
        // 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));
        }