protected void btn_SendPrize_Click(object sender, EventArgs e) { int matchId = ConvertHelper.ConvertToInt(txtSendMatchId.Text.Trim()); if (matchId == 0) { ShowMessage("比赛ID不能为0"); return; } var allzone = AllZoneinfoMgr.GetAll(); foreach (var item in allzone) { SendPrize(matchId, item.ZoneName); } ShowMessage("发奖完成"); }
void InitCache() { _zoneDic = new Dictionary <string, AllZoneinfoEntity>(); _platFormZoneDic = new Dictionary <string, List <AllZoneinfoEntity> >(); _qunheiZoneList = new List <AllZoneinfoEntity>(); _aloneZoneList = new List <AllZoneinfoEntity>(); _mixtureZoneList = new List <AllZoneinfoEntity>(); _wanBaZoneList = new List <AllZoneinfoEntity>(); _wanBaZoneListIos = new List <AllZoneinfoEntity>(); _qunheiAnd9GList = new List <AllZoneinfoEntity>(); _egretZoneList = new List <AllZoneinfoEntity>(); _bearZoneList = new List <AllZoneinfoEntity>(); _allZoneList = AllZoneinfoMgr.GetAll(); foreach (var item in _allZoneList) { if (!_platFormZoneDic.ContainsKey(item.PlatformCode)) { _platFormZoneDic.Add(item.PlatformCode, new List <AllZoneinfoEntity>()); } _platFormZoneDic[item.PlatformCode].Add(item); int platzoneId = ConvertHelper.ConvertToInt(item.PlatformZoneName); if (!_zoneDic.ContainsKey(item.ZoneName)) { _zoneDic.Add(item.ZoneName, item); } if (ShareUtil.IsTx) { if (platzoneId > 1000 && platzoneId < 10000) { _wanBaZoneList.Add(item); } else if (platzoneId > 10000) { _wanBaZoneListIos.Add(item); } continue; } if (item.PlatformCode == "h5_egret") { _egretZoneList.Add(item); } else if (item.PlatformCode == "h5_qunhei") { _qunheiZoneList.Add(item); } //if (platzoneId == 1001) //{ // _egretZoneList.Add(item); //} //else if (platzoneId == 1003) { _bearZoneList.Add(item); } else if (platzoneId == 1) { _mixtureZoneList.Add(item); _aloneZoneList.Add(item); _qunheiAnd9GList.Add(item); } else if (platzoneId < 1000) { if (platzoneId == 2) { _qunheiAnd9GList.Add(item); } _aloneZoneList.Add(item); } else { if (platzoneId != 10002) { _qunheiAnd9GList.Add(item); } _mixtureZoneList.Add(item); } } }
private SiteMapCache() { try { s_dicPlats.Clear(); s_dicSites.Clear(); s_dicPlatSites.Clear(); s_dicUaPlats.Clear(); var plats = AllPlatmapMgr.GetAll(); var sites = AllSitemapMgr.GetAll(); var uaPlats = AllUaplatformMgr.GetAll(); var zones = AllZoneinfoMgr.GetAll(); string factCode = FactoryCode; AllPlatmapEntity root = null; foreach (var item in plats) { item.PlatCode = item.PlatCode.ToLower(); s_dicPlats[item.PlatCode] = item; if (null == root && string.Compare(factCode, item.PlatCode, true) == 0) { root = item; } } foreach (var item in zones) { if (string.Compare(item.ZoneName, SiteId, true) == 0) { PlatCode = item.PlatformCode; ZoneIno = item; break; } if (!s_zoneDic.ContainsKey(item.PlatformCode + item.ZoneName)) { s_zoneDic.Add(item.PlatformCode + item.ZoneName, item); } s_zoneDic[item.PlatformCode + item.ZoneName] = item; } foreach (var item in sites) { if (string.Compare(factCode, item.PlatCode, true) != 0) { continue; } s_dicSites[item.SiteId] = item; s_dicPlatSites[item.PlatSiteId] = item; if (null == root) { continue; } if (string.IsNullOrEmpty(item.PlatMainUrl)) { item.PlatMainUrl = root.PlatMainUrl; } if (string.IsNullOrEmpty(item.PlatApiUrl)) { item.PlatApiUrl = root.PlatApiUrl; } if (string.IsNullOrEmpty(item.PayUrl)) { item.PayUrl = root.PayUrl; } if (string.IsNullOrEmpty(item.BbsUrl)) { item.BbsUrl = root.BbsUrl; } if (string.IsNullOrEmpty(item.NavUrl)) { item.NavUrl = root.NavUrl; } if (string.IsNullOrEmpty(item.CdnUrl)) { item.CdnUrl = root.CdnUrl; } if (string.IsNullOrEmpty(item.ChatUrl)) { item.ChatUrl = root.ChatUrl; } } foreach (var item in uaPlats) { s_dicUaPlats[item.PlatformCode.ToLower()] = item; } this.InitFlag = true; } catch (Exception ex) { SystemlogMgr.Error("SiteMapCache:Init", ex); this.InitFlag = false; } }