public void Delete_Click(object sender, EventArgs e) { int PMID = (int)Util.Val(Request.QueryString["pmid"]); PrivateMessageRepository Message = new PrivateMessageRepository(); Message.LyricUserID = UserIdentity.UserID; Message.ID = PMID; Message.Delete(Message); Response.Redirect("confirmupdateprivatemsg.aspx?mode=delete&pid=" + PMID); }
private void DeleteInBoxPM() { if (Authentication.IsUserAuthenticated) { if (!string.IsNullOrEmpty(Request.QueryString["pmid"]) && Utility.IsNumeric(Request.QueryString["pmid"])) { PrivateMessageRepository Message = new PrivateMessageRepository(); Message.LyricUserID = UserIdentity.UserID; Message.ID = int.Parse(Request.QueryString["pmid"]); Message.Delete(Message); Message = null; Response.Write(" "); } } else { Response.Write("Không có quyền."); } }