コード例 #1
0
        // GET: aceitarconvite
        public ActionResult Index(string evento)
        {
            if (string.IsNullOrWhiteSpace(evento))
            {
                return(RedirectToAction("index", "Index"));
            }

            if (Session["idUsuario"] == null)
            {
                return(RedirectToAction("Index", "Index"));
            }

            try
            {
                Convites.ConfirmarPresenca(Convert.ToInt32(evento));
                return(RedirectToAction("index", "ConviteAceito"));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Index", "Erro"));
            }
        }
コード例 #2
0
        // GET: ParticiparEvento
        public ActionResult Index(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index", "Eventos"));
            }

            if (Session["idUsuario"] == null)
            {
                return(RedirectToAction("Index", "Entrar"));
            }

            try
            {
                Convites.ConfirmarPresenca((int)id);

                return(RedirectToAction("Index", "ConviteAceito"));
            }
            catch (Exception)
            {
                return(RedirectToAction("Index", "Erro"));
            }
        }