Beispiel #1
0
    protected void btnunlock_Click(object sender, EventArgs e)
    {
        for (int i = 0; i <= gdvuserislock.Rows.Count - 1; i++)
        {
            CheckBox cbox = (CheckBox)gdvuserislock.Rows[i].FindControl("cbxseluser");
            //Label lblshopid = (Label)gdvuserisvilid.Rows[i].FindControl("lblfzusersign");
            if (cbox.Checked == true)
            {
                Guid guid = Guid.Parse(gdvuserislock.Rows[i].Cells[1].Text.Trim());
                aspnet_MembershipTableAdapter amem = new aspnet_MembershipTableAdapter();
                int count = amem.Updateisapproved(true, guid);

                if (count > 0)
                {
                    Response.Write("<script language=javascript>alert('温馨提示:\\n\\n当前用户已成功解除锁定!');</script>");
                    Response.Write("<script language=javascript>window.location.href='userunlock.aspx'</script>");
                    //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n" + GridView1.Rows[i].Cells[2].Text.Trim() + "您已经选择!');", true);
                }

                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n用户店铺由于一些原因审核失败!');", true);
                }
            }
        }
    }
Beispiel #2
0
    protected void btnfzuser_Click(object sender, EventArgs e)
    {
        for (int i = 0; i <= gdvuserisvilid.Rows.Count - 1; i++)
        {
            CheckBox cbox = (CheckBox)gdvuserisvilid.Rows[i].FindControl("cbxseluser");
            Label lblshopid = (Label)gdvuserisvilid.Rows[i].FindControl("lblfzusersign");
            if (cbox.Checked == true)
            {

                Guid guid = Guid.Parse(lblshopid.Text);
                aspnet_MembershipTableAdapter amem = new aspnet_MembershipTableAdapter();
                int count = amem.Updateisapproved(false,guid);

                if (count > 0)
                {
                    Response.Write("<script language=javascript>alert('温馨提示:\\n\\n当前用户已成功冻结!');</script>");
                    Response.Write("<script language=javascript>window.location.href='usermanage.aspx'</script>");
                    //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n" + GridView1.Rows[i].Cells[2].Text.Trim() + "您已经选择!');", true);
                }

                else
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n用户店铺由于一些原因审核失败!');", true);
                }
            }
        }
    }