?? stationprint.aspx.cs
字號(hào):
?//文件名:StationPrint.aspx.cs
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.Data.SqlClient;
public partial class CommunityManage_StationPrint : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{//打印小區(qū)車位使用信息
string MySQL = "Select * From 車位使用 WHERE 車位編號(hào) LIKE '" + this.Request.Params["MyID"].ToString()+"'";
this.Label1.Text = Session["MyCommunityName"].ToString() + "車位使用信息統(tǒng)計(jì)表";
this.Label2.Text = "打印時(shí)間:" + DateTime.Now.ToShortDateString();
string MyConnectionString = ConfigurationManager.ConnectionStrings["MyCommunityDBConnectionString"].ConnectionString; ;
SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
DataSet MySet = new DataSet();
MyAdapter.Fill(MySet);
this.DataGrid1.DataSource = MySet;
this.DataGrid1.DataBind();
this.Response.ContentType = "application/vnd.ms-excel";
this.Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter MyWriter;
System.Web.UI.HtmlTextWriter MyWeb;
MyWriter = new System.IO.StringWriter();
MyWeb = new System.Web.UI.HtmlTextWriter(MyWriter);
this.DataGrid1.RenderControl(MyWeb);
Response.Write(MyWriter.ToString());
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -