CRMAdd.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections.Generic;
- 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;
- public partial class CRMAdd : System.Web.UI.Page
- {
- //模板
- Model.CRM MR = new Model.CRM();
- //业务
- BLL.CRM BR = new BLL.CRM();
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "CRMAdd");
- }
-
- protected void Button1_Click(object sender, EventArgs e)
- {
- try
- {
- int iWYID = 0;
- if (!int.TryParse(KeyValue_WYID.Text, out iWYID))
- {
- throw new Exception("内部系统ID必须为数字!");
- }
- MR.XM = KeyValue_XM.Text;
- MR.NC = KeyValue_NC.Text;
- MR.XB = KeyValue_XB.Text;
- MR.GDDH = KeyValue_GDDH.Text;
- MR.SJHM = KeyValue_SJHM.Text;
- MR.Email = KeyValue_Email.Text;
- MR.QQ = KeyValue_QQ.Text;
- MR.MSN = KeyValue_MSN.Text;
- MR.BZ = KeyValue_BZ.Text;
- MR.GS = KeyValue_GS.Text;
- MR.DZ = KeyValue_DZ.Text;
- MR.WZ = KeyValue_WZ.Text;
- MR.FL = KeyValue_FL.Text;
- MR.XXDZ = KeyValue_XXDZ.Text;
- MR.DLIP ="127.0.0.1";
- MR.TJSJ = DateTime.Now;
- MR.KFID = SessionInclude.SessionId;
- MR.WYID = iWYID;
- MR.ZHJHM = KeyValue_ZHJHM.Text;
- BR.Add(MR);
- MessageBox.Show("新建成功");
- KeyValue_XM.Text = "";
- KeyValue_NC.Text = "";
- KeyValue_XB.Text = "";
- KeyValue_GDDH.Text = "";
- KeyValue_SJHM.Text = "";
- KeyValue_Email.Text = "";
- KeyValue_QQ.Text = "";
- KeyValue_MSN.Text = "";
- KeyValue_BZ.Text = "";
- KeyValue_GS.Text = "";
- KeyValue_DZ.Text = "";
- KeyValue_WZ.Text = "";
- KeyValue_FL.Text = "";
- KeyValue_XXDZ.Text = "";
- KeyValue_WYID.Text = "";
- KeyValue_ZHJHM.Text = "";
- }
- catch (Exception exp)
- {
- MessageBox.Show(exp.Message);
- }
- }
- }