sqltest.aspx.cs

来自「课程设计了」· CS 代码 · 共 48 行

CS
48
字号
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 sqltest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!Page.IsPostBack)
        {
            this.LbShowTongBeing.Text = System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");

            this.LbShowTongEnd.Text = System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");

            this.LbShowToday.Text = System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");


        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string BeginTime = this.SearchBeginTime.Text.ToString();
        string EndTime = this.SearchEndTime.Text.ToString();
        this.LbShowTongBeing.Text = BeginTime;
        this.LbShowTongEnd.Text = EndTime;

        this.SqlDataSource1.DataBind();
        this.GridView1.DataBind();

       this.SqlDataSource2.DataBind();
       this.GridView2.DataBind();

      this.SqlDataSource3.DataBind();
       this.GridView3.DataBind();

    this.SqlDataSource4.DataBind();
       this.GridView4.DataBind();
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?