private void SetShopTemplate() { // 根据用户选择网店模板,初始化,默认选择style1.css int Template = 1; int queryStringTemplateId = Utils.GetInt(Request.QueryString["style"]); if (queryStringTemplateId > 0) { Template = queryStringTemplateId; } else { EyouSoft.Model.ShopStructure.HighShopCompanyInfo info = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this.SiteUserInfo.CompanyID); if (info != null) { Template = info.TemplateId; } } if (Template < 1 || Template > 4) { Template = 1; } string styleName = string.Format("style{0}", Template); this.AddStylesheetInclude(CssManage.GetCssFilePath(styleName)); }
private void InitCompanyInfo() { EyouSoft.Model.CompanyStructure.CompanyDetailInfo compDetail = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyID); //公司详细信息 if (compDetail != null) { CompanyBrand = compDetail.CompanyBrand; ltr_Address.Text = "地址:" + compDetail.CompanyAddress; ltr_LinkPerson.Text = "联系人:" + compDetail.ContactInfo.ContactName; ltr_Fax.Text = "传真:" + compDetail.ContactInfo.Fax; ltr_Mobile.Text = "手机:" + compDetail.ContactInfo.Mobile; ltr_Phone.Text = "电话:" + compDetail.ContactInfo.Tel; if (!string.IsNullOrEmpty(compDetail.ContactInfo.MQ)) { Mqpath = string.Format("<img src=\"{0}/Images/seniorshop/mqonline.gif\" width=\"70\" height=\"18\" />", ImageManage.GetImagerServerUrl(1)); }//compDetail.AttachInfo.CompanyShopBanner.ImagePath 图片路径 BannerImage = EyouSoft.Common.Utils.GetEShopImgOrFalash(compDetail.AttachInfo.CompanyShopBanner.ImagePath, "javascript:void(0)"); //高级网店头部图片 CompanyCardPath = Utils.GetLineShopImgPath(compDetail.AttachInfo.CompanyCard.ImagePath, 1); //卡片 } compDetail = null; //版权显示 EyouSoft.Model.ShopStructure.HighShopCompanyInfo info = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(CompanyID); if (info != null) { ltrCopyRight.Text = info.ShopCopyRight; } info = null; }
/// <summary> /// 初始化网店模板信息 /// </summary> private void InitEShopTemplate() { EyouSoft.Model.ShopStructure.HighShopCompanyInfo shopinfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this.SiteUserInfo.CompanyID); int tempId = 1; if (shopinfo != null) { tempId = shopinfo.TemplateId; if (tempId < 1) { tempId = 1; } if (tempId > 4) { tempId = 1; } shopinfo = null; } this.EShopUrl = Utils.GetEShopUrl(this.SiteUserInfo.CompanyID); this.EShopMUrl = Utils.GetEshopMTemplatePath(tempId); this.Page.ClientScript.RegisterStartupScript(GetType(), "js1", "initSelectRadio('" + tempId + "')", true); }
/// <summary> /// 获取高级网店的详细信息 /// </summary> /// <param name="CompanyID">公司编号</param> /// <returns>高级网店的详细信息实体</returns> public EyouSoft.Model.ShopStructure.HighShopCompanyInfo GetModel(string CompanyID) { EyouSoft.Model.ShopStructure.HighShopCompanyInfo model = new EyouSoft.Model.ShopStructure.HighShopCompanyInfo(); model = dal.GetModel(CompanyID); if (model != null) { model.PositionInfo = EyouSoft.BLL.CompanyStructure.CompanySetting.CreateInstance().GetCompanyPositionInfo(CompanyID); } return(model); }
/// <summary> /// 初始化公司地理信息 /// </summary> private void InitCompanyPositionInfo() { EyouSoft.Model.ShopStructure.HighShopCompanyInfo model = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (model != null) { GoogleMapKey = string.IsNullOrEmpty(model.GoogleMapKey) ? EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("appSettings", "GoogleMapsAPIKEY") : model.GoogleMapKey; if (model.PositionInfo != null && model.PositionInfo.Longitude > 0 && model.PositionInfo.Latitude > 0) { Longitude = model.PositionInfo.Longitude; Latitude = model.PositionInfo.Latitude; ZoomLevel = model.PositionInfo.ZoomLevel; } } }
/// <summary> /// 初始化Google Map /// </summary> private void InitGoogleMap() { EyouSoft.Model.ShopStructure.HighShopCompanyInfo model = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (model != null) { this.GoogleMapControl1.Longitude = model.PositionInfo.Longitude; this.GoogleMapControl1.Latitude = model.PositionInfo.Latitude; this.GoogleMapControl1.ShowMapWidth = 244; this.GoogleMapControl1.ShowMapHeight = 226; this.GoogleMapControl1.IsBorder = false; this.GoogleMapControl1.ShowTitleText = SiteUserInfo.CompanyName; GoogleMapControl1.GoogleMapKey = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("appSettings", "GoogleMapsAPIKEY"); } model = null; }
/// <summary> /// Override OnInit /// </summary> /// <param name="e"></param> protected override void OnInit(EventArgs e) { //初始化公司ID string currentUrlPath = HttpContext.Current.Request.ServerVariables["Http_Host"]; //如果使用独立域名访问网店,则根据域名查询所属公司ID. if (Domain.SeniorOnlineShop.IndexOf(currentUrlPath) == -1) { EyouSoft.Model.SystemStructure.SysCompanyDomain cDomianModel = EyouSoft.BLL.SystemStructure.SysCompanyDomain.CreateInstance(). GetSysCompanyDomain(EyouSoft.Model.SystemStructure.DomainType.网店域名, currentUrlPath); if (cDomianModel != null) { this._companyid = cDomianModel.CompanyId; this.TABLINKS_SY = "/"; } } //如果没有使用独立域名访问网店,则从QueryString集合中查找cid参数,获取公司ID if (string.IsNullOrEmpty(this._companyid)) { this._companyid = Utils.GetQueryStringValue("cid"); } //获取高级网店信息和公司信息 this._companyinfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this._companyid); if (this._companyinfo == null) { Utils.ShowError("高级网店不存在!", "SeniorShop"); return; } //判断是否开通高级网店 if (this._companyinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && !Utils.IsOpenHighShop(this._companyid)) { Utils.ShowError("该公司未开通高级网店!", "SeniorShop"); return; } this._companyeshopinfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this._companyid); this.ImageServerUrl = ImageManage.GetImagerServerUrl(1); Utils.EShopTemplateValidate(this.CompanyId, _companyeshopinfo.TemplateId); base.OnInit(e); }
protected void Page_Load(object sender, EventArgs e) { //品牌名称 ltrBrandName.Text = this.Master.CompanyInfo.CompanyBrand; //单位名称初始化 ltrCompanyName.Text = this.Master.CompanyInfo.CompanyName; //许可证初始化 ltrXuKeZheng.Text = this.Master.CompanyInfo.License; EyouSoft.Model.ShopStructure.HighShopCompanyInfo model = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this.Master.CompanyId); if (model != null) { //关于我们初始化 ltrAboutUs.Text = model.CompanyInfo; } model = null; }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsLogin) { EyouSoft.Security.Membership.UserProvider.RedirectLoginOpenTopPage(); } if (!IsPostBack) { EyouSoft.Model.ShopStructure.HighShopCompanyInfo info = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this.SiteUserInfo.CompanyID); if (info != null) { editcopy.Value = info.ShopCopyRight; } info = null; } }
/// <summary> /// 获取高级网店的详细信息 /// </summary> /// <param name="CompanyID">公司编号</param> /// <returns>高级网店的详细信息实体</returns> public virtual EyouSoft.Model.ShopStructure.HighShopCompanyInfo GetModel(string CompanyID) { EyouSoft.Model.ShopStructure.HighShopCompanyInfo model = null; DbCommand dc = this._database.GetSqlStringCommand(SQL_HighShopCompanyInfo_SELECTBYID); this._database.AddInParameter(dc, "CompanyID", DbType.AnsiStringFixedLength, CompanyID); using (IDataReader dr = DbHelper.ExecuteReader(dc, this._database)) { if (dr.Read()) { model = new EyouSoft.Model.ShopStructure.HighShopCompanyInfo(); model.CompanyID = dr.GetString(0); if (!dr.IsDBNull(1)) { model.CompanyInfo = dr.GetString(1); } else { model.CompanyInfo = ""; } if (!dr.IsDBNull(2)) { model.TemplateId = int.Parse(dr[2].ToString()); } if (!dr.IsDBNull(3)) { model.ShopCopyRight = dr.GetString(3); } else { model.ShopCopyRight = ""; } model.GoogleMapKey = dr["GoogleMapKey"].ToString(); } } return(model); }
private void InitCompanyInfo() { // 公司基本信息 EyouSoft.Model.CompanyStructure.CompanyDetailInfo model = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (model != null) { if (model.AttachInfo != null && model.AttachInfo.CompanyShopBanner != null && !String.IsNullOrEmpty(model.AttachInfo.CompanyShopBanner.ImagePath)) { this.imgBanner.Src = Domain.FileSystem + model.AttachInfo.CompanyShopBanner.ImagePath; } this.ltrContactName.Text = model.ContactInfo.ContactName; this.ltrTel.Text = model.ContactInfo.Tel; this.ltrFax.Text = model.ContactInfo.Fax; this.ltrWebSite.Text = model.WebSite; this.ltrAdress.Text = model.CompanyAddress; this.ltrMQ.Text = Utils.GetMQ(model.ContactInfo.MQ); this.ltrQQ.Text = Utils.GetQQ(model.ContactInfo.QQ); } model = null; EyouSoft.Model.CompanyStructure.CompanyAttachInfo attachmodel = EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (attachmodel != null && attachmodel.CompanyLogo != null && !String.IsNullOrEmpty(attachmodel.CompanyLogo.ImagePath)) { this.imgLogo.Src = Domain.FileSystem + attachmodel.CompanyLogo.ImagePath; } else { this.imgLogo.Src = Domain.FileSystem + "/images/shopnoimg/nologo.gif"; } EyouSoft.Model.ShopStructure.HighShopCompanyInfo CompanyInfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (CompanyInfo != null && !String.IsNullOrEmpty(CompanyInfo.CompanyInfo)) { // 关于我们 this.ltrAboutUsTitle.Text = SiteUserInfo.CompanyName; this.ltrAboutUs.Text = Utils.GetText(Utils.InputText(CompanyInfo.CompanyInfo), 150, true) + "<span style=\"background: #FFF6C7; border: 1px solid #FF8624;color: #339933; float: center; text-align:left;height:15px; width:165px; cursor:pointer;\" onclick=\"return boxymethods('/eshop/setaboutus.aspx','景区介绍',730,470);\"><img src=\"" + ImageManage.GetImagerServerUrl(1) + "/Images/seniorshop/gan.gif\" /><strong>【添加景区介绍】</strong></span>"; this.ltrCopyright.Text = CompanyInfo.ShopCopyRight; // 版权 } CompanyInfo = null; // 广告图片 EyouSoft.Model.CompanyStructure.SupplierInfo smodel = EyouSoft.BLL.CompanyStructure.SupplierInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (smodel != null && smodel.ProductInfo != null && smodel.ProductInfo.Count > 0) { this.imgAdv.Src = Domain.FileSystem + smodel.ProductInfo[0].ImagePath.ToString(); } else { this.imgAdv.Src = ImageManage.GetImagerServerUrl(1) + "/images/shopnoimg/norotapic.gif"; } smodel = null; // 友情链接 IList <EyouSoft.Model.ShopStructure.HighShopFriendLink> FriendLinkList = EyouSoft.BLL.ShopStructure.HighShopFriendLink.CreateInstance().GetList(SiteUserInfo.CompanyID); string tmp = "<b><font class=\"C_G\">友情链接:</font></b>"; if (FriendLinkList != null && FriendLinkList.Count > 0) { foreach (EyouSoft.Model.ShopStructure.HighShopFriendLink linkModel in FriendLinkList) { tmp += linkModel.LinkName + "|"; } if (tmp.EndsWith("|")) { tmp = tmp.Substring(0, tmp.Length - 1); } } this.ltrFriendLink.Text = tmp; FriendLinkList = null; }
/// <summary> /// Override OnInit /// </summary> /// <param name="e"></param> protected override void OnInit(EventArgs e) { this.ImageServerUrl = ImageManage.GetImagerServerUrl(1); //初始化公司ID string currentUrlPath = HttpContext.Current.Request.ServerVariables["Http_Host"]; //如果使用独立域名访问网店,则根据域名查询所属公司ID. if (Domain.SeniorOnlineShop.IndexOf(currentUrlPath) == -1) { EyouSoft.Model.SystemStructure.SysCompanyDomain cDomianModel = EyouSoft.BLL.SystemStructure.SysCompanyDomain.CreateInstance(). GetSysCompanyDomain(EyouSoft.Model.SystemStructure.DomainType.网店域名, currentUrlPath); if (cDomianModel != null) { this._companyid = cDomianModel.CompanyId; this.TABLINKS_SY = "/"; } } //如果没有使用独立域名访问网店,则从QueryString集合中查找cid参数,获取公司ID if (string.IsNullOrEmpty(this._companyid)) { this._companyid = Utils.GetQueryStringValue("cid"); } //获取高级网店信息和公司信息 this._companyinfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this._companyid); if (this._companyinfo == null) { Utils.ShowError("高级网店不存在!", "景区高级网店"); return; } //判断是否开通高级网店 if (this._companyinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区) && !Utils.IsOpenHighShop(this._companyid)) { Utils.ShowError("该公司未开通高级网店!", "景区高级网店"); return; } this._companyeshopinfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this._companyid); //高级网店配置信息 if (this._companyeshopinfo == null) { Utils.ShowError("高级网店未做任何配置,暂时不能访问!", "景区高级网店"); return; } if (string.IsNullOrEmpty(this.CompanyEShopInfo.GoogleMapKey) || this.CompanyEShopInfo.GoogleMapKey.ToLower() == "undefined") { GoogleMapKey = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("appSettings", "GoogleMapsAPIKEY"); } else { GoogleMapKey = this.CompanyEShopInfo.GoogleMapKey; } base.OnInit(e); }
/// <summary> /// 初始化公司相关信息 /// </summary> private void InitCInfo() { this.CompanyId = this.SiteUserInfo.CompanyID; this.CompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this.CompanyId); this.CompanyEShopInfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(this.CompanyId); }