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


当前文件路径:OfficeOnline/ClientInfo/Client_Add.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_Add : System.Web.UI.Page 13{ 14 WebService webService = new WebService(); 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 if (Session["UserID"] == null || Session["UserLevel"] == null) 18 { 19 Response.Redirect("~/Error.aspx"); 20 } 21 if (Session["UserLevel"].ToString() == "职员") 22 { 23 this.CheckBox1.Visible = false; 24 this.lblMsg.Text = "您所添加的客户需要得到部门经理的审核!"; 25 } 26 else if (Session["UserLevel"].ToString() == "部门经理") 27 { 28 this.lblMsg.Text = "您可以在此审核客户,也可以以后再审核!"; 29 } 30 else 31 { 32 Response.Redirect("~/Error.aspx"); 33 } 34 } 35 protected void btnSubmit_Click(object sender, EventArgs e) 36 { 37 if (this.tbAgentName.Text == "" || this.tbClientName.Text == "" || this.tbEmail.Text == "" || this.tbPhone.Text == "" || this.tbWeb.Text == "") 38 { 39 this.lblMsg.Text = "请填写完整信息!"; 40 } 41 else 42 { 43 string strSql = "SELECT Person_DeptID FROM z_Person where z_Person.Person_ID='" + Session["UserID"].ToString() + "';"; 44 DataTable table = webService.ExcuteSelect(strSql); 45 string strDeptID = table.Rows[0]["Person_DeptID"].ToString(); 46 string strCompanyName = this.tbClientName.Text; 47 string strAgentName = this.tbAgentName.Text; 48 string strEmail = this.tbEmail.Text; 49 string strPhone = this.tbPhone.Text; 50 string strWeb = this.tbWeb.Text; 51 if (this.CheckBox1.Checked) 52 strSql = "Insert into z_Client(Client_AddDate,Client_CompanyName,Client_AgentName,Client_Phone,Client_Email,Client_WebSite,Client_IsConfirm,Client_ConfirmDate,Client_AddPersonID,Dept_ID) values ('" + DateTime.Now + "','" + strCompanyName + "','" + strAgentName + "','" + strPhone + "','" + strEmail + "','" + strWeb + "','1','" + DateTime.Now + "','" + Session["UserID"].ToString() +"','"+strDeptID+ "');"; 53 else 54 strSql = "Insert into z_Client(Client_AddDate,Client_CompanyName,Client_AgentName,Client_Phone,Client_Email,Client_WebSite,Client_IsConfirm,Client_AddPersonID,Dept_ID) values ('" + DateTime.Now + "','" + strCompanyName + "','" + strAgentName + "','" + strPhone + "','" + strEmail + "','" + strWeb + "','0','" + Session["UserID"].ToString() +"','"+strDeptID+ "');"; 55 webService.ExcuteSql(strSql); 56 Response.Redirect("Client_List.aspx"); 57 } 58 } 59 protected void btnCancel_Click(object sender, EventArgs e) 60 { 61 Response.Redirect("Client_List.aspx"); 62 } 63} 64
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:网上办公系统源码

- 西游博客多用户版源码

- 18个WebChart曲线/柱状图C#源码

- 明日供求信息网源码

- 北京连锁超市会员积分销售系..

- ASP.net Forums 2 V1.1版源码

- XCMS1.0Beta内容管理系统部分..

- ASP.NET标准三层架构留言本项..

- XproerBBS3.0.107源码(Access)

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