?? generalsearch.ascx.cs
字號:
/*****************************
* 創建者:周建波
* 創建日期:2003-12-15
* 功能:顯示通用查詢的結果
* */
namespace OI.UserControls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ZHENGYI;
/// <summary>
/// GeneralSearch 的摘要說明。
/// </summary>
public class GeneralSearch : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;
protected OI.DatabaseOper.DatabaseConnect dc=new OI.DatabaseOper.DatabaseConnect();
protected DataGridNavigation DataGridNavigation1;
protected System.Web.UI.WebControls.Label LabelValue;
/// <summary>
/// 取得數據集的sql
/// </summary>
public string SQL {
set{
this.LabelValue.Text=value;
}
get {
return this.LabelValue.Text;
}
}
private void Page_Load(object sender, System.EventArgs e)
{
// 在此處放置用戶代碼以初始化頁面
//dc=new OI.DatabaseOper.DatabaseConnect();
ZHENGYI.BindDataDelegate f =new ZHENGYI.BindDataDelegate (DataBindToGrid);//修改這個dataBind,讓f 指向你的方法。
DataGridNavigation1.SetTarget(DataGrid1,f,10);
}
public void DataBindToGrid() {
DataTable dt=null;
dt=dc.getBinding(this.LabelValue.Text,"abc").Tables[0];
DataGrid1.DataSource=dt;
DataGrid1.DataBind();
}
#region Web 窗體設計器生成的代碼
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 該調用是 ASP.NET Web 窗體設計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器
/// 修改此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -