Ejemplo n.º 1
0
        /// <summary>
        /// Update Recipe Comment
        /// </summary>
        /// <returns></returns>
        public int UpdateRecipeComments(Comment comment)
        {
            SqlParameter prmID = new SqlParameter("@ID", SqlDbType.Int, 4);
               prmID.Value = comment.ID;

               SqlParameter prmComment = new SqlParameter("@Comment", SqlDbType.VarChar, 350);
               prmComment.Value = comment.Comments;

               return DataAccess.Execute("UpdateRecipeComments", prmID, prmComment);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Delete individual article comment
        /// </summary>
        /// <returns></returns>
        public int DeleteArticleComment(Comment comment)
        {
            SqlParameter prmID = new SqlParameter("@ID", SqlDbType.Int, 4);
              prmID.Value = comment.ID;

              SqlParameter prmAID = new SqlParameter("@AID", SqlDbType.Int, 4);
              prmAID.Value = comment.RECID;

              return DataAccess.Execute("AdminDeleteArticleComments", prmID, prmAID);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Insert article comments
        /// </summary>
        /// <returns></returns>
        public int InsertArticleComment(Comment comment)
        {
            SqlParameter prmCommentID = new SqlParameter("@ID", SqlDbType.Int, 4);
              prmCommentID.Value = comment.ID;

              SqlParameter prmAuthor = new SqlParameter("@Author", SqlDbType.VarChar, 50);
              prmAuthor.Value = comment.Author;

              SqlParameter prmEmail = new SqlParameter("@Email", SqlDbType.VarChar, 50);
              prmEmail.Value = comment.Email;

              SqlParameter prmComment = new SqlParameter("@Comments", SqlDbType.VarChar, 350);
              prmComment.Value = comment.Comments;

              SqlParameter prmUserID = new SqlParameter("@UserID", SqlDbType.Int, 4);
              prmUserID.Value = comment.UID;

              return DataAccess.Execute("spInsertArticleComment", prmCommentID, prmAuthor, prmEmail, prmComment, prmUserID);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Delete Recipe Comment
        /// </summary>
        /// <returns></returns>
        public int AdminDeleteRecipeComments(Comment comment)
        {
            SqlParameter prmID = new SqlParameter("@COMID", SqlDbType.Int, 4);
               prmID.Value = comment.ID;

               SqlParameter prmRecipeID = new SqlParameter("@RecipeID", SqlDbType.Int, 4);
               prmRecipeID.Value = comment.RECID;

               return DataAccess.Execute("AdminDeleteRecipeComments", prmID, prmRecipeID);
        }