DeletePost
参数为BlogPostType类型的自定义枚举变量
public override void DeletePost(int sectionID, int postID, int userID, BlogPostType blogPostType)

{
using( SqlConnection myConnection = GetSqlConnection() ) 
{
SqlCommand myCommand = new SqlCommand(databaseOwner + ".cs_weblog_Post_Delete", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
myCommand.Parameters.Add("@SectionID", SqlDbType.Int, 4).Value = sectionID;
//14
//欲删除的帖子所属的个人的Blog(Photo)
myCommand.Parameters.Add("@PostID", SqlDbType.Int, 4).Value = postID;
//14
//欲删除的帖子ID
myCommand.Parameters.Add("@UserID", SqlDbType.Int, 4).Value = userID;
//2105
//经过运算后从GUID得到的int
myCommand.Parameters.Add("@BlogPostType", SqlDbType.TinyInt).Value = blogPostType;
//Post
//自定义枚举类型(Post类型)
myCommand.Parameters.Add(this.SettingsIDParameter());
//@SettingsID=sqlHelper.GetSettingsID()
//不知道
//很多地方都用到,一般为1000或1001
// Execute the command
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}
}
浙公网安备 33010602011771号