Exemplo n.º 1
0
        public ActionResult Delete(int id, TweetVM collection)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Tweet t = new Tweet()
                    {
                        Tweet_Id = id,
                        UserId   = collection.UserId,
                        message  = collection.message,
                        created  = DateTime.Now
                    };

                    obj.DeleteTweet(t);
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View());
                }
            }
            catch (Exception Ex)
            {
                Logger.WriteError(Ex, "Delete", "Home");
                return(View("Error"));
            }
        }
Exemplo n.º 2
0
        public JsonResult DeleteTweet(int tweetId)
        {
            tweetBL.DeleteTweet(tweetId);

            var result = "success";

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
 public bool DeleteTweet(TweetDTO tweetObj)
 {
     return(TweetBL.DeleteTweet(tweetObj));
 }
Exemplo n.º 4
0
 public JsonResult DeleteTweet(TWEET tweet)
 {
     tweetObj.DeleteTweet(tweet);
     return(Json("", JsonRequestBehavior.AllowGet));
 }