DDList.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class DDList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //调用函数
            initDg();

        }
    }

    private void initDg()
    {
        //查询订单信息 显示载列表中
        DataTable tmpda = new DataTable();
        tmpda = DataBase.Get_Table("select * from SMDD");
        this.GridView1.DataSource = tmpda;
        this.GridView1.DataBind();
        //根据不同的登陆人员 判断所使用的功能是否允许被使用
        if (Session["UserID"].ToString() == "admin")
        {
            this.GridView1.DataSource = DataBase.Get_Table("select * from SMDD order by ddrq DESC");
            this.GridView1.DataBind();
            this.LinkButton1.Visible = false;
        }
        else
        {
            this.GridView1.DataSource = DataBase.Get_Table("select * from SMDD where kh='" + Session["UserID"].ToString() + "' order by ddrq DESC");
            this.GridView1.DataBind();
            this.GridView1.Columns[7].Visible = false;
        }

    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        //跳转页面
        Response.Redirect("index0.aspx");
    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "SeeUser")
        {
            //打开查看会员信息窗体
            string Key = this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)]["Kh"].ToString();
            Response.Write("<script>window.open('UserUpdate.aspx?Flag=See&ID=" + Key + "');</script>");

        }
        else if (e.CommandName == "See")
后面还有 9 行代码,购买后查看完整代码

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

AI 解读 AI

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

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