/// <summary> /// 查询指定CmmBrandID的CombrandName /// </summary> public static string QueryHttpBrandName(OneListed info) { if (info == null || info.commBrandId == "" || info.cid == "") { return(""); } LevelBrandResponse levelBrandInfo = new LevelBrandResponse(); try { string cookies = DataManager.Instance.Cookies; string url = Helper.GetURL(HTTPServiceUrlCollection.GetBaseLevelBrandInfoUrl) + "cid=" + info.cid; string hr = GetData(url, cookies); if (hr != null) { try { levelBrandInfo = Helper.Deserialize <LevelBrandResponse>(hr); } catch (Exception err) { Logger.LogError(err.ToString()); } } if (levelBrandInfo.Result == null) { return(""); } foreach (LevelBrandList infos in levelBrandInfo.Result) { if (infos.infoName != info.commLevelName) { continue; } if (infos.infoList == null || infos.infoList.Count < 0) { continue; } List <LevelBrand> infoList = infos.infoList; foreach (LevelBrand it in infoList) { if (it.id.ToString() != info.commBrandId) { continue; } return(it.infoName); } } } catch (Exception ex) { Logger.LogError("摘牌品牌名称获取异常:" + ex.Message); } return(""); }
/// <summary> /// 查询所有品牌信息 /// </summary> private void QueryHttpBrandListToCombox(string nowProcessId) { try { LevelBrandResponse levelBrandInfo = HttpService.GetBaseLevelBrandInfo(nowProcessId); if (levelBrandInfo == null || levelBrandInfo.Result == null) { return; } foreach (LevelBrandList infos in levelBrandInfo.Result) { this.comboBox_Level.Items.Add(infos); } } catch (Exception ex) { throw new Exception("供需发布初始化品牌信息异常:" + ex.Message); } }