示例#1
0
        public ActionResult Show(int id)
        {
            Evento         e        = EDao.GetEventosById(id);
            List <Usuario> userList = Udao.getUserListByEventoId(id);

            ViewBag.Evento   = e;
            ViewBag.UserList = userList;
            return(View());
        }
示例#2
0
 public ActionResult Mail(FormCollection form)
 {
     try {
         string         ids      = form["usuarioId"];
         long           eventoId = Convert.ToInt64(form["EventoId"]);
         Evento         e        = EDao.GetEventosById(eventoId);
         List <Usuario> userList = Udao.getUserListByIds(ids);
         SendMail       sm       = new SendMail();
         sm.send(userList, e);
         UsuarioEventoDao UVDao = new UsuarioEventoDao();
         foreach (Usuario u in userList)
         {
             UVDao.insertUsuarioEvento(u.Id, eventoId);
         }
     } catch (Exception e) {
         //e.StackTrace();
     }
     return(RedirectToAction("Index"));
 }