您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->网上办公系统源码>>ClientInfo/Client_Edit.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:网上办公系统源码


当前文件路径:OfficeOnline/ClientInfo/Client_Edit.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11 12public partial class ClientInfo_Client_Edit : System.Web.UI.Page 13{ 14 WebService webService = new WebService(); 15 string strSql; 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 if (Session["UserID"] == null || Session["UserLevel"] == null) 19 { 20 Response.Redirect("~/Error.aspx"); 21 } 22 23 if (Session["UserLevel"].ToString() == "部门经理") 24 { 25 this.lblMsg.Text = "请进行修改,您可以现在审核用户,也可以以后再审核!"; 26 this.CheckBox1.Visible = true; 27 } 28 else 29 { 30 this.lblMsg.Text = "请进行修改,您所提交的客户信息需等部门经理的审核!"; 31 this.CheckBox1.Visible = false; 32 } 33 if (!Page.IsPostBack) 34 { 35 strSql = "SELECT z_Client.Client_ID,z_Client.Client_AddPersonID, z_Client.Client_CompanyName, z_Client.Client_AgentName, z_Client.Client_Phone, z_Client.Client_Email, z_Client.Client_WebSite from z_Client WHERE z_Client.Client_ID='" + Request.QueryString["cid"] + "';"; 36 DataTable table = webService.ExcuteSelect(strSql); 37 this.tbAgentName.Text = table.Rows[0]["Client_AgentName"].ToString(); 38 this.tbClientName.Text = table.Rows[0]["Client_CompanyName"].ToString(); 39 this.tbEmail.Text = table.Rows[0]["Client_Email"].ToString(); 40 this.tbPhone.Text = table.Rows[0]["Client_Phone"].ToString(); 41 this.tbWeb.Text = table.Rows[0]["Client_WebSite"].ToString(); 42 if (table.Rows[0]["Client_AddPersonID"].ToString() != Session["UserID"].ToString()) 43 { 44 Response.Redirect("~/Error.aspx"); 45 } 46 } 47 } 48 protected void btnSubmit_Click(object sender, EventArgs e) 49 { 50 if (this.tbAgentName.Text == "" || this.tbClientName.Text == "" || this.tbEmail.Text == "" || this.tbPhone.Text == "" || this.tbWeb.Text == "") 51 { 52 this.lblMsg.Text = "请填写完整信息!"; 53 } 54 else 55 { 56 string strCompanyName = this.tbClientName.Text; 57 string strAgentName = this.tbAgentName.Text; 58 string strEmail = this.tbEmail.Text; 59 string strPhone = this.tbPhone.Text; 60 string strWeb = this.tbWeb.Text; 61 if (this.CheckBox1.Checked == true) 62 { 63 strSql = "Update z_Client set Client_CompanyName='" + strCompanyName + "',Client_AgentName='" + strAgentName + "',Client_Email='" + strEmail + "',Client_Phone='" + strPhone + "',Client_WebSite='" + strWeb + "',Client_IsConfirm='1',Client_ConfirmDate='" + DateTime.Now + "',Client_AddDate='" + DateTime.Now + " where Client_ID='" + Request.QueryString["cid"] + "';"; 64 } 65 else 66 { 67 strSql = "Update z_Client set Client_CompanyName='" + strCompanyName + "',Client_AgentName='" + strAgentName + "',Client_Email='" + strEmail + "',Client_Phone='" + strPhone + "',Client_WebSite='" + strWeb + "',Client_AddDate='" + DateTime.Now + "' where Client_ID='" + Request.QueryString["cid"] + "';"; 68 } 69 webService.ExcuteSql(strSql); 70 Response.Redirect("Client_List3.aspx"); 71 } 72 } 73 protected void Button1_Click(object sender, EventArgs e) 74 { 75 strSql = "Delete from z_Client where Client_ID='" + Request.QueryString["cid"] + "';"; 76 webService.ExcuteSql(strSql); 77 Response.Redirect("Client_List3.aspx"); 78 } 79} 80
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:网上办公系统源码

- AjaxControlToolkit之Tabs控..

- 简单四则运算验证码(C#)源码

- 某公司人事工资管理系统源码

- Linq三层模式之增删改源码

- Acom进出仓管理系统源码

- 精品课管理系统源码

- Asp.net2.0开发的网上图书销..

- asp.net漂亮弹出对话框控件源..

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