示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //设置公司ID
     //判断 当前域名是否是专线系统为组团配置的域名
     EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
     companyId = domain.CompanyId;
     //设置导航
     this.WhHeadControl1.NavIndex = 2;
     if (!IsPostBack)
     {
         pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);     //取得页面上的pageindex值.
         BindDatas();
     }
     //设置导航用户控件的公司ID
     this.WhHeadControl1.CompanyId = companyId;
     //设置专线介绍用户控件的公司ID
     this.WhLineControl1.CompanyId = companyId;
     //设置友情链接公司ID
     this.WhBottomControl1.CompanyId = companyId;
     #region 设置页面title,meta
     //声明基础设置实体对象
     EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
     if (configModel != null)
     {
         //添加Meta
         Literal keywork = new Literal();
         keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
         this.Page.Header.Controls.Add(keywork);
     }
     #endregion
 }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EyouSoft.Model.SiteStructure.SiteBasicConfig siteModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(CompanyId);
            if (siteModel != null)
            {
                this.imgLogo.ImageUrl = siteModel.LogoPath;
            }

            if (!IsPostBack)
            {
                #region 设置是否显示

                //声明基础设置实体对象
                EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(CompanyId);
                if (configModel != null)
                {
                    //不显示 设为收藏
                    if (!configModel.IsSetFavorite)
                    {
                        this.liAddFav.Visible = false;
                    }
                    //不显示 设为主页
                    if (!configModel.IsSetHome)
                    {
                        this.liSetHome.Visible = false;
                    }
                }

                #endregion
            }
        }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //设置公司ID
     //判断 当前域名是否是专线系统为组团配置的域名
     domain    = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
     companyId = domain.CompanyId;
     if (!IsPostBack)
     {
         //设定导航页被选中项
         this.WhHeadControl1.NavIndex = 0;
         //绑定省份下拉框
         BindPro();
     }
     #region 设置页面title,meta
     //声明基础设置实体对象
     EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
     if (configModel != null)
     {
         //添加Meta
         Literal keywork = new Literal();
         keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
         this.Page.Header.Controls.Add(keywork);
     }
     #endregion
     //设置导航用户控件的公司ID
     this.WhHeadControl1.CompanyId = companyId;
     //设置专线介绍用户控件的公司ID
     this.WhLineControl1.CompanyId = companyId;
     //设置友情链接公司ID
     this.WhBottomControl1.CompanyId = companyId;
 }
示例#4
0
文件: Utils.cs 项目: windygu/bbl
        /// <summary>
        /// 生成页面标题
        /// </summary>
        /// <param name="title">要设置的标题</param>
        /// <param name="page">当前page对象</param>
        /// <returns></returns>
        public static string GetTitleByCompany(string title, System.Web.UI.Page page)
        {
            string pageTitle = "";

            string urlHost = "";

            if (page == null)
            {
                urlHost = HttpContext.Current.Request.Url.Host.ToLower();
            }
            else
            {
                urlHost = page.Request.Url.Host.ToLower();
            }

            EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(urlHost);
            if (domain != null)
            {
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfo = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(domain.CompanyId, domain.SysId);
                if (companyInfo != null)
                {
                    if (title == "")
                    {
                        pageTitle = companyInfo.CompanyName;
                    }
                    else
                    {
                        pageTitle = title + "_" + companyInfo.CompanyName;
                    }
                }

                //声明基础设置实体对象
                EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
                if (configModel != null)
                {
                    if (configModel.SiteTitle.Trim() != "")
                    {
                        if (title == "")
                        {
                            pageTitle = configModel.SiteTitle;
                        }
                        else
                        {
                            pageTitle = title + "_" + configModel.SiteTitle;
                        }
                    }
                }
            }
            return(pageTitle);
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CompanyId == 0)
            {
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                CompanyId = domain.CompanyId;
            }

            var info = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(CompanyId);

            if (info != null)
            {
                ltr.Text = info.LianXiFangShi;
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //当前页
                pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
                //设置公司ID
                //判断 当前域名是否是专线系统为组团配置的域名
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                if (domain != null)
                {
                    //设置友情链接
                    this.WhBottomControl1.CompanyId = domain.CompanyId;
                    //设置专线介绍
                    this.WhLineControl1.CompanyId = domain.CompanyId;
                    //头部控件
                    this.WhHeadControl1.CompanyId = domain.CompanyId;

                    #region 设置页面title,meta
                    //声明基础设置实体对象
                    EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
                    //if (configModel != null)
                    //{
                    //    if (configModel.SiteTitle.Trim() == "")
                    //    {
                    //        this.Title = "机票政策_望海";
                    //    }
                    //    else
                    //    {
                    //        this.Title = configModel.SiteTitle;
                    //    }
                    //    //添加Meta
                    //    Literal keywork = new Literal();
                    //    keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
                    //    this.Page.Header.Controls.Add(keywork);
                    //}
                    #endregion


                    //初始化列表方法
                    bind();
                }
                //设置导航
                this.WhHeadControl1.NavIndex = 5;
            }
        }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EyouSoft.Model.SiteStructure.SiteBasicConfig info = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(Master.CompanyId);

            if (info != null)
            {
                //获取显示类型
                string mod = Utils.GetQueryStringValue("mod");
                //定义显示内容
                string content = string.Empty;
                //定义小标题
                string title = string.Empty;

                switch (mod)
                {
                case "Introduction":    //企业介绍
                    content = info.Introduction;
                    title   = "企业简介";
                    break;

                case "KeyRoute":    //主营路线
                    content = info.MainRoute;
                    title   = "主营路线";
                    break;

                case "Schooling":    //企业文化
                    content = info.CorporateCulture;
                    title   = "企业文化";
                    break;

                case "Link":    //联系我们
                    content = info.SiteIntro;
                    title   = "联系我们";
                    break;

                default:    //其他为企业介绍
                    content = info.Introduction;
                    title   = "公司介绍";
                    break;
                }

                ltrTitle.Text   = title;
                ltrContent.Text = content;
            }
        }
