Esempio n. 1
0
        public ActionResult SubirImagenesSponsors(ImagenesUploadVM model)
        {
            var evento = _repo.FindById(model.Id);

            if (evento == null)
            {
                return(HttpNotFound());
            }
            if (ModelState.IsValid)
            {
                var imagenes = _repo.GuardarImagenes(model, "Sponsors");
                evento.ImagenesSponsors = string.Join(";", imagenes);
                _repo.Edit(evento);
                return(RedirectToAction("Administrar", new { id = model.Id }));
            }
            return(View("ConfiguracionInicio", evento));
        }
Esempio n. 2
0
        public ActionResult SubirLogo(ImagenesUploadVM model)
        {
            var evento = _repo.FindById(model.Id);

            if (evento == null)
            {
                return(HttpNotFound());
            }
            if (ModelState.IsValid)
            {
                var pathFile = _repo.GuardarImagenes(model, "Logo").First();
                evento.LogoPath = pathFile;
                _repo.Edit(evento);
                return(RedirectToAction("Administrar", new { id = model.Id }));
            }
            return(View("ConfiguracionInicio", evento));
        }