Esempio n. 1
0
        protected override void OnInit(EventArgs e)
        {
            //初始化公司ID
            bool   IsIndependentDomain = false;
            string currentUrlPath      = HttpContext.Current.Request.ServerVariables["Http_Host"];

            //是否正在使用独立域名访问网店
            if (Domain.SeniorOnlineShop.IndexOf(currentUrlPath) == -1)
            {
                IsIndependentDomain = true;
            }
            //如果使用独立域名访问网店,则根据域名查询所属公司ID.
            if (IsIndependentDomain)
            {
                EyouSoft.Model.SystemStructure.SysCompanyDomain cDomianModel = EyouSoft.BLL.SystemStructure.SysCompanyDomain.CreateInstance().
                                                                               GetSysCompanyDomain(EyouSoft.Model.SystemStructure.DomainType.网店域名, currentUrlPath);
                if (cDomianModel != null)
                {
                    _CompanyId       = cDomianModel.CompanyId;
                    this.TABLINKS_SY = "/";
                }
            }
            //如果没有使用独立域名访问网店,则从QueryString集合中查找cid参数,获取公司ID
            if (string.IsNullOrEmpty(_CompanyId))
            {
                _CompanyId = Utils.GetQueryStringValue("cid");
            }
            //获取高级网店信息和公司信息
            _detailCompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(_CompanyId);
            if (_detailCompanyInfo == null)
            {
                Utils.ShowError("高级网店不存在!", "SeniorShop");
                return;
            }
            //判断是否开通高级网店
            if (_detailCompanyInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线))
            {
                bool isOpenShop = false;
                isOpenShop = Utils.IsOpenHighShop(_CompanyId);
                //EyouSoft.Model.CompanyStructure.CompanyState state = new EyouSoft.Model.CompanyStructure.CompanyState();
                //Utils.GetCompanyDomain(CompanyId, out state,out isOpenShop, EyouSoft.Model.CompanyStructure.CompanyType.专线);
                if (!isOpenShop)
                {
                    Utils.ShowError("该公司未开通高级网店!", "SeniorShop");
                    return;
                }
            }

            _highCompanyInfo = EyouSoft.BLL.ShopStructure.HighShopCompanyInfo.CreateInstance().GetModel(_CompanyId);

            if (_highCompanyInfo == null)
            {
                Utils.ShowError("高级网店不存在!", "SeniorShop");
                return;
            }
            Utils.EShopTemplateValidate(this.CompanyId, _highCompanyInfo.TemplateId);

            base.OnInit(e);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string currentHost = HttpContext.Current.Request.ServerVariables["Http_Host"].ToLower();

            EyouSoft.Model.SystemStructure.SysCompanyDomain cDomianModel = EyouSoft.BLL.SystemStructure.SysCompanyDomain.CreateInstance().
                                                                           GetSysCompanyDomain(EyouSoft.Model.SystemStructure.DomainType.网店域名, currentHost);
            if (cDomianModel != null && !cDomianModel.IsDisabled)
            {
                string transferPath = "/seniorshop/default.aspx";

                if (!string.IsNullOrEmpty(cDomianModel.GoToUrl))
                {
                    transferPath = cDomianModel.GoToUrl;
                }

                Server.Transfer(transferPath);
            }
            else
            {
                Utils.ShowError("您当前查看的高级网店不存在", "SeniorShop");
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 设置公司编号
        /// </summary>
        private void SetCompanyId()
        {
            //初始化公司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;
                }
            }

            //如果没有使用独立域名访问网店,则从QueryString集合中查找cid参数,获取公司ID
            if (string.IsNullOrEmpty(this._companyid))
            {
                this._companyid = Utils.GetQueryStringValue("cid");
            }

            //获取高级网店信息和公司信息
            _companyinfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(this._companyid);
            if (_companyinfo == null || _companyinfo.StateMore.IsDelete)
            {
                Utils.ShowError("高级网店不存在!", "SeniorShop");
                return;
            }

            //判断是否开通高级网店
            if (_companyinfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线) && !Utils.IsOpenHighShop(this._companyid))
            {
                Utils.ShowError("该公司未开通高级网店!", "SeniorShop");
                return;
            }
        }
Esempio n. 5
0
        /// <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);
        }