示例#8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //设置公司ID
     //判断 当前域名是否是专线系统为组团配置的域名
     EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
     companyId = domain.CompanyId;
     #region 设置页面title,meta
     //声明基础设置实体对象
     EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
     if (configModel != null)
     {
         //添加Meta
         Literal keywork = new Literal();
         keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
         this.Page.Header.Controls.Add(keywork);
     }
     #endregion
     //设定导航页被选中项
     this.WhHeadControl1.NavIndex = 4;
     //设置导航用户控件的公司ID
     this.WhHeadControl1.CompanyId = companyId;
     //设置专线介绍用户控件的公司ID
     this.WhLineControl1.CompanyId = companyId;
     //设置友情链接公司ID
     this.WhBottomControl1.CompanyId = companyId;
     if (!IsPostBack)
     {
         //获取QueryString的值
         string hotelId = Utils.GetQueryStringValue("hotelId");
         if (hotelId == "" || hotelId == null)
         {
             photos = "暂无图片";
             return;
         }
         else
         {
             ViewHotelInfo(hotelId);
         }
     }
 }
示例#9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (CompanyId == 0)
                {
                    EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                    CompanyId = domain.CompanyId;
                }

                //获得基本设置实体
                EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(CompanyId);
                if (configModel != null)
                {
                    this.lclFooter.Text = configModel.Copyright;
                }

                //获得友情链接
                int recordCount = 0;
                IList <EyouSoft.Model.SiteStructure.SiteFriendLink> linkList = new EyouSoft.BLL.SiteStructure.SiteFriendLink().GetSiteFriendLink(CompanyId, 10, 1, ref recordCount);
                this.rptLinkList.DataSource = linkList;
                this.rptLinkList.DataBind();
            }
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //设置公司ID
            //判断 当前域名是否是专线系统为组团配置的域名
            EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
            if (!IsPostBack)
            {
                companyId = domain.CompanyId;
                //线路名称
                string areaName = Utils.GetQueryStringValue("AreaName");
                this.txtAreaName.Text = areaName;
                //开始日期
                DateTime?beginDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("BeginDate"));
                if (beginDate != null)
                {
                    this.txtBeginDate.Text = Convert.ToDateTime(beginDate).ToString("yyyy-MM-dd");
                }
                //结束日期
                DateTime?endDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("EndDate"));
                if (endDate != null)
                {
                    this.txtEndDate.Text = Convert.ToDateTime(endDate).ToString("yyyy-MM-dd");
                }
                //线路区域ID
                int?areaId = Utils.GetInt(Utils.GetQueryStringValue("AreaId"));
                if (areaId == 0)
                {
                    areaId = null;
                    DdlAreaInit("");
                }
                else
                {
                    DdlAreaInit(areaId.ToString());
                }
                //城市ID
                int?cityId = Utils.GetInt(Utils.GetQueryStringValue("CityID"));
                if (cityId == 0)
                {
                    cityId = null;
                    CityDataInit("");
                }
                else
                {
                    CityDataInit(cityId.ToString());
                }

                pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);     //取得页面上的pageindex值.
                //初始化
                DataInit(areaName, beginDate, endDate, areaId, cityId);
                //设置专线介绍用户控件的公司ID
                this.WhLineControl1.CompanyId = companyId;
                //设置导航用户控件的公司ID
                this.WhHeadControl1.CompanyId = companyId;
                //设置友情链接公司ID
                this.WhBottomControl1.CompanyId = companyId;
                //设置导航
                this.WhHeadControl1.NavIndex = 3;
            }

            #region 设置页面title,meta
            //声明基础设置实体对象
            EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
            if (configModel != null)
            {
                //添加Meta
                Literal keywork = new Literal();
                keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
                this.Page.Header.Controls.Add(keywork);
            }
            #endregion

            //操作类型
            string type = Utils.GetQueryStringValue("type");
            if (type != "" && type == "isLogin")
            {
                Response.Clear();
                Response.Write(CheckLogin().ToString());
                Response.End();
            }
        }
