Ejemplo n.º 1
0
        public ActionResult CommentFeed(int id, string Comment)
        {
            User u = (User)(Session["User"]);

            string username = u.Username;

            try
            {
                FeedRepository fr = new FeedRepository();
                fr.Open();

                bool success = fr.UserCommentFeed(username, id, Comment);

                if (success == true)
                {
                    return(Redirect(Request.UrlReferrer.ToString()));
                }
                else
                {
                    return(View("Message",
                                new Message("Kommentar", "Fehler", "Irgendetwas ist schief gelaufen",
                                            "Versuche es später erneut!")));
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }