protected void ddlZoneList_SelectedIndexChanged(object sender, EventArgs e) { var zoneId = ddlZoneList.SelectedValue; var zoneCache = AllZoneinfoMgr.GetById(Convert.ToInt32(zoneId)); if (zoneCache == null) { return; } var platform = AllUaplatformMgr.GetByCode(zoneCache.PlatformCode); if (platform == null) { return; } txtLoginAddress.Text = zoneCache.ApiUrl; txtLoginKey.Text = platform.LoginKey; txtLoginPlatform.Text = platform.PlatformCode; txtLoginUsername.Text = "dbbb"; txtChargeAddress.Text = zoneCache.ApiUrl; txtChargeCash.Text = "1"; txtChargeKey.Text = platform.ChargeKey; txtChargeOrderId.Text = string.Format("AdminTest@{0:yyyyMMddHHmmssfff}", DateTime.Now); txtChargePlatform.Text = platform.PlatformCode; txtChargeUsername.Text = "dbbb"; txtCharegeServerId.Text = zoneCache.PlatformZoneName; }
List <AllUaplatformEntity> GetPlatformList(string factoryCode) { try { return(AllUaplatformMgr.GetByFactory(factoryCode)); } catch (Exception ex) { LogHelper.Insert(ex); return(null); } }
protected void ddlFactory_SelectedIndexChanged(object sender, EventArgs e) { var factory = ddlFactory.SelectedValue; var list = AllUaplatformMgr.GetByFactory(factory); ddlPlatform.DataSource = list; ddlPlatform.DataTextField = "PlatformCode"; ddlPlatform.DataValueField = "PlatformCode"; ddlPlatform.DataBind(); if (list != null && list.Count > 0) { ddlPlatform.SelectedIndex = 0; ddlPlatform_SelectedIndexChanged(null, null); } }
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; } }