コード例 #1
0
 protected void grdMemberList_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     if (CustomGroupingHelper.DelGroupUser(this.grdMemberList.DataKeys[e.RowIndex].Value.ToString(), this.currentGroupId))
     {
         this.BindData();
     }
 }
コード例 #2
0
        protected void lkbDelectCheck_Click(object sender, System.EventArgs e)
        {
            string text = "";

            foreach (System.Web.UI.WebControls.GridViewRow gridViewRow in this.grdMemberList.Rows)
            {
                System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox)gridViewRow.FindControl("checkboxCol");
                if (checkBox.Checked)
                {
                    text = text + this.grdMemberList.DataKeys[gridViewRow.RowIndex].Value.ToString() + ",";
                }
            }
            text = text.TrimEnd(new char[]
            {
                ','
            });
            if (string.IsNullOrEmpty(text))
            {
                this.ShowMsg("请先选择要移除的会员账号!", false);
                return;
            }
            if (CustomGroupingHelper.DelGroupUser(text, this.currentGroupId))
            {
                this.BindData();
            }
        }
コード例 #3
0
        protected void grdMemberList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            string userId = this.grdMemberList.DataKeys[e.RowIndex].Value.ToString();

            if (CustomGroupingHelper.DelGroupUser(userId, this.currentGroupId))
            {
                this.BindData();
            }
        }
コード例 #4
0
        protected void lkbDelectCheck_Click(object sender, EventArgs e)
        {
            string str = "";

            foreach (GridViewRow row in this.grdMemberList.Rows)
            {
                CheckBox box = (CheckBox)row.FindControl("checkboxCol");
                if (box.Checked)
                {
                    str = str + this.grdMemberList.DataKeys[row.RowIndex].Value.ToString() + ",";
                }
            }
            str = str.TrimEnd(new char[] { ',' });
            if (string.IsNullOrEmpty(str))
            {
                this.ShowMsg("请先选择要移除的会员账号!", false);
            }
            else if (CustomGroupingHelper.DelGroupUser(str, this.currentGroupId))
            {
                this.BindData();
            }
        }