Exemple #1
0
        protected override void OnPreRender(EventArgs e)
        {
            cMaster = (SeniorOnlineShop.master.ScenicSpotsT1) this.Page.Master;
            if (cMaster == null)
            {
                Utils.ShowError("当前页面模板页错误!", "景区网店");
                return;
            }

            var qmodel = new EyouSoft.Model.ScenicStructure.MScenicImgSearch
            {
                ImgType =
                    new EyouSoft.Model.ScenicStructure.ScenicImgType?[]
                {
                    EyouSoft.Model.ScenicStructure.ScenicImgType.景区形象,
                    EyouSoft.Model.ScenicStructure.ScenicImgType.其他
                }
            };
            IList <EyouSoft.Model.ScenicStructure.MScenicImg> list =
                EyouSoft.BLL.ScenicStructure.BScenicImg.CreateInstance().GetList(RowSize * CellSize, cMaster.CompanyId,
                                                                                 qmodel);

            if (list != null && list.Count > 0)
            {
                dlPics.RepeatColumns = CellSize;
                dlPics.DataSource    = list;
                dlPics.DataBind();
            }
            list = null;
            base.OnPreRender(e);
        }
Exemple #2
0
        /// <summary>
        /// 初始化在线服务
        /// </summary>
        public void InitOlServer()
        {
            SeniorOnlineShop.master.ScenicSpotsT1 cMaster = (SeniorOnlineShop.master.ScenicSpotsT1) 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;
        }