// 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()));
 }
Example #3
0
 public List <Evento> Eventos()
 {
     return(EventoDAO.RetornarEventos());
 }