// // GET: /ManterBanner/AlterarBanner/5 public ActionResult AlterarBanner(int Codigo) { string[] filePaths = Directory.GetFiles(Server.MapPath("~/AppData/Banner/")); for(int i = 0; i < filePaths.Length; i++) { filePaths[i] = Path.GetFileName(filePaths[i]); } List<string> listString = filePaths.ToList<string>(); listString.Insert(0, ""); SelectList list = new SelectList(listString); ViewBag.Arquivos = list; MultimidiaFacade facade = new MultimidiaFacade(); Banner banner = facade.PesquisarBanner(Codigo); ViewData["Locais"] = new SelectList(facade.PesquisarLocal(null), "Codigo", "Descricao"); return View(banner); }
// // GET: /Banner/ public ActionResult Index() { MultimidiaFacade facade = new MultimidiaFacade(); IList<Banner> banners = facade.PesquisarBanner(null); return View(banners); }