コード例 #1
0
ファイル: ManageMembers.cs プロジェクト: tyriankid/WFX3.5_SJK
        private void BatchHuifu_click(object sender, System.EventArgs e)
        {
            string text = "";

            ManagerHelper.CheckPrivilege(Privilege.DeleteMember);
            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 (MemberHelper.BacthHuifu(text))
            {
                this.ShowMsg("成功恢复了选择的会员!", true);
                this.BindData();
            }
        }
コード例 #2
0
ファイル: ManageMembers.cs プロジェクト: 123456-cq/xkq34_src
        private void BatchHuifu_click(object sender, EventArgs e)
        {
            string str = "";

            ManagerHelper.CheckPrivilege(Privilege.DeleteMember);
            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 (MemberHelper.BacthHuifu(str))
            {
                this.ShowMsg("成功恢复了选择的会员!", true);
                this.BindData();
            }
        }