using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.BLL; using CY.Model; using CY.Infrastructure.Query; using CY.Infrastructure.Common; using CY.BLL.Sys; using CY.Model.Inquiry; namespace CY.WebForm.Pages.business { //吴辉 //查看合作客户资料 public partial class CorporateClientsDetail : BasePage { OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null; Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;//字典业务逻辑操作类对象 SysInquiry_PrintingTypeBLL bll_SysInquiry_PrintingTypeBLL = null;//印刷业务类型业务逻辑操作类对象 //初始化 public CorporateClientsDetail() { bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); bll_Sys_DictionaryBLL = new Sys_DictionaryBLL(); bll_SysInquiry_PrintingTypeBLL = new SysInquiry_PrintingTypeBLL(); } //页面加载 protected void Page_Load(object sender, EventArgs e) { if (Request["Keyid"] != null || Request["MemberId"] != null) { OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.GetModelDetail(Request["Keyid"].ToGuid2()); if (m_OA_CorporateClients == null) { m_OA_CorporateClients = bll_OA_CorporateClientsBLL.SelectModelByFirmIdandMemberId( CurrentUser.MemberId, Request["MemberId"].ToGuid2()); } if (m_OA_CorporateClients != null) { OA_CustomerCommunications m_OA_CustomerCommunications = bll_OA_CorporateClientsBLL.GetModel_CustomerCommunications(m_OA_CorporateClients.Keyid); EC_AcceptWayByCustomers m_EC_AcceptWayByCustomers = bll_OA_CorporateClientsBLL.GetModel_AcceptWayByCustomers(m_OA_CorporateClients.Keyid); #region 页面初始合作客户基础信息 this.spanSourcesInfoId.InnerText = m_OA_CorporateClients.SourcesInfoIdName.ToString2(); this.spanCustomerIndustriesId.InnerText = m_OA_CorporateClients.CustomerIndustriesIdName.ToString2(); this.spanCustomerTypeId.InnerText = m_OA_CorporateClients.CustomerTypeIdName.ToString2(); this.spanCreditId.InnerText = m_OA_CorporateClients.CreditIdName.ToString2(); this.spanDegreeImportanId.InnerText = m_OA_CorporateClients.DegreeImportanIdName.ToString2(); this.spanBusinessAnalysisId.InnerText = m_OA_CorporateClients.BusinessAnalysisIdName.ToString2(); this.spanBusinessManagerId.InnerText = m_OA_CorporateClients.BusinessmanagerName.ToString2(); this.spanAccountManagerId.InnerText = m_OA_CorporateClients.AccountmanagerName.ToString2(); this.spanIsLoginCorporateWeb.InnerText = m_OA_CorporateClients.IsLoginCorporateWeb ? "允许" : "拒绝"; this.spanCompanyName.InnerText = m_OA_CorporateClients.CompanyName.ToString2(); this.spanCorporateWebsite.InnerText = m_OA_CorporateClients.CorporateWebsite.ToString2(); this.spanCredit.InnerText = m_OA_CorporateClients.Credit.ToDecimal2Yen(); this.spanLoginPhone.InnerText = m_OA_CorporateClients.LoginPhone.ToString2(); this.spanBank.InnerText = m_OA_CorporateClients.Bank.ToString2(); this.spanTaxID.InnerText = m_OA_CorporateClients.TaxID.ToString2(); this.spanAccountID.InnerText = m_OA_CorporateClients.AccountID.ToString2(); this.spanRemark.InnerText = m_OA_CorporateClients.Remark.ToString2(); //add by zyyao this.spanPaytimename.InnerText = m_OA_CorporateClients.Paytimename.ToString2(); this.spanPaydays.InnerText = m_OA_CorporateClients.Paydays.ToString2(); this.spanBiddingcompanyName.InnerText = m_OA_CorporateClients.BiddingcompanyName.ToString2(); this.spanContracttypeName.InnerText = m_OA_CorporateClients.ContracttypeName.ToString2(); this.spanContractmoney.InnerText = m_OA_CorporateClients.Contractmoney.ToDecimal2Yen(); this.spanExpiretypeName.InnerText = m_OA_CorporateClients.ExpiretypeName.ToString2(); this.spanExpireTime.InnerText = m_OA_CorporateClients.ExpireTime==null?"":m_OA_CorporateClients.ExpireTime.Value.ToString("yyyy-MM-dd"); this.spanJigoudaima.InnerText = m_OA_CorporateClients.Jigoudaima.ToString2(); this.spanPiaojuName.InnerText = m_OA_CorporateClients.PiaojuName.ToString2(); this.spanKaipiaoziliao.InnerText = m_OA_CorporateClients.Kaipiaoziliao.ToString2(); this.spanShifouwanjieName.InnerText = m_OA_CorporateClients.ShifouwanjieName.ToString2(); this.spanNote.InnerText = m_OA_CorporateClients.Note.ToString2(); #endregion #region 页面初始合作客户通讯信息 this.spanProvince.InnerText = (m_OA_CustomerCommunications.City.ToString2().IndexOf(m_OA_CustomerCommunications.Province.ToString2()) >= 0 ? "" : m_OA_CustomerCommunications.Province.ToString2()); this.spanCity.InnerText = (m_OA_CustomerCommunications.City.ToString2().IndexOf("其他") >= 0 ? "" : m_OA_CustomerCommunications.City.ToString2()); this.spanCounty.InnerText = m_OA_CustomerCommunications.County.ToString2(); this.spanDetailedAddress.InnerText = m_OA_CustomerCommunications.DetailedAddress.ToString2(); this.spanCompanyPhone.InnerText = m_OA_CustomerCommunications.CompanyPhone.ToString2(); this.spanPostcode.InnerText = m_OA_CustomerCommunications.Postcode.ToString2(); this.spanMobile.InnerText = m_OA_CustomerCommunications.Mobile.ToString2(); this.spanFax.InnerText = m_OA_CustomerCommunications.Fax.ToString2(); this.spanEmail.InnerText = m_OA_CustomerCommunications.Email.ToString2(); this.spanQQ.InnerText = m_OA_CustomerCommunications.QQ.ToString2(); this.spanLegalRepresentative.InnerText = m_OA_CustomerCommunications.LegalRepresentative.ToString2(); this.spanLegalMobile.InnerText = m_OA_CustomerCommunications.LegalMobile.ToString2(); this.spanLegalQQ.InnerText = m_OA_CustomerCommunications.LegalQQ.ToString2(); this.spanBusinessManagers.InnerText = m_OA_CustomerCommunications.BusinessManagers.ToString2(); this.spanManagersMobile.InnerText = m_OA_CustomerCommunications.ManagersMobile.ToString2(); this.spanManagersQQ.InnerText = m_OA_CustomerCommunications.ManagersQQ.ToString2(); this.spanFinancialOfficers.InnerText = m_OA_CustomerCommunications.FinancialOfficers.ToString2(); this.spanOfficersMobile.InnerText = m_OA_CustomerCommunications.OfficersMobile.ToString2(); this.spanOfficersQQ.InnerText = m_OA_CustomerCommunications.OfficersQQ.ToString2(); this.spanProvince.InnerText = m_OA_CustomerCommunications.Province.ToString2(); this.spanCity.InnerText = m_OA_CustomerCommunications.City.ToString2(); this.spanCounty.InnerText = m_OA_CustomerCommunications.County.ToString2(); #endregion } //this.RepClientList.DataSource = bll_OA_CorporateClientsBLL.SelectVisitListByCorId(m_OA_CorporateClients.Keyid); //this.RepClientList.DataBind(); IEnumerable corporateClientsPrints = bll_OA_CorporateClientsBLL.SelectPrintListByCorId(m_OA_CorporateClients.Keyid); foreach(OA_CorporateClientsPrint corporateClientsPrint in corporateClientsPrints) { InquiryCommonModel _inquiryCommonModel = null; if (null == corporateClientsPrint) { _inquiryCommonModel = new InquiryCommonModel(); } else { _inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), corporateClientsPrint.PrintParameter) as InquiryCommonModel; } corporateClientsPrint.PrintDemand = _inquiryCommonModel.PrintDemand; corporateClientsPrint.Printshuliang = _inquiryCommonModel.PrintCount; } this.Repeater1.DataSource = corporateClientsPrints; this.Repeater1.DataBind(); } } } }