示例#11
0
        /// <summary>
        /// 页面初始绑定
        /// </summary>
        /// 修改:田想兵 修改时间:2011.5.24
        /// 修改内容:去掉景点图片
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            //杭州:733 宁波:738 嘉兴:735 湖州:734 嘉兴湖州:1145 上海:663
            int[] citys  = { 733, 738, 1145, 663 };
            int   cityId = Utils.GetInt(Utils.GetQueryStringValue("cityid"), citys[0]);

            if (!citys.Contains(cityId))
            {
                cityId = citys[0];
            }

            if (!IsPostBack)
            {
                //设置公司ID
                //判断 当前域名是否是专线系统为组团配置的域名
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());

                //当前页
                pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
                if (domain != null)
                {
                    companyId = domain.CompanyId;

                    //设置景区图片
                    //ImgDataInit(domain.CompanyId);

                    //设置友情链接
                    this.WhBottomControl1.CompanyId = domain.CompanyId;
                    //设置专线介绍
                    this.WhLineControl1.CompanyId = domain.CompanyId;
                    //头部控件
                    this.WhHeadControl1.CompanyId = domain.CompanyId;
                }
                //线路名称
                string areaName = Utils.GetQueryStringValue("AreaName");
                this.txtAreaName.Text = areaName;
                //开始日期
                DateTime?beginDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("BeginDate"));
                if (beginDate != null)
                {
                    this.txtBeginDate.Text = Convert.ToDateTime(beginDate).ToString("yyyy-MM-dd");
                }
                //结束日期
                DateTime?endDate = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("EndDate"));
                if (endDate != null)
                {
                    this.txtEndDate.Text = Convert.ToDateTime(endDate).ToString("yyyy-MM-dd");
                }
                //线路区域ID
                int?areaId = Utils.GetInt(Utils.GetQueryStringValue("AreaId"));
                AreaInit();



                //初始化
                DataInit(areaName, beginDate, endDate, areaId, cityId);

                #region 设置页面title,meta
                //声明基础设置实体对象
                EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
                if (configModel != null)
                {
                    //添加Meta
                    Literal keywork = new Literal();
                    keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
                    this.Page.Header.Controls.Add(keywork);
                }
                #endregion

                //设置导航
                this.WhHeadControl1.NavIndex = 0;
            }

            //操作类型
            string type = Utils.GetQueryStringValue("type");
            if (type != "" && type == "isLogin")
            {
                //返回是否登录信息
                Response.Clear();
                Response.Write(CheckLogin(userModel).ToString());
                Response.End();
            }

            ClientScript.RegisterClientScriptBlock(GetType(), Guid.NewGuid().ToString(), string.Format("var currentCityId={0};", cityId), true);
        }
示例#12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.WhHeadControl1.NavIndex = 1;
            if (!IsPostBack)
            {
                //设置公司ID
                //判断 当前域名是否是专线系统为组团配置的域名
                EyouSoft.Model.SysStructure.SystemDomain domain = new EyouSoft.BLL.SysStructure.SystemDomain().GetDomain(Request.Url.Host.ToLower());
                if (domain != null)
                {
                    //设置友情链接
                    this.WhBottomControl1.CompanyId = domain.CompanyId;
                    //设置专线介绍
                    this.WhLineControl1.CompanyId = domain.CompanyId;
                    //头部控件
                    this.WhHeadControl1.CompanyId = domain.CompanyId;

                    #region 设置页面title,meta
                    //声明基础设置实体对象
                    EyouSoft.Model.SiteStructure.SiteBasicConfig configModel = new EyouSoft.BLL.SiteStructure.SiteBasicConfig().GetSiteBasicConfig(domain.CompanyId);
                    if (configModel != null)
                    {
                        if (configModel.SiteTitle.Trim() == "")
                        {
                            this.Title = "公司介绍_望海";
                        }
                        else
                        {
                            this.Title = configModel.SiteTitle;
                        }
                        //添加Meta
                        Literal keywork = new Literal();
                        keywork.Text = "<meta name=\"keywords\" content= \"" + configModel.SiteMeta + "\" />";
                        this.Page.Header.Controls.Add(keywork);
                        //获取显示类型
                        string mod = Utils.GetQueryStringValue("mod");
                        //定义显示内容
                        string cont = string.Empty;
                        //定义小标题
                        switch (mod)
                        {
                        case "Introduction":    //企业介绍
                            cont = configModel.Introduction;
                            tit  = "企业简介";
                            break;

                        case "KeyRoute":    //主营路线
                            cont = configModel.MainRoute;
                            tit  = "主营路线";
                            break;

                        case "Schooling":    //企业文化
                            cont = configModel.CorporateCulture;
                            tit  = "企业文化";
                            break;

                        case "Link":    //联系我们
                            cont = configModel.SiteIntro;
                            tit  = "联系我们";
                            break;

                        default:    //其他为企业介绍
                            cont = configModel.Introduction;
                            tit  = "公司介绍";
                            break;
                        }
                        //内容
                        this.lblCompanyInfo.Text = cont;
                        //this.lblCompanyInfo.Text = configModel.Introduction;
                    }
                    #endregion
                }
            }
        }