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


当前文件路径:HouseManage/ContractManage/TraceForm.aspx.cs 文件类型
普通视图
		            
1//文件名:TraceForm.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_TraceForm : System.Web.UI.Page 15{ 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 string MyForbidString = Session["MyForbid"].ToString(); 19 if (MyForbidString.IndexOf("D2") > 1) 20 { 21 Server.Transfer("~/SystemManage/AllErrorHelp.aspx"); 22 } 23 if (!IsPostBack) 24 { 25 String MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyHouseDBConnectionString"].ConnectionString; 26 string MySQL = "Select * From 其他参数 Where 自编号='CQ001'"; 27 SqlConnection MyConnection = new SqlConnection(MySQLConnectionString); 28 MyConnection.Open(); 29 DataTable MyHouseTable = new DataTable(); 30 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 31 MyAdapter.Fill(MyHouseTable); 32 string MyName = "跟进方式"; 33 string MyValue = MyHouseTable.Rows[0][MyName].ToString(); 34 String[] MyDistData = MyValue.Split(new char[1] { '' }); 35 foreach (String MyString in MyDistData) 36 { 37 this.DropDownList3.Items.Add(MyString); 38 } 39 MySQL = "Select * From 职员信息"; 40 DataTable MyPersonnelTable = new DataTable(); 41 MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 42 MyAdapter.Fill(MyPersonnelTable); 43 MyName = "职员姓名"; 44 MyValue = MyPersonnelTable.Rows[0][MyName].ToString(); 45 foreach (DataRow MyRow in MyPersonnelTable.Rows) 46 { 47 this.DropDownList1.Items.Add(MyRow[MyName].ToString()); 48 } 49 if (MyConnection.State == ConnectionState.Open) 50 { 51 MyConnection.Close(); 52 } 53 } 54 } 55 protected void Button2_Click(object sender, EventArgs e) 56 {//新增经纪跟进信息 57 this.SqlDataSource1.Insert(); 58 } 59 protected void Button3_Click(object sender, EventArgs e) 60 {//修改经纪跟进信息 61 this.SqlDataSource1.Update(); 62 } 63 protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) 64 {//弹出删除操作确认对话框 65 if (e.Row.RowType == DataControlRowType.DataRow) 66 { 67 Button MyButton = (Button)e.Row.FindControl("Button1"); 68 MyButton.OnClientClick = "return confirm('是否确认删除当前选择的记录?')"; 69 } 70 } 71 protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) 72 {//在控件中显示选择的记录 73 this.TextBox4.Text = this.GridView1.SelectedRow.Cells[2].Text.ToString(); 74 this.DropDownList1.SelectedValue = this.GridView1.SelectedRow.Cells[3].Text.ToString(); 75 this.DropDownList2.SelectedValue = this.GridView1.SelectedRow.Cells[4].Text.ToString(); 76 this.TextBox6.Text = this.GridView1.SelectedRow.Cells[5].Text.ToString(); 77 this.TextBox7.Text = this.GridView1.SelectedRow.Cells[6].Text.ToString(); 78 this.DropDownList3.SelectedValue = this.GridView1.SelectedRow.Cells[7].Text.ToString(); 79 this.TextBox9.Text = this.GridView1.SelectedRow.Cells[8].Text.ToString(); 80 this.TextBox10.Text = this.GridView1.SelectedRow.Cells[9].Text.ToString(); 81 } 82 83} 84
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Asp.net房产中介管理系统源码及常用文档

- 利用webService实现的51aspx..

- IFNuke(修改自DNN)网站源码

- COCOWO1.0开源博客源码

- DotNetTextBox网页编辑器 V3..

- 星光慧点图书租借管理系统源码

- Asp.net投票系统[单/复选,投..

- 阿晶简单实用留言板V1.0

- 《用实例学ASP.NET》随书源码

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