您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->Asp.net房产中介管理系统源码及常用文档>>ContractManage/QueryLeasePrint.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:Asp.net房产中介管理系统源码及常用文档


当前文件路径:HouseManage/ContractManage/QueryLeasePrint.aspx.cs 文件类型
普通视图
		            
1//文件名:QueryLeasePrint.aspx.cs 2using System; 3using System.Data; 4using System.Configuration; 5using System.Collections; 6using System.Web; 7using System.Web.Security; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11using System.Web.UI.HtmlControls; 12 13using System.Data.SqlClient; 14public partial class ContractManage_QueryLeasePrint : System.Web.UI.Page 15{ 16 private ContractManage_QueryLeaseForm MyPrintForm; 17 protected void Page_Load(object sender, EventArgs e) 18 {//将查询结果输出到Excel文件中 19 MyPrintForm = (ContractManage_QueryLeaseForm)Context.Handler; 20 string MySQL = MyPrintForm.MyPrintSQL; 21 this.Label1.Text = Session["MyCompanyName"].ToString() + "租房信息查询结果表"; 22 this.Label2.Text = MyPrintForm.MyPrintDate; 23 string MyConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; ; 24 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString); 25 DataSet MySet = new DataSet(); 26 MyAdapter.Fill(MySet); 27 this.DataGrid1.DataSource = MySet; 28 this.DataGrid1.DataBind(); 29 this.Response.ContentType = "application/vnd.ms-excel"; 30 this.Response.Charset = ""; 31 this.EnableViewState = false; 32 System.IO.StringWriter MyWriter; 33 System.Web.UI.HtmlTextWriter MyWeb; 34 MyWriter = new System.IO.StringWriter(); 35 MyWeb = new System.Web.UI.HtmlTextWriter(MyWriter); 36 this.DataGrid1.RenderControl(MyWeb); 37 Response.Write(MyWriter.ToString()); 38 } 39} 40
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net房产中介管理系统源码及常用文档

- Shang-Blog V1.0(免安装集成..

- 简单的验证码实例(全部源代..

- 达达ASP.NET企业信息管理系统

- 仿新浪投票系统源码

- Asp.net简单多用户Blog程序源码

- 明日Asp.net销售管理系统源码

- 网博直销系统软件源码

- Asp.net企业项目资料管理系统..

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号