private void DeleteTopic(int topicid) { TopicInfo t = Topics.GetTopic(topicid); int forumid = t.ForumId; Topics.Delete(t); InvalidateForumCache(); Response.Redirect("~/Content/Forums/Forum.aspx?FORUM=" + forumid); }
public APIReturn Delete_delete(ulong?Id) { int affrows = Topics.Delete(Id); if (affrows > 0) { return(new APIReturn(0, string.Format("删除成功,影响行数:{0}", affrows))); } return(new APIReturn(99, "失败")); }
public IActionResult 除(ulong id) { TopicsInfo topic = Topics.GetItem(id); if (topic.Owner_users_id == LoginUser.Id || LoginUser.Id == 1 //管理员 ) { Topics.Delete(id); return(Json(new { success = true, message = "成功" })); } return(Json(new { success = false, message = "没有权限删除" })); }
private void DeleteTopic(int topicid) { var lbl = UpdateProgress1.FindControl("lblProgress"); if (lbl != null) { ((Label)lbl).Text = "Deleting Topic"; } Topics.Delete(topicid); InvalidateCache(); ForumTable.DataBind(); }
public void DeletePost(string topicid, string replyid, string jsonform) { var form = HttpUtility.UrlDecode(jsonform); System.Collections.Specialized.NameValueCollection formresult = HttpUtility.ParseQueryString(form); string reason = formresult["ctl00$txtReason"]; int adminmodid = Convert.ToInt32(formresult["ctl00$hdnModerator"]); if (!String.IsNullOrEmpty(topicid)) { Topics.Delete(Convert.ToInt32(topicid)); } if (!String.IsNullOrEmpty(replyid)) { Replies.DeleteReply(Convert.ToInt32(replyid)); } if (!string.IsNullOrEmpty(reason) && Config.UseEmail) { ProcessModeration(1, Convert.ToInt32(topicid), Convert.ToInt32(replyid), adminmodid, reason); } }
protected void DeleteTopic(int topicid) { Topics.Delete(topicid); Response.Redirect(Request.RawUrl); }