Exemplo n.º 1
0
        /// <summary>
        /// Action result for logout
        /// </summary>
        /// <returns>View("Index", entertainments);</returns>
        public ActionResult Logout()
        {
            try
            {
                lis.Logout((int)Session["user_id"]);

                if (Session["user_id"] != null)
                {
                    Session["user_id"] = null;
                }

                if (Session["session_id"] != null)
                {
                    Session["session_id"] = null;
                }

                if (Session["movie_id"] != null)
                {
                    Session["movie_id"] = null;
                }

                if (Session["userName"] != null)
                {
                    Session["userName"] = null;
                }
            }

            catch (Exception)
            {
                throw;
            }

            List <Entertainment> entertainments;

            entertainments = eS.GetEntertainments();

            return(View("Index", entertainments));
        }