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


当前文件路径:HouseManage/ContractManage/QueryLeaseForm.aspx.cs 文件类型
普通视图
		            
1//文件名:QueryLeaseForm.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_QueryLeaseForm : System.Web.UI.Page 15{ 16 private static string MySQL = ""; 17 protected void Page_Load(object sender, EventArgs e) 18 { 19 string MyForbidString = Session["MyForbid"].ToString(); 20 if (MyForbidString.IndexOf("D5") > 1) 21 { 22 Server.Transfer("~/SystemManage/AllErrorHelp.aspx"); 23 } 24 if (!IsPostBack) 25 { 26 String MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; 27 SqlConnection MyConnection = new SqlConnection(MySQLConnectionString); 28 MyConnection.Open(); 29 string MySQL = "Select * From 职员信息"; 30 DataTable MyPersonnelTable = new DataTable(); 31 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 32 MyAdapter.Fill(MyPersonnelTable); 33 string MyName = "职员姓名"; 34 string MyValue = MyPersonnelTable.Rows[0][MyName].ToString(); 35 foreach (DataRow MyRow in MyPersonnelTable.Rows) 36 { 37 this.DropDownList1.Items.Add(MyRow[MyName].ToString()); 38 } 39 if (MyConnection.State == ConnectionState.Open) 40 { 41 MyConnection.Close(); 42 } 43 } 44 } 45 protected void Button1_Click(object sender, EventArgs e) 46 {//查询租房信息 47 DataTable MyQueryTable = new System.Data.DataTable(); 48 SqlConnection MyConnection = new SqlConnection(); 49 MyConnection.ConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; 50 MyConnection.Open(); 51 MySQL = "SELECT * FROM 租售成交 WHERE ((资料类型='出租房源') OR (资料类型='求租客源')) AND ( 成交日期 BETWEEN '" + 52 this.TextBox1.Text + "' AND '" + this.TextBox2.Text + "') AND (合同编号 LIKE '%" + this.TextBox3.Text + 53 "%') AND (资料编号 LIKE '%" + this.TextBox4.Text + "%') AND (经办人员='" + this.DropDownList1.SelectedValue.ToString() + "')"; 54 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 55 MyAdapter.Fill(MyQueryTable); 56 this.GridView1.DataSource = MyQueryTable; 57 this.GridView1.DataBind(); 58 if (MyConnection.State == ConnectionState.Open) 59 { 60 MyConnection.Close(); 61 } 62 } 63 public string MyPrintSQL 64 {//设置要传递到打印页的数据 65 get 66 { 67 return MySQL; 68 } 69 } 70 public String MyPrintDate 71 {//设置要传递到打印页的数据 72 get 73 { 74 return "当前日期:" + DateTime.Now.ToShortDateString() + " 经办人员:" + this.DropDownList1.SelectedValue.ToString(); 75 } 76 } 77 protected void Button2_Click(object sender, EventArgs e) 78 {//打印租房信息 79 Server.Transfer("~/ContractManage/QueryLeasePrint.aspx"); 80 } 81} 82
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net房产中介管理系统源码及常用文档

- 中文彩色验证码实现(变形\噪..

- 包哥Asp.net留言板源码

- 我的VS2008通讯录项目源码

- 网博Fms在线直播系统

- 酒店管理系统项目源码(三层开发)

- 天风网上商店系统 Beta版源码

- DiscuzNT1.0(Asp.net2.0)SQL..

- 高校教师档案管理系统项目源码

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