Exemplo n.º 1
0
    public string ToRecycle(string idList)
    {
        Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend();
        string userName = Page.User.Identity.Name;

        string[] s = idList.Split(',');
        for (int i = 0; i < s.Length; i++)
        {
            if (s[i].Trim() != "")
            {
                int contactID = Convert.ToInt32(s[i].Trim());
                friendBll.DeleteFriend(contactID);
            }
        }
        return("ok");
    }
Exemplo n.º 2
0
    protected void ButtonInfoDelete_Click(object sender, EventArgs e)
    {
        //删除所选
        CheckBox chk;

        Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend();

        for (int i = 0; i < this.friendListGridView.Rows.Count; i++)
        {
            chk = (CheckBox)this.friendListGridView.Rows[i].Cells[0].FindControl("chkSelect");

            if (chk != null)
            {
                if (chk.Checked)
                {
                    int contactID = Convert.ToInt32(this.friendListGridView.DataKeys[i].Value);
                    friendBll.DeleteFriend(contactID);
                }
            }
        }
        getList();
    }