protected string getBrandNames(string CustID) { QueryBrandInfo queryBrandInfo = new QueryBrandInfo(); queryBrandInfo.CustID = CustID; int o; string s = ""; DataTable dt = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetCustBrandInfo(queryBrandInfo, "", 1, 10000, out o); if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { s += dt.Rows[i]["name"] + " "; } } return(s); }
private void BindCustomerInfo() { CarType = this.CustInfo.CarType; spanCustName.InnerText = this.CustInfo.CustName; spanCustAbbr.InnerText = this.CustInfo.AbbrName; spanAddress.InnerText = this.CustInfo.Address; BitAuto.YanFa.Crm2009.Entities.QueryBrandInfo queryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryBrandInfo(); queryBrandInfo.CustID = this.CustInfo.CustID; int o; string s = ""; DataTable dt = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetCustBrandInfo(queryBrandInfo, "", 1, 10000, out o); if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { s += dt.Rows[i]["name"] + " "; } } spanBrandName.InnerText = s; spanContactName.InnerText = this.CustInfo.contactName; ContactName = this.CustInfo.contactName; spanFax.InnerText = this.CustInfo.Fax; if (!string.IsNullOrEmpty(this.CustInfo.IndustryID)) { spanCustIndustry.InnerText = BitAuto.YanFa.Crm2009.BLL.Util.GetEnumOptText(Convert.ToInt32(this.CustInfo.IndustryID)); } if (!string.IsNullOrEmpty(this.CustInfo.LevelID)) { spanCustLevel.InnerText = BitAuto.YanFa.Crm2009.BLL.Util.GetEnumOptText(Convert.ToInt32(this.CustInfo.LevelID)); } // 集团 厂商 没有 [所属集团 所属厂商]; 没有新增会员按钮 if (this.CustInfo.TypeID == ((int)BitAuto.YanFa.Crm2009.Entities.EnumCustomType.Company).ToString() || this.CustInfo.TypeID == ((int)BitAuto.YanFa.Crm2009.Entities.EnumCustomType.Bloc).ToString()) { liPid.Visible = false; liCustPid.Visible = false; } else { if (this.CustInfo.TypeID == ((int)BitAuto.YanFa.Crm2009.Entities.EnumCustomType.SynthesizedShop).ToString()) { liCustPid.Visible = false; //综合店 没有厂商 } } spanNotes.InnerText = this.CustInfo.Notes; spanOfficeTel.InnerText = this.CustInfo.Officetel; OfficeTel = this.CustInfo.Officetel; if (!string.IsNullOrEmpty(this.CustInfo.Pid)) { BitAuto.YanFa.Crm2009.Entities.CustInfo pmodel = BitAuto.YanFa.Crm2009.BLL.CustInfo.Instance.GetCustInfo(this.CustInfo.Pid); if (pmodel != null) { spanPidName.InnerText = pmodel.CustName; } } if (!string.IsNullOrEmpty(this.CustInfo.CustPid)) { BitAuto.YanFa.Crm2009.Entities.CustInfo pmodel = BitAuto.YanFa.Crm2009.BLL.CustInfo.Instance.GetCustInfo(this.CustInfo.CustPid); if (pmodel != null) { spanCustPidName.InnerText = pmodel.CustName; } } string provinceCity = ""; if (!string.IsNullOrEmpty(this.CustInfo.ProvinceID)) { provinceCity += BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.CustInfo.ProvinceID); } if (!string.IsNullOrEmpty(this.CustInfo.CityID)) { provinceCity += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.CustInfo.CityID); } if (!string.IsNullOrEmpty(this.CustInfo.CountyID)) { provinceCity += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(this.CustInfo.CountyID); } spanArea.InnerText = provinceCity; if (!string.IsNullOrEmpty(this.CustInfo.ShopLevel)) { spanShopLevel.InnerText = BitAuto.YanFa.Crm2009.BLL.Util.GetEnumOptText(Convert.ToInt32(this.CustInfo.ShopLevel)); } if (!string.IsNullOrEmpty(this.CustInfo.TypeID)) { spanCustType.InnerText = BitAuto.YanFa.Crm2009.BLL.Util.GetEnumOptText(Convert.ToInt32(this.CustInfo.TypeID)); } spanZipcode.InnerText = this.CustInfo.zipcode; }
private void CustInfoShow() { BitAuto.YanFa.Crm2009.Entities.CustInfo ci = BitAuto.YanFa.Crm2009.BLL.CustInfo.Instance.GetCustInfo(CustID); if (ci != null) { spanCustName.InnerText = ci.CustName; spanCustType.InnerText = BLL.Util.GetEnumOptText(typeof(BitAuto.YanFa.Crm2009.Entities.EnumCustomType), CommonFunction.ObjectToInteger(ci.TypeID)); CustType = ci.TypeID; //客户主营品牌 BitAuto.YanFa.Crm2009.Entities.QueryBrandInfo queryBrandInfo = new BitAuto.YanFa.Crm2009.Entities.QueryBrandInfo(); queryBrandInfo.CustID = ci.CustID; int o; string s = ""; DataTable dt = BitAuto.YanFa.Crm2009.BLL.CarBrand.Instance.GetCustBrandInfo(queryBrandInfo, "", 1, 10000, out o); if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { s += dt.Rows[i]["name"] + " "; } } spanBrandName.InnerText = s; //客户地区 string provinceCity = ""; if (!string.IsNullOrEmpty(ci.ProvinceID)) { provinceCity += BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(ci.ProvinceID); } if (!string.IsNullOrEmpty(ci.CityID)) { provinceCity += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(ci.CityID); } if (!string.IsNullOrEmpty(ci.CountyID)) { provinceCity += " " + BitAuto.YanFa.Crm2009.BLL.MainBrand.Instance.GetAreaName(ci.CountyID); } spanArea.InnerText = provinceCity; spanAddress.InnerText = ci.Address; spanContactName.InnerText = ci.contactName; //crm客户的电话 spanOfficeTel.InnerText = ci.Officetel; OfficeTel = ci.Officetel; ContactName = ci.contactName; spanZipcode.InnerText = ci.zipcode; if (ci.Lock == 1) { //spanLock.InnerText = "是"; spanLock.Style["display"] = "block"; } else { //spanLock.InnerText = "否"; spanLock.Style["display"] = "none"; } if (ci.Status == 0) { //spanStatus.InnerText = "在用"; spanStatus.Style["display"] = "none"; } else { //spanStatus.InnerText = "停用"; spanStatus.Style["display"] = "block"; } List <BitAuto.YanFa.Crm2009.Entities.DMSMember> list = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMember(ci.CustID); rptMember.DataSource = list; rptMember.DataBind(); if (list != null && list.Count > 0) { FirstMemberCode = list[0].MemberCode; FirstMemberName = list[0].Name; } } else { Response.Write(@"<script language='javascript'>javascript:alert('该Crm客户可能不存在或者已经删除!'); try { window.external.MethodScript('/browsercontrol/closepage'); } catch (e) { window.opener = null; window.open('', '_self'); window.close(); };</script>"); } }