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


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

- Asp.net多层入门源码示例(用..

- 至真.net新闻发布系统源码1.1

- 冬雷物语个人综合网站源码

- 简单广告管理系统

- 品杰电子商务购物平台系统源码

- Asp.net投票调查系统

- 随风缘内容管理(JumbotCms!N..

- 南充人NET文章系统开源版

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