client.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:4k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using com.etong.Model;
  12. using com.etong.DAL;
  13. public partial class Workflow_ProjectTaking_document : System.Web.UI.Page
  14. {
  15.     protected void Page_Load(object sender, EventArgs e)
  16.     {
  17.     }
  18.     protected void IB_Confirm_Click(object sender, ImageClickEventArgs e)
  19.     {
  20.         string clientname = this.TB_Name.Text.ToString();
  21.         if (string.IsNullOrEmpty(clientname) == true)
  22.         {
  23.             this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0", "<script>alert('系统提示:客户名称不能为空!');</script>");
  24.             return;
  25.         }
  26.         string clientworkunit = this.TB_WorkUnit.Text.ToString();
  27.         string mateworkunit = this.TB_ConsortUnit.Text.ToString();
  28.         string number = "";
  29.         string clientnote = this.TB_Remark.Text.ToString();
  30.         string clientredience = this.TB_Address.Text.ToString();
  31.         int clientdegreeid = Convert.ToInt32(this.DDL_ClientDegree.SelectedValue.ToString());
  32.         string clientbirthday = this.TB_Birthday.Text.ToString();
  33.         string homeaddress = this.TB_HomeAddress.Text.ToString();
  34.         string identitycard = this.TB_IdentityCard.Text.ToString();
  35.         int clientmale = Convert.ToInt32(this.DDL_Sex.SelectedValue.ToString());
  36.         int clientmarriage = Convert.ToInt32(this.DDL_Marriage.SelectedValue.ToString());      
  37.         string clienttelnum = this.TB_Phone.Text.ToString();
  38.         decimal salary = 0;
  39.         if (this.TB_Salary.Text.ToString() != "")
  40.         {
  41.             salary=Convert.ToDecimal(this.TB_Salary.Text.ToString());
  42.         }
  43.         string matenote = this.TB_ConsortRemark.Text.ToString();
  44.         string materedience = this.TB_ConsortZhuSuo.Text.ToString();
  45.         string matebirthday = this.TB_ConsortBirthday.Text.ToString();
  46.         int matedegreeid = Convert.ToInt32(this.DDL_MateDegree.SelectedValue.ToString());
  47.         string matehomeaddress = this.TB_ConsortHomeAddress.Text.ToString();
  48.         string mateidentitycard = this.TB_ConsortIdentityCard.Text.ToString();
  49.         int matemale = Convert.ToInt32(this.DDL_ConsortSex.SelectedValue.ToString());
  50.         string matename = this.TB_ConsortName.Text.ToString();
  51.         decimal matesalary = 0;
  52.         if (this.TB_ConsortSalary.Text.ToString() != "")
  53.         {
  54.             matesalary = Convert.ToDecimal(this.TB_ConsortSalary.Text.ToString());
  55.         }
  56.         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);
  57.         ProjectImplment projectImplment = new ProjectImplment();
  58.         int returnValue = projectImplment.AddClient(clientinfo);
  59.         if (returnValue == 0)
  60.         {
  61.             this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0", "<script>alert('系统提示:客户信息记录添加成功!');window.close();</script>");
  62.         }
  63.     }
  64.     protected void IB_Cancel_Click(object sender, ImageClickEventArgs e)
  65.     {
  66.         this.Page.ClientScript.RegisterStartupScript(this.GetType(), "0","<script language='javascript'> window.close();</script>");
  67.     }
  68. }