// GET: Home public ActionResult Index() { if (Sessao.RetornarUsuario() != 0) { //eventos ViewBag.Eventos = EventoDAO.RetornarEventos(); //ranking usuarios ViewBag.Usuarios = UsuarioDAO.RetornarUsuariosPorPontuacao(); return(View()); } else { return(RedirectToAction("Login", "Usuario")); } }
// GET: CategoriaEvento public ActionResult Index() { ViewBag.DataAtual = DateTime.Now; return(View(EventoDAO.RetornarEventos())); }
public List <Evento> Eventos() { return(EventoDAO.RetornarEventos()); }