orderbook.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 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.Drawing;

public partial class orderbook : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            databind();
        }

    }
    public void databind()
    {
        string orderbook = "select * from tblorder";
        GridView1.DataSource = Class1.ExecSel(orderbook);
        GridView1.DataBind();

    }
    //提交收到用户寄到的钱
    protected void Button1_Click(object sender, EventArgs e)
    {
            string sqlstr = "update tblorder set Payed=1 where orderID=" + TextBox2.Text + "";
            Class1.ExecSql(sqlstr);
                 databind();
       
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        databind();
    }
    //查找
    protected void Button3_Click(object sender, EventArgs e)
    {
        string useroder1 = "";
          string   userorder2;
          if (TextBox1.Text != "")
          {
              if (DropDownList1.SelectedValue == "名称")
              {
                  useroder1 = "select * from tblorder where buyerName like '" + TextBox1.Text + "%'";
                  GridView1.DataSource = Class1.ExecSel(useroder1);
                  GridView1.DataBind();
              }
              if (DropDownList1.SelectedValue == "时间")
              {
                  userorder2 = "select *  from tblorder where orderTime like'" + TextBox1.Text + "%'";
                  GridView1.DataSource = Class1.ExecSel(userorder2);
                  GridView1.DataBind();
后面还有 32 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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