public ActionResult Listar() { var CC = new ConteudoCategoriaController(); ViewBag.Categorias = CC.GetContentCategoriesSelectListItem(new ConteudoCategoriaService().GetAll(), null); ViewBag.TipoConteudo = GetTypeContentSelectListItem(new ConteudoService().GetTypeContentSelectListItem(), null); return View("Listar"); }
public ActionResult Editar(int id) { var cat = new ConteudoService().GetById(id); var CC = new ConteudoCategoriaController(); ViewBag.Conteudo = CC.GetContentCategoriesSelectListItem(new ConteudoCategoriaService().GetAll(), null); ViewBag.TipoConteudo = GetTypeContentSelectListItem(new ConteudoService().GetTypeContentSelectListItem(), null); ViewBag.Idiomas = new IdiomaService().GetAll(); return View(cat); }
public ActionResult Novo() { var CC = new ConteudoCategoriaController(); ViewBag.Conteudo = CC.GetContentCategoriesSelectListItem(new ConteudoCategoriaService().GetAll(), null); ViewBag.TipoConteudo = GetTypeContentSelectListItem(new ConteudoService().GetTypeContentSelectListItem(), null); ViewBag.Idiomas = new IdiomaService().GetAll(); var conteudo = new Conteudo { IsAtivo = true, DataPublicacao = DateTime.Now }; return View(conteudo); }