Esempio n. 1
0
        /// <summary>
        /// 根据系统ID和用户类型,获取用户退出后要跳转的页面地址
        /// </summary>
        /// <param name="systemId">系统ID</param>
        /// <param name="userType">用户类型</param>
        /// <returns></returns>
        private string GetLoginUrl(int systemId, EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType userType)
        {
            string loginUrl = string.Empty;
            string zxurl    = string.Empty;
            var    items    = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomains(systemId);

            EyouSoft.Model.EnumType.SysStructure.DomainType domainType = EyouSoft.Model.EnumType.SysStructure.DomainType.专线入口;
            switch (userType)
            {
            case EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.地接用户: break;

            case EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.专线用户: break;

            case EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.组团用户: domainType = EyouSoft.Model.EnumType.SysStructure.DomainType.行入口; break;
            }

            if (items != null && items.Count > 0)
            {
                foreach (var item in items)
                {
                    if (!string.IsNullOrEmpty(loginUrl))
                    {
                        break;
                    }
                    if (string.IsNullOrEmpty(zxurl) && item.DomainType == EyouSoft.Model.EnumType.SysStructure.DomainType.专线入口)
                    {
                        zxurl = "http://" + item.Domain + item.Url;
                    }

                    if (string.IsNullOrEmpty(loginUrl) && item.DomainType == domainType)
                    {
                        loginUrl = "http://" + item.Domain + item.Url;
                    }
                }
            }

            if (string.IsNullOrEmpty(loginUrl))
            {
                loginUrl = zxurl;
            }

            if (string.IsNullOrEmpty(loginUrl))
            {
                loginUrl = "/login.aspx";
            }

            return(loginUrl);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取指定公司的LOGO
        /// </summary>
        /// <param name="CompanyId">公司编号</param>
        /// <returns></returns>
        public string GetCompanyLogo(int CompanyId, EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType CompanyType)
        {
            if (CompanyId <= 0)
            {
                return(string.Empty);
            }
            string CompanyLogo = string.Empty;

            if (CompanyType == EyouSoft.Model.EnumType.CompanyStructure.CompanyUserType.专线用户)
            {
                EyouSoft.Model.CompanyStructure.CompanyFieldSetting model = this.GetSetting(CompanyId);
                if (model != null)
                {
                    CompanyLogo = model.CompanyLogo;
                }
                model = null;
            }
            else
            {
                int BrandId = 0;
                EyouSoft.Model.CompanyStructure.CustomerInfo CustomerModel = new DAL.CompanyStructure.Customer().GetCustomerModel(CompanyId);
                if (CustomerModel != null)
                {
                    BrandId       = CustomerModel.BrandId;
                    CustomerModel = null;
                }
                if (BrandId > 0)
                {
                    EyouSoft.Model.CompanyStructure.CompanyBrand BrandModel = new DAL.CompanyStructure.CompanyBrand().GetModel(BrandId);
                    if (BrandModel != null)
                    {
                        CompanyLogo = BrandModel.Logo1;
                    }
                    BrandModel = null;
                }
            }
            return(CompanyLogo);
        }