Ejemplo n.º 1
0
        }// End of ConfirmedDeletePost

        public ActionResult EditPost(String postID)
        {
            SQLServerConnector      sqlServerConnector = new SQLServerConnector();
            List <PostDataCarousel> listPosts;
            PostDataCarousel        postDataCarouselForEdit;
            String sqlCriteria = "aaz01 = '" + postID + "'";

            listPosts = sqlServerConnector.getPostsListOnDemand(sqlCriteria);
            postDataCarouselForEdit = listPosts[0];

            ViewBag.PostDataForEdit = postDataCarouselForEdit;

            return(View("EditPost", postDataCarouselForEdit));
        }
Ejemplo n.º 2
0
        }//Create

        public ActionResult DeletePost(String postID)
        {
            String sqlCriteria = "";

            if (postID != null && !postID.IsEmpty())
            {
                if (postID.StartsWith("*"))
                {
                    postID = postID.Remove(1, 1);
                }
                if (postID.EndsWith("*"))
                {
                    postID = postID.Remove(postID.Length - 1, postID.Length);
                }
                sqlCriteria = "aaz01 LIKE '%" + postID + "%' ";
            }

            SQLServerConnector      sqlServerConnector = new SQLServerConnector();
            List <PostDataCarousel> listPosts;

            listPosts           = sqlServerConnector.getPostsListOnDemand(sqlCriteria);
            ViewBag.ListOfPosts = listPosts;
            return(View("ConfirmDelete", listPosts));
        }//End of DeletePost