コード例 #1
0
        public ActionResult blogPartialView(string blogID)
        {
            var lookupId = int.Parse(blogID);
            var model    = ObsługaBazyDanych.zwrocBlogPoId(lookupId);

            return(PartialView("blogFollowButton", model));
        }
コード例 #2
0
        public ActionResult UsunPost(int id, int idBlog)
        {
            ObsługaBazyDanych.usunPost(id);
            var blog = ObsługaBazyDanych.zwrocBlogPoId(idBlog);

            return(RedirectToAction("WyswietlBlog", new { id = idBlog }));
        }
コード例 #3
0
        public ActionResult blogUnFollow(string userName, string blogID)
        {
            Debug.WriteLine(userName + " " + blogID + "pierwszyGet");
            ObsługaBazyDanych.UsunFollowZBloga(userName, blogID);

            var blog = ObsługaBazyDanych.zwrocBlogPoId(Int32.Parse(blogID));

            return(Json(new { followCount = blog.followCount, id = blog.Blog_ID, user = userName }, JsonRequestBehavior.AllowGet));
        }
コード例 #4
0
        //na razie authorize

        public ActionResult WyswietlBlog(int id)
        {
            var blog = ObsługaBazyDanych.zwrocBlogPoId(id);

            return(View(blog));
        }