Admin/develop.aspx.cs

(开头部分) 6KB

这里只显示每个文件的开头 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;
using System.Data.OleDb;
using System.IO;

public partial class develop : System.Web.UI.Page
{
    private Int32 FileLength = 0;
    OleDbConnection MyConn;
    protected void Page_Load(object sender, EventArgs e)
    {
        //string decription = Request.QueryString["action"];
        MyConn = DB.CreateDB();
        MyConn.Open();
        OleDbCommand cmd = new OleDbCommand("select Description,Detail1 from pro_type where Pro_Name='develop1'", MyConn);
        DataSet ds = new DataSet();
        OleDbDataAdapter da = new OleDbDataAdapter(cmd);
        da.Fill(ds, "pro_type");
        if (ds.Tables["pro_type"].DefaultView.Count > 0)
        {
            DataRowView rowview = ds.Tables["pro_type"].DefaultView[0];
            this.Label1.Text = rowview["description"].ToString();
            this.Label3.Text = rowview["description"].ToString();
        }

        if (Session["UserID"] == "" || Session["UserID"] == null)
        {
            Response.Write("<script language=javascript>window.alert('为了系统安全,请您重新登陆');window.location.href=('Admin_Login.aspx')</script>");
        }
        this.DataToBind();
    }
    private void DataToBind()
    {
        string ptype = Request.QueryString["p"];
        MyConn = DB.CreateDB();
        MyConn.Open();
        OleDbCommand cmd = new OleDbCommand("select * from product where pro_name='" + ptype + "'", MyConn);
        DataSet ds = new DataSet();
        OleDbDataAdapter da = new OleDbDataAdapter(cmd);
        da.Fill(ds, "product");
        this.GgGrid.DataKeyField = "id";
        this.GgGrid.DataSource = ds;
        this.GgGrid.DataBind();
        MyConn.Close();
    }
    protected void GgGrid_DeleteCommand(object source, DataGridCommandEventArgs e)
    {

        MyConn = DB.CreateDB();
        MyConn.Open();
        string ID = this.GgGrid.DataKeys[e.Item.ItemIndex].ToString();
        OleDbCommand cmd1 = new OleDbCommand("delete from product where id=" + ID, MyConn);
后面还有 96 行代码,购买后查看完整代码

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

AI 解读

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

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