client.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:4k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using com.etong.Model;
- using com.etong.DAL;
- public partial class Workflow_ProjectTaking_document : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void IB_Confirm_Click(object sender, ImageClickEventArgs e)
- {
- string clientname = this.TB_Name.Text.ToString();
- if (string.IsNullOrEmpty(clientname) == true)
- {
- this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0", "<script>alert('系统提示:客户名称不能为空!');</script>");
- return;
- }
- string clientworkunit = this.TB_WorkUnit.Text.ToString();
- string mateworkunit = this.TB_ConsortUnit.Text.ToString();
- string number = "";
- string clientnote = this.TB_Remark.Text.ToString();
- string clientredience = this.TB_Address.Text.ToString();
- int clientdegreeid = Convert.ToInt32(this.DDL_ClientDegree.SelectedValue.ToString());
- string clientbirthday = this.TB_Birthday.Text.ToString();
- string homeaddress = this.TB_HomeAddress.Text.ToString();
- string identitycard = this.TB_IdentityCard.Text.ToString();
- int clientmale = Convert.ToInt32(this.DDL_Sex.SelectedValue.ToString());
- int clientmarriage = Convert.ToInt32(this.DDL_Marriage.SelectedValue.ToString());
- string clienttelnum = this.TB_Phone.Text.ToString();
- decimal salary = 0;
- if (this.TB_Salary.Text.ToString() != "")
- {
- salary=Convert.ToDecimal(this.TB_Salary.Text.ToString());
- }
- string matenote = this.TB_ConsortRemark.Text.ToString();
- string materedience = this.TB_ConsortZhuSuo.Text.ToString();
- string matebirthday = this.TB_ConsortBirthday.Text.ToString();
- int matedegreeid = Convert.ToInt32(this.DDL_MateDegree.SelectedValue.ToString());
- string matehomeaddress = this.TB_ConsortHomeAddress.Text.ToString();
- string mateidentitycard = this.TB_ConsortIdentityCard.Text.ToString();
- int matemale = Convert.ToInt32(this.DDL_ConsortSex.SelectedValue.ToString());
- string matename = this.TB_ConsortName.Text.ToString();
- decimal matesalary = 0;
- if (this.TB_ConsortSalary.Text.ToString() != "")
- {
- matesalary = Convert.ToDecimal(this.TB_ConsortSalary.Text.ToString());
- }
- ClientInfo clientinfo = new ClientInfo(clientworkunit, mateworkunit, number, clientnote, clientredience, clientdegreeid, clientbirthday, homeaddress, identitycard, clientmale, clientmarriage, clientname, clienttelnum, salary, matenote, materedience, matebirthday, matedegreeid, matehomeaddress, mateidentitycard, matemale, matename, matesalary);
- ProjectImplment projectImplment = new ProjectImplment();
- int returnValue = projectImplment.AddClient(clientinfo);
- if (returnValue == 0)
- {
- this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0", "<script>alert('系统提示:客户信息记录添加成功!');window.close();</script>");
- }
- }
- protected void IB_Cancel_Click(object sender, ImageClickEventArgs e)
- {
- this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0","<script language='javascript'> window.close();</script>");
- }
- }