Web/admin/searchUser.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
using Maticsoft.DBUtility;

public partial class admin_searchUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (CheckLogin.meb_Login() == false)
        {
            JScript.AlertAndRedirect("连接超时或尚未登录", "/admin/login.aspx", this.Page);
            return;
        }
        if (!this.IsPostBack)
        {
            this.databind();
        }
    }

    //这个是搜索按钮事件
    protected void Button1_Click(object sender, EventArgs e)
    {
        this.databind();

    }
    //清空搜索条件
    protected void Button2_Click(object sender, EventArgs e)
    {
        this.txtUserName.Text = "";

        this.databind();

    }

    private void databind()
    {
        //代码搜索开始
        string where = "1=1";
        if (this.txtUserName.Text.Trim() != "")
        {
            where += " AND number_name like '%" + this.txtUserName.Text.Trim() + "%'";
        }
        DataSet ds = DbHelperOleDb.Query("select * from tbMember where " + where);

        this.GridView1.DataSource = ds;
        this.GridView1.DataBind();

    }

    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        this.GridView1.EditIndex = e.NewEditIndex;
        this.databind();
后面还有 97 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。