void btnDelete_Click(object sender, EventArgs e)
    {
        Tz888.BLL.LeaveMsg msgBLL    = new Tz888.BLL.LeaveMsg();
        Button             btn       = new Button();
        string             commentId = "";

        btn       = (Button)sender;
        commentId = btn.ID.Substring(btn.ID.LastIndexOf("_") + 1);

        bool result = msgBLL.DeleteLeaveMsg(Convert.ToInt32(commentId), 0);//0 虚拟删除留言  1 永远删除留言

        getList();
    }
    protected void brnDelete_Click(object sender, EventArgs e)
    {
        Tz888.BLL.LeaveMsg msgBLL = new Tz888.BLL.LeaveMsg();
        LinkButton         btn    = new LinkButton();
        int Id;

        btn = (LinkButton)sender;
        Id  = Convert.ToInt32(btn.CommandName.Trim());

        bool result = msgBLL.DeleteLeaveMsg(Id, 0);//0 虚拟删除留言  1 永远删除留言

        getList();
    }
Example #3
0
 public string deleteAll(string idList)
 {
     Tz888.BLL.LeaveMsg leaveMsgBll = new Tz888.BLL.LeaveMsg();
     string[]           s           = idList.Split(',');
     for (int i = 0; i < s.Length; i++)
     {
         if (s[i].ToString() != "")
         {
             bool b = leaveMsgBll.DeleteLeaveMsg(Convert.ToInt32(s[i]), 1);
         }
     }
     return("ok");
 }
    public string ToRecycle(string idList)
    {
        Tz888.BLL.LeaveMsg leaveMsgBll = new Tz888.BLL.LeaveMsg();
        string             userName    = Page.User.Identity.Name;

        string[] s = idList.Split(',');
        for (int i = 0; i < s.Length; i++)
        {
            if (s[i].Trim() != "")
            {
                int Id = Convert.ToInt32(s[i].Trim());
                leaveMsgBll.DeleteLeaveMsg(Id, 0);
            }
        }
        return("ok");
    }
    protected void btnDeleteSelect_Click(object sender, EventArgs e)
    {
        CheckBox chk;
        Label    lb;

        Tz888.BLL.LeaveMsg leaveMsgBll = new Tz888.BLL.LeaveMsg();
        for (int i = 0; i < this.rptCommentReceive.Items.Count; i++)
        {
            chk = (CheckBox)this.rptCommentReceive.Items[i].FindControl("chkCommentSelect");
            lb  = (Label)this.rptCommentReceive.Items[i].FindControl("lbCommentID");
            if (chk.Checked)
            {
                leaveMsgBll.DeleteLeaveMsg(Convert.ToInt32(lb.Text), 0);
            }
        }
        getList();
    }