⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stationprint.aspx.cs

📁 小区物业管理系统源代码,密码:123456,
💻 CS
字号:
//文件名: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)
    {//打印小区车位使用信息
        string MySQL = "Select * From 车位使用 WHERE 车位编号 LIKE '" + this.Request.Params["MyID"].ToString()+"'";
        this.Label1.Text = Session["MyCommunityName"].ToString() + "车位使用信息统计表";
        this.Label2.Text = "打印时间:" + 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());
    }
}

⌨️ 快捷键说明

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