protected void btnAddFriend_Click(object sender, EventArgs e) { Button btn; btn = (Button)sender; Tz888.BLL.GoodFriend friendBll = new Tz888.BLL.GoodFriend(); friendBll.BlackListManage(Convert.ToInt32(btn.CommandName.Trim()), 1); getList(); }
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() != "") { friendBll.BlackListManage(Convert.ToInt32(s[i]), 0); } } return("ok"); }
protected void btnBlackList_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("checkbox2"); if (chk != null) { if (chk.Checked) { int contactID = Convert.ToInt32(this.friendListGridView.DataKeys[i].Value); friendBll.BlackListManage(contactID, 0); } } } getList(); }