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


当前文件路径:HouseManage/ClientManage/QueryClientLeaseForm.aspx.cs 文件类型
普通视图
		            
1//文件名:QueryClientLeaseForm.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 ClientManage_QueryClientLeaseForm : 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("C4") > 1) 21 { 22 Server.Transfer("~/SystemManage/AllErrorHelp.aspx"); 23 } 24 if (!IsPostBack) 25 { 26 String MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; 27 string MySQL = "Select * From 房源参数 Where 自编号='CQ001'"; 28 SqlConnection MyConnection = new SqlConnection(MySQLConnectionString); 29 MyConnection.Open(); 30 DataTable MyHouseTable = new DataTable(); 31 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 32 MyAdapter.Fill(MyHouseTable); 33 string MyName = "城区"; 34 string MyValue = MyHouseTable.Rows[0][MyName].ToString(); 35 String[] MyPayData = MyValue.Split(new char[1] { '' }); 36 foreach (String MyString in MyPayData) 37 { 38 this.DropDownList1.Items.Add(MyString); 39 } 40 MyName = "装修"; 41 MyValue = MyHouseTable.Rows[0][MyName].ToString(); 42 String[] MyDecData = MyValue.Split(new char[1] { '' }); 43 foreach (String MyString in MyDecData) 44 { 45 this.DropDownList2.Items.Add(MyString); 46 } 47 if (MyConnection.State == ConnectionState.Open) 48 { 49 MyConnection.Close(); 50 } 51 } 52 } 53 protected void Button1_Click(object sender, EventArgs e) 54 {//查询求租客源 55 DataTable MyQueryTable = new System.Data.DataTable(); 56 SqlConnection MyConnection = new SqlConnection(); 57 MyConnection.ConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; 58 MyConnection.Open(); 59 MySQL = "SELECT * FROM 求租客源视图 WHERE ('" + 60 this.TextBox1.Text + "' BETWEEN 委托日期 AND 截止日期) AND (所在城区='" + 61 this.DropDownList1.SelectedValue.ToString() + "') AND (装修级别='" + 62 this.DropDownList2.SelectedValue.ToString() + 63 "') AND ( 最小房间数>=" + this.TextBox4.Text + ") AND (最大房间数<=" + 64 this.TextBox5.Text + ") AND (最小面积>=" + this.TextBox6.Text + ") AND (最大面积<=" + 65 this.TextBox7.Text + ") AND (最低租价>=" + this.TextBox8.Text + ") AND (最高租价<=" + 66 this.TextBox9.Text + ")"; 67 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 68 MyAdapter.Fill(MyQueryTable); 69 this.GridView1.DataSource = MyQueryTable; 70 this.GridView1.DataBind(); 71 if (MyConnection.State == ConnectionState.Open) 72 { 73 MyConnection.Close(); 74 } 75 } 76 public string MyPrintSQL 77 {//设置要传递到打印页的数据 78 get 79 { 80 return MySQL; 81 } 82 } 83 public String MyPrintDate 84 {//设置要传递到打印页的数据 85 get 86 { 87 return "当前日期:" + DateTime.Now.ToShortDateString() + " 查询条件:所在城区:" + 88 this.DropDownList1.SelectedValue.ToString() + " 装修级别:" + 89 this.DropDownList2.SelectedValue.ToString() + " 房型:" + this.TextBox4.Text + "房至" + 90 this.TextBox5.Text + "房 建筑面积:" + this.TextBox6.Text + "" + 91 this.TextBox7.Text + "m2 价格:" + this.TextBox8.Text + "" + 92 this.TextBox9.Text + ""; 93 } 94 } 95 protected void Button2_Click(object sender, EventArgs e) 96 {//打印求租客源 97 Server.Transfer("~/ClientManage/QueryClientLeasePrint.aspx"); 98 } 99} 100
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net房产中介管理系统源码及常用文档

- ifnuke version 4.0.0源码

- 逐迹内容管理系统AspxNuke v..

- 飞翔多用户访问统计系统源码

- ASP.NET经典案例源码之入门源码

- X3BLOG for ACCESS 1.0beta ..

- 多皮肤商企业产品发布系统.N..

- 商务维基网源码

- 捷丰网络硬盘源码

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