admin/manageuser.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class admin_manageuser : System.Web.UI.Page
{
myuser lxh = new myuser();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
bindgridview();
}
}
//绑定控件
private void bindgridview()
{
lxh.mypath = Server.MapPath("~");
lxh.getallusers(GridView1);
}
//全选
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cbx = (CheckBox)row.FindControl("CheckBox1");
if (cbx != null)
{
if (CheckBox2.Checked == true)
{
cbx.Checked = true;
}
else
{
cbx.Checked = false;
}
}
}
}
//删除
protected void Button1_Click(object sender, EventArgs e)
{
lxh.mypath = Server.MapPath("~");
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox cbx = (CheckBox)row.FindControl("CheckBox1");
if (cbx != null)
{
if (cbx.Checked == true)
{
int guestid = Int32.Parse(GridView1.DataKeys[row.RowIndex].Value.ToString());
lxh.deluserbyid(guestid);
}
后面还有 78 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。