Exemplo n.º 1
0
 public ActionResult CadNoticia(int IdEvent, string msg)
 {
     using (EventoModel model = new EventoModel())
     {
         if (model.isAdmin(IdEvent, (Session["usuario"] as Usuario).Id_usuario))
         {
             model.CadNoticia(IdEvent, msg);
             TempData["successManager"] = "News Added";
             return(RedirectToAction("Manager", "Event", new { EventoID = IdEvent }));
         }
         else
         {
             TempData["errorManager"] = "Erro added news";
             return(RedirectToAction("FeedEvents", "Event"));
         }
     }
 }