private void btnAdd_Click(object sender, System.EventArgs e) { try { if (this.JudgeIsNull(txtLinkName.Text.Trim(), "姓名")) { return; } Link newlink = new Link(); newlink.cnnCustID = decimal.Parse(this.txtCustID.Text.Trim()); newlink.cnvcName = this.txtLinkName.Text.Trim(); newlink.cnvcSex = ddlLinkSex.SelectedValue; newlink.cndBirthday = DateTime.Parse(this.txtBirthday.Text.Trim()); newlink.cnvcEducation = this.ddlLinkDegree.SelectedValue; newlink.cnvcLinkType = this.ddlLinkType.SelectedValue; newlink.cnvcDeptName = this.ddlDept.SelectedValue; newlink.cnvcRelativeDeptType = this.ddlLinkDeptType.SelectedValue; newlink.cnvcDuty = this.txtLinkOfficer.Text.Trim(); newlink.cnvcJob = this.txtLinkWorkRange.Text.Trim(); newlink.cnvcPhone = this.txtLinkDeskPhone.Text.Trim(); newlink.cnvcMobilePhone = this.txtLinkMobilePhone.Text.Trim(); newlink.cnvcEmail = this.txtEmail.Text.Trim(); newlink.cnvcLike = this.txtLove.Text.Trim(); newlink.cnvcAddress = this.txtLinkAddress.Text.Trim(); newlink.cnvcOperID = oper.cnvcOperID; VCustInfoFacade.AddLink(newlink, oper); Popup("新联系人信息添加成功"); this.RegisterStartupScript("hide", "<script lanaguage=javascript>ShowHide('1','none');</script>"); } catch (Exception ex) { Popup(ex.Message); } }
private void btnMod_Click(object sender, System.EventArgs e) { try { if (this.JudgeIsNull(this.ddlVisitMan.SelectedValue, "拜访人")) { return; } if (this.JudgeIsNull(this.txtVisitDept.Text.Trim(), "拜访部门")) { return; } Visit newvisit = new Visit(); newvisit.cnnVisitSerialNo = decimal.Parse(this.txtVisitID.Text.Trim()); if (this.ddlProject.SelectedValue == "") { newvisit.cnnProjectID = 0; } else { newvisit.cnnProjectID = decimal.Parse(this.ddlProject.SelectedValue); } newvisit.cnnCustID = decimal.Parse(this.txtCustID.Text.Trim()); newvisit.cnvcMgr = this.txtMgr.Text.Trim(); newvisit.cndVisitDate = DateTime.Parse(this.lblVisitDate.Text.Trim()); newvisit.cnvcVisitContent = this.ddlVisitContent.SelectedValue; newvisit.cnvcVisitDept = this.txtVisitDept.Text.Trim(); newvisit.cnvcDeptType = this.ddlDeptType.SelectedValue; newvisit.cnvcVisitMan = this.ddlVisitMan.SelectedValue; newvisit.cnvcManType = this.ddlManType.SelectedValue; newvisit.cnvcAffect = this.ddlAffect.SelectedValue; newvisit.cnvcCustType = this.ddlCustType.SelectedValue; newvisit.cnvcWellType = this.ddlWellType.SelectedValue; newvisit.cnvcCorpRelation = this.ddlCorpRelation.SelectedValue; newvisit.cnvcPrivateRelation = this.ddlPrivateRelation.SelectedValue; newvisit.cnvcProjectSpeed = this.ddlProjectSpeed.SelectedValue; // newvisit.cnvcFour=this.ddlManBelong.SelectedValue; newvisit.cnvcFour = this.ddlDeptType.SelectedValue; newvisit.cnvcDemandType = this.ddlDemandType.SelectedValue; newvisit.cnvcOperID = oper.cnvcOperID; newvisit.cnvcComments = this.txtComments.Text.Trim(); VCustInfoFacade.UpdateVisit(newvisit, oper); Popup("拜访记录修改成功"); } catch (Exception ex) { Popup(ex.Message); } }
private void AddCustInfo(DataTable dt) { VCustInfoFacade.BatchCustInfo(dt, oper); }
private void btnAdd_Click(object sender, System.EventArgs e) { try { if (this.JudgeIsNull(txtCustID.Text.Trim(), "客户编号") && !this.JudgeIsNum(txtCustID.Text.Trim(), "客户编号")) { return; } if (this.JudgeIsNull(txtCustName.Text.Trim(), "客户名称")) { return; } DataTable dtout = Helper.Query("select * from tbCust where cnvcName='" + txtCustName.Text.Trim() + "' and cnnCustID<>" + txtCustID.Text.Trim()); if (dtout.Rows.Count > 0) { this.Popup("该客户名称已经存在,请检查!"); return; } if (txtMonthCons.Text.Trim() != "") { if (!this.JudgeIsNum(txtMonthCons.Text.Trim(), "月通信使用费")) { return; } } Cust newcust = new Cust(); newcust.cnnCustID = decimal.Parse(txtCustID.Text.Trim()); newcust.cnvcName = txtCustName.Text.Trim(); newcust.cnvcType = ddlCustType.SelectedValue; newcust.cnvcPhone = this.txtPhone.Text.Trim(); newcust.cnvcEmail = this.txtEmail.Text.Trim(); newcust.cnvcFax = this.txtFax.Text.Trim(); newcust.cnvcAddress = this.txtAddress.Text.Trim(); newcust.cnvcPost = this.txtPost.Text.Trim(); newcust.cnvcTradeType = this.ddlTrade3.SelectedValue; newcust.cnvcAreaCode = this.ddlAreaCode.SelectedValue; newcust.cnvcLevel = this.ddlCustLevel.SelectedValue; newcust.cnvcPayAbility = this.ddlPayAbility.SelectedValue; if (this.txtMonthCons.Text.Trim() != "") { newcust.cnnMonthFee = decimal.Parse(this.txtMonthCons.Text.Trim()); } newcust.cnvcContractType = this.ddlConferState.SelectedValue; if (this.txtDept.Text.Trim() != "") { newcust.cnvcRelativeDept = this.txtDept.Text.Trim(); newcust.cnvcRelativeDeptType = this.ddlDeptType.SelectedValue; } if (this.txtDept2.Text.Trim() != "") { newcust.cnvcRelativeDept2 = this.txtDept2.Text.Trim(); newcust.cnvcRelativeDeptType2 = this.ddlDeptType2.SelectedValue; } if (this.txtDept3.Text.Trim() != "") { newcust.cnvcRelativeDept3 = this.txtDept3.Text.Trim(); newcust.cnvcRelativeDeptType3 = this.ddlDeptType3.SelectedValue; } if (this.txtDept4.Text.Trim() != "") { newcust.cnvcRelativeDept4 = this.txtDept4.Text.Trim(); newcust.cnvcRelativeDeptType4 = this.ddlDeptType4.SelectedValue; } if (this.txtDept5.Text.Trim() != "") { newcust.cnvcRelativeDept5 = this.txtDept5.Text.Trim(); newcust.cnvcRelativeDeptType5 = this.ddlDeptType5.SelectedValue; } newcust.cnvcIntro = this.txtCompanyInstruction.Text.Trim(); newcust.cnvcIT = this.txtInfoDoneState.Text.Trim(); newcust.cnvcCompetitor = this.txtCompetitorState.Text.Trim(); newcust.cnvcITPlan = this.txtInfoPlan.Text.Trim(); newcust.cnvcOperID = oper.cnvcOperID; newcust.cnvcCustMana = this.ddlCustMana.SelectedValue; newcust.cnvcCustTradeMana = this.ddlCustTradeMana.SelectedValue; VCustInfoFacade.AddVCust(newcust, oper); Popup("新大客户资料添加成功"); this.btnAddNewLink.Enabled = true; this.btnAdd.Enabled = false; } catch (Exception ex) { Popup(ex.Message); } }