ST_kprolist.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_kprolist 的摘要说明。
- /// </summary>
- public partial class ST_kprolist : System.Web.UI.Page
- {
- ST_DataBase ST_database = new ST_DataBase();
-
- protected void Page_Load(object sender, System.EventArgs e)
- {
- // 在此处放置用户代码以初始化页面
- string ST_strsql;
- if (Request.Params["skey"] == null)
- {
- if (Request.Params["proclassid"] != null )
- {
- string cproid = Request.Params["proclassid"].ToString();
- ST_strsql = "select top 10 * from ST_tProduct where ST_productclass='" + cproid + "' order by ST_ID desc";
-
- //Response.Write(strsql);
- DataTable ST_dt = new DataTable();
- ST_dt = ST_database.ReadTable(ST_strsql);
- DataList1.DataSource = ST_dt;
- DataList1.DataBind();
- }
- else
- {
- ST_strsql = "select * from ST_tProduct order by ST_ID desc";
- //Response.Write(strsql);
- DataTable ST_dt = new DataTable();
- ST_dt = ST_database.ReadTable(ST_strsql);
- DataList1.DataSource = ST_dt;
- DataList1.DataBind();
- }
- }
- else
- {
- ST_strsql = "select top 10 * from ST_tProduct where ST_productname like '%" + Request.Params["skey"].ToString() + "%' order by ST_ID desc";
- Response.Write(ST_strsql);
- DataTable ST_dt = new DataTable();
- ST_dt = ST_database.ReadTable(ST_strsql);
- DataList1.DataSource = ST_dt;
- DataList1.DataBind();
- }
-
- //Response.Write(cproid);
-
-
- }
- #region Web 窗体设计器生成的代码
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- }
- }