ST_main.aspx.cs
上传用户:wyx_1982
上传日期:2020-04-18
资源大小:699k
文件大小:2k
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace ST_GROUP.EnterpriseOnlineInfoManage
- {
- /// <summary>
- /// ST_main 的摘要说明。
- /// </summary>
- public partial class ST_main : System.Web.UI.Page
- {
- protected System.Web.UI.WebControls.Button Button1;
- protected System.Web.UI.WebControls.Button Button2;
- protected System.Web.UI.WebControls.TextBox TextBox1;
- protected System.Web.UI.WebControls.TextBox TextBox2;
- protected System.Web.UI.WebControls.TextBox TextBox3;
- protected System.Web.UI.WebControls.Button Button3;
- ST_DataBase ST_database = new ST_DataBase();
-
- protected void Page_Load(object sender, System.EventArgs e)
- {
- // 在此处放置用户代码以初始化页面
- string ST_strsql;
- ST_strsql = "SELECT top 8 * FROM ST_tNews where ST_newsclass='业内新闻' order by ST_ID desc ";
- DataTable ST_dt = ST_database.ReadTable(ST_strsql);
- DataGrid1.DataSource = ST_dt;
- DataGrid1.DataBind();
- ST_strsql = "SELECT top 8 * FROM ST_tNews where ST_newsclass='本站新闻' order by ST_ID desc ";
- ST_dt = ST_database.ReadTable(ST_strsql);
- DataGrid2.DataSource = ST_dt;
- DataGrid2.DataBind();
- ST_strsql = "select top 6 * from ST_tProduct order by ST_ID desc";
- ST_dt = ST_database.ReadTable(ST_strsql);
- DataList1.DataSource = ST_dt;
- DataList1.DataBind();
- }
- #region Web 窗体设计器生成的代码
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- private void DataGrid2_SelectedIndexChanged(object sender, System.EventArgs e)
- {
-
- }
- }
- }