protected void Page_Load(object sender, EventArgs e) { cMaster = (SeniorOnlineShop.master.T4) this.Master; if (!IsPostBack) { if (cMaster == null) { return; } #region 设置导航栏Tab索引 cMaster.CTAB = master.T4TAB.出游指南; #endregion #region 初始化风土人情列表 LocalCultures.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(9, cMaster.CompanyId, 1, ""); LocalCultures.DataBind(); #endregion #region 初始化温馨提醒列表 IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(10, cMaster.CompanyId, 2, ""); if (list != null && list.Count > 0) { ltrTopOneWarm.Text = string.Format("<a target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\"><img src=\"{2}\" width=\"79\" height=\"67\" border=\"0\"/></a>", cMaster.CompanyId, list[0].ID, Utils.GetLineShopImgPath(list[0].ImagePath, 4)); lbTopOneTitle.Text = string.Format("<a target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\">{2}</a>", cMaster.CompanyId, list[0].ID, Utils.GetText2(list[0].Title, 8, false)); lbTopOneContent.Text = string.Format("<a style=\"color:#999;\" target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\">{2}</a>", cMaster.CompanyId, list[0].ID, Utils.GetText2(StringValidate.LoseHtml(list[0].ContentText), 38, true)); list.RemoveAt(0); rpWarmInfos.DataSource = list; rpWarmInfos.DataBind(); } #endregion #region 初始化综合介绍列表 CompositeReferral.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(10, cMaster.CompanyId, 3, ""); CompositeReferral.DataBind(); #endregion #region 初始化旅游资源推荐 HotResource.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(30, cMaster.CompanyId, 4, ""); HotResource.DataBind(); #endregion Page.Title = "出游指南"; } }
protected void Page_Load(object sender, EventArgs e) { cMaster = (SeniorOnlineShop.master.T4) this.Master; if (!IsPostBack) { if (cMaster == null) { return; } #region 设置导航栏Tab索引 cMaster.CTAB = master.T4TAB.出游指南; #endregion #region 初始化数据 InitPageData(); #endregion } Page.Title = lbTitle.InnerText + "_出游指南"; }
/// <summary> /// 初始化在线服务 /// </summary> public void InitOlServer() { SeniorOnlineShop.master.T4 cMaster = (SeniorOnlineShop.master.T4) this.Master; if (cMaster != null) { lbCompanyName.Text = cMaster.CompanyInfo.CompanyName; } cMaster = null; string Remote_IP = StringValidate.GetRemoteIP(); EyouSoft.Model.SystemStructure.CityBase cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetClientCityByIp(Remote_IP); if (cityModel != null) { EyouSoft.Model.SystemStructure.SysCity thisCityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cityModel.CityId); if (thisCityModel != null) { lbGuestInfo.Text = string.Format("欢迎您来自{0}省{1}市的朋友有什么可以帮助您的吗?", thisCityModel.ProvinceName, thisCityModel.CityName); } thisCityModel = null; } cityModel = null; }