예제 #1
0
 protected void rptStoreMessage_ItemCommond(object sender, RepeaterCommandEventArgs e)
 {
     if (e.CommandName.Equals("del"))
     {
         int ID = Convert.ToInt32(e.CommandArgument);
         StoreMessageBrowser.DeleteStoreMessage(ID);
         this.Page.Response.Write("<script>alert('删除成功!');window.location='MyStoreMessage.aspx?t=1';</script>");
     }
 }
예제 #2
0
        //private void grdArticleList_ReBindData(object sender)
        //{
        //    this.BindSearch();
        //}



        private void grdArticleList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int ID = (int)this.grdStoreMessage.DataKeys[e.RowIndex].Value;

            if (StoreMessageBrowser.DeleteStoreMessage(ID))
            {
                this.BindSearch();
                this.ShowMsg("成功删除了一条留言", true);
            }
            else
            {
                this.ShowMsg("删除失败", false);
            }
        }