コード例 #1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            EyouSoft.Common.Control.FrontPage page = this.Page as FrontPage;

            //判断用户是否登录
            if (!page.IsLogin)
            {
                Response.Redirect("/AirTickets/Login.aspx", true);
            }


            page.AddStylesheetInclude(CssManage.GetCssFilePath("body"));
            page.AddStylesheetInclude(CssManage.GetCssFilePath("jipiaostyle"));
            page.AddJavaScriptInclude(JsManage.GetJsFilePath("jquery"), false, false);

            //根据用户的身份 初始化其对应的后台系统地址
            ltrUserName.Text = page.SiteUserInfo.UserName;

            //根据当前用户所属的公司ID ,从公司信息中 获取 用户的登录次数和最后登录时间
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyInfo =
                EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(page.SiteUserInfo.CompanyID);
            if (companyInfo != null)
            {
                ltrLoginCount.Text    = companyInfo.StateMore.LoginCount.ToString();
                ltrLastLoginTime.Text = companyInfo.StateMore.LastLoginTime.ToString("yyyy年MM月dd日HH点mm分");//格式2010年8月13日9点19分
            }

            //判断当前用户身份,如果其是机票供应商,则显示 进入机票供应商后台 链接。
            if (page.IsAirTicketSupplyUser)//是
            {
                spanAirGongYinLink.Visible = true;
            }
            else//不是
            {
                spanAirGongYinLink.Visible = false;
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.AddStylesheetInclude(CssManage.GetCssFilePath("main"));
            // 判断是否已经登录
            if (!IsLogin)
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLogin(Domain.UserBackCenter + "/Default.aspx");
            }
            else
            {
                if (SiteUserInfo != null)
                {
                    UserInfoModel = SiteUserInfo;
                    CompanyID     = UserInfoModel.CompanyID;
                }
            }

            if (!Page.IsPostBack)
            {
                // 根据当前登录人获取当前公司信息


                if (!String.IsNullOrEmpty(Request.QueryString["RouteID"]))
                {
                    RouteID = Utils.InputText(Request.QueryString["RouteID"]);
                }
                else
                {
                    //MessageBox.ShowAndClose(this, "未找到您要查看的线路信息");
                    //return;
                }

                InitBasicInfo();
                InitRouteInfo(RouteID);
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //网店的点击量
            EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().SetShopClickNum(this.CompanyId);

            #region 根据用户选择网店模板,初始化,默认选择style1.css
            int styleIndex = 1;
            if (_highCompanyInfo != null)
            {
                styleIndex = _highCompanyInfo.TemplateId;
                if (_highCompanyInfo.TemplateId < 1 || _highCompanyInfo.TemplateId > 4)
                {
                    styleIndex = 1;
                }
            }
            string    styleName = string.Format("style{0}", styleIndex);
            FrontPage basepage  = this.Page as FrontPage;
            basepage.AddStylesheetInclude(CssManage.GetCssFilePath(styleName));
            #endregion

            //初始化ImageServerUrl
            ImageServerUrl = basepage.ImageServerUrl;

            //初始化页面标题,公司名称
            string companyName = _detailCompanyInfo.CompanyName;
            //this.Page.Title = string.Format("{0}_{1}",this.Page.Title,companyName);
            if (this.Page.Title.Equals(string.Empty) || this.Page.Title.Equals("首页"))
            {
                this.Page.Title = string.Format("{0}", companyName);
            }
            else
            {
                this.Page.Title = string.Format("{0}_{1}", this.Page.Title, companyName);
            }
            //EyouSoft.Model.SystemStructure.SysProvince provinceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(_detailCompanyInfo.ProvinceId);
            //EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(_detailCompanyInfo.CityId);
            //this.Page.Title = string.Format("{1}", this.Page.Title, companyName);
            //HtmlMeta meta = new HtmlMeta();
            //meta.Name = "description";
            //meta.Content = string.Format(EyouSoft.Common.PageTitle.SeniorShop_Des, companyName, provinceModel.ProvinceName + cityModel.CityName, "3");
            //Page.Header.Controls.Add(meta);

            #region 页面顶部初始化
            //用户是否登录
            //noLogin.Visible = true;
            //isLogin.Visible = false;
            //顶部菜单链接初始化
            #endregion

            //高级网店头部图片javascript:void(0)
            BannerImage = Utils.GetEShopImgOrFalash(_detailCompanyInfo.AttachInfo.CompanyShopBanner.ImagePath, "javascript:void(0)");
            //Utils.GetLineShopImgPath( _detailCompanyInfo.AttachInfo.CompanyLogo.ImagePath,2);
            //imgLogo.Src = companyLogoSrc;
            //linkLogo.HRef = Utils.GenerateShopPageUrl("/seniorshop/Default.aspx", _CompanyId);


            //公司名称初始化
            //ltrCompanyName.Text = companyName;

            //营业执照号初始化
            //ltrNum.Text = _detailCompanyInfo.License;

            #region 初始化导航栏
            string navOnCss   = "nav-on";
            string currentUrl = Request.Url.ToString();
            //根据当前访问的Url,高亮访问的url对应的导航链接
            if (currentUrl.IndexOf("seniorshop/default", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkHome.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/tourlist", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkTourList.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/TourDetail", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkTourList.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/ziyuan", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkZiYuan.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/mudidi", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkMudidi.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/newslist", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkNews.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/new", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkNews.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/noticelist", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkNotice.Attributes["class"] = navOnCss;
            }
            else if (currentUrl.IndexOf("seniorshop/aboutus", StringComparison.OrdinalIgnoreCase) != -1)
            {
                linkAboutUs.Attributes["class"] = navOnCss;
            }
            //初始化导航链接
            linkHome.HRef     = Utils.GenerateShopPageUrl2(this.TABLINKS_SY, _CompanyId);
            linkTourList.HRef = Utils.GenerateShopPageUrl2("/TourList", _CompanyId);;
            linkZiYuan.HRef   = Utils.GenerateShopPageUrl2("/ziyuan", _CompanyId);
            linkMudidi.HRef   = Utils.GenerateShopPageUrl2("/mudidis", _CompanyId);
            linkNews.HRef     = Utils.GenerateShopPageUrl2("/newslist", _CompanyId);
            linkNotice.HRef   = Utils.GenerateShopPageUrl2("/noticelist", _CompanyId);
            linkAboutUs.HRef  = Utils.GenerateShopPageUrl2("/aboutus", _CompanyId);
            #endregion


            #region 公司档案初始化
            if (basepage.IsLogin)
            {
                phLogin.Visible   = true;
                phNoLogin.Visible = false;

                ltrUserName.Text = basepage.SiteUserInfo.UserName;
                linkLogout.HRef  = Utils.GetLogoutUrl(linkHome.HRef);
            }
            else
            {
                phLogin.Visible   = false;
                phNoLogin.Visible = true;

                basepage.AddJavaScriptInclude(JsManage.GetJsFilePath("blogin"), false, false);
                this.Page.RegisterClientScriptBlock("blogininit", "<script>;blogin.ssologinurl='" + EyouSoft.Common.Domain.PassportCenter + "';</script>");
                btnLogin.Attributes["onclick"] = "$('#errSpan').html('');blogin(document.getElementById('aspnetForm'),'','" + linkHome.HRef + "',function(m){$('#errSpan').html(m);});return false;";
            }
            //注册链接初始化
            linkUserReg.HRef = Domain.UserPublicCenter + "/Register/CompanyUserRegister.aspx";

            //初始化公司品牌名称
            CompanyBrandName = _detailCompanyInfo.CompanyBrand;//"公司品牌名称";

            //出港城市初始化
            //ltrDepartureCity.Text = "出港城市";

            //联系人初始化
            ltrContactPeople.Text = _detailCompanyInfo.ContactInfo.ContactName;//"联系人";
            //MQ点击初始化
            MQLink = Utils.GetMQ(_detailCompanyInfo.ContactInfo.MQ);

            //手机初始化
            ltrMobile.Text = _detailCompanyInfo.ContactInfo.Mobile;

            //电话初始化
            ltrTelPhone.Text = _detailCompanyInfo.ContactInfo.Tel;

            //传真初始化
            ltrFax.Text = _detailCompanyInfo.ContactInfo.Fax;

            //地址初始化
            ltrAddress.Text = _detailCompanyInfo.CompanyAddress;

            //会员信用信息初始化
            //是否已发布服务承诺
            //ltrChengNuo.Text = @"<img src='"+ImageServerUrl+"/images/seniorshop/Commitico16.gif' /><span class='hui'>已发布承诺书,查看详细</span>";

            ////信用指数
            //XinYongZhiShu = "信用60分";
            ////活跃指数
            //HuoYueZhiShu = "活跃60fen";
            ////推荐指数
            //TuiJianZhiShu = "推荐60分";
            #endregion

            //企业名片初始化
            imgMingPian.Src = Utils.GetLineShopImgPath(_detailCompanyInfo.AttachInfo.CompanyCard.ImagePath, 1);//string.Format("{0}/images/seniorshop/mingpian.gif",ImageServerUrl);

            //友情链接初始化
            //HighShopFriendLink..::.GetList
            rptFriendLinks.DataSource = EyouSoft.BLL.ShopStructure.HighShopFriendLink.CreateInstance().GetList(_CompanyId);
            rptFriendLinks.DataBind();



            //页脚初始化
            ltrCopyRight.Text = _highCompanyInfo != null?_highCompanyInfo.ShopCopyRight:"";
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string titleInfo = "";
            string url       = "";
            string url2      = "";

            if (Utils.GetFormValue("method") == "save")   //航班折扣申请
            {
                SavePlaneInfo();
                return;
            }

            if (!string.IsNullOrEmpty(Utils.InputText(Request.QueryString["TypeID"])))
            {
                TypeID = Utils.GetInt(Request.QueryString["TypeID"]);
                if (!string.IsNullOrEmpty(Utils.InputText(Request.QueryString["NewsID"])))
                {
                    NewsID = Utils.GetInt(Request.QueryString["NewsID"]);
                    //实例化类的对象,更新浏览次数
                    EyouSoft.BLL.SystemStructure.Affiche.CreateInstance().UpdateReadCount(NewsID);
                    //绑定数据
                    BindListInfo();
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "暂无该新闻信息!", "PlaneListPage.aspx?CityId=" + CityId);
                    return;
                }
                url = Utils.GeneratePublicCenterUrl("PlaneListPage.aspx", CityId);
                switch (TypeID)
                {
                case 0:
                    titleName += "_运价参考";
                    url2       = Utils.GeneratePublicCenterUrl("PlaneNewsList.aspx?TypeID=0", CityId);
                    titleInfo  = string.Format("<a href=\"{0}\">机票首页</a> <a href=\"{1}\"> >运价参考</a> >正文", url, url2);
                    #region 加载航班折扣申请用到的js,css,控件
                    this.AddStylesheetInclude(CssManage.GetCssFilePath("boxy"));
                    this.AddJavaScriptInclude(JsManage.GetJsFilePath("boxy"), true, false);
                    this.AddJavaScriptInclude(JsManage.GetJsFilePath("validatorform"), true, false);
                    divPlaneAppl.Visible = true;
                    #endregion
                    break;

                case 1:
                    titleName += "_帮助信息";
                    url2       = Utils.GeneratePublicCenterUrl("PlaneNewsList.aspx?TypeID=1", CityId);
                    titleInfo  = string.Format("<a href=\"{0}\">机票首页</a> <a href=\"{1}\"> >帮助信息</a> >正文", url, url2);
                    break;

                default:
                    titleName += "_合作供应商";
                    url2       = Utils.GeneratePublicCenterUrl("PlaneNewsList.aspx?TypeID=2", CityId);
                    titleInfo  = string.Format("<a href=\"{0}\">机票首页</a> <a href=\"{1}\"> >合作供应商</a> >正文", url, url2);
                    break;
                }
                this.div_Title.InnerHtml        = titleInfo;
                this.CityAndMenu1.HeadMenuIndex = 3;
                this.Page.Title     = titleName;
                this.hidNewId.Value = NewsID.ToString();  //文章ID  (用于机票)
                this.hidTitle.Value = titleName;
            }
            else
            {
                //广告连接过来
                if (!string.IsNullOrEmpty(Utils.InputText(Request.QueryString["NewsID"])))
                {
                    int advID = Utils.GetInt(Request.QueryString["NewsID"]);
                    EyouSoft.Model.AdvStructure.AdvInfo advModel = EyouSoft.BLL.AdvStructure.Adv.CreateInstance().GetAdvInfo(advID);
                    if (advModel != null)
                    {
                        //初始化信息:时间,标题,内容
                        this.lbl_Time.Text    = advModel.IssueTime.ToString("yyyy年MM月dd日 hh:mm");
                        this.lbl_Title.Text   = advModel.Title;
                        this.lit_Content.Text = advModel.Remark;
                        this.divShow.Visible  = false;
                        this.Page.Title       = advModel.Title;
                        this.hidNewId.Value   = advID.ToString();   //文章ID  (用于机票)
                        this.hidTitle.Value   = advModel.Title;
                    }
                    advModel = null;
                }
                else
                {
                    EyouSoft.Common.Function.MessageBox.ShowAndRedirect(this.Page, "暂无该广告信息!", "/Default.aspx?CityId=" + CityId);
                    return;
                }
            }
        }
コード例 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Utils.AddStylesheetInclude(CssManage.GetCssFilePath("index2011"));
 }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            (this.Master as UserPublicCenter.MasterPage.NewPublicCenter).HeadMenuIndex = 3;
            Utils.AddStylesheetInclude(CssManage.GetCssFilePath("index2011"));
            Utils.AddStylesheetInclude(CssManage.GetCssFilePath("InformationStyle"));

            if (Utils.GetFormValue("hidSave") == "save")
            {
                EyouSoft.Model.TicketStructure.GroupTickets model = new EyouSoft.Model.TicketStructure.GroupTickets();
                int airType = Utils.GetInt(Request.Form["selAirCompany"]);//获取航空公司
                if (airType > 0)
                {
                    model.AirlinesType = (EyouSoft.Model.TicketStructure.AirlinesType)airType;
                }
                model.Contact      = Utils.GetFormValue("txtContacter");
                model.ContactQQ    = Utils.GetFormValue("txtQQ");
                model.Email        = Utils.GetFormValue("txtEmail");
                model.EndCity      = Utils.GetFormValue("txtEndCity");
                model.FlightNumber = Utils.GetFormValue("txtNo");
                model.GroupType    = (EyouSoft.Model.TicketStructure.GroupType)Utils.GetInt(Request.Form["rdiType"], 1);
                model.HopesPrice   = Utils.GetDecimal(Request.Form["txtPrice"]);
                model.IssueTime    = DateTime.Now;
                model.Notes        = Utils.GetFormValue("txtReamrk", 500);
                model.PelopeCount  = Utils.GetInt(Request.Form["txtNum"]);
                if (model.PelopeCount < 10)
                {
                    Utils.ShowAndRedirect("预订失败,人数不正确!", this.Request.Url.ToString());
                }
                model.Phone     = Utils.GetFormValue("txtTel");
                model.StartCity = Utils.GetFormValue("txtStartCity");
                model.StartTime = Utils.GetFormValue("txtStartDate");
                model.TimeRange = Utils.GetFormValue("selSTime") + "—" + Utils.GetFormValue("selETime");
                string[] names   = Utils.GetFormValues("txtName");
                string[] pTypes  = Utils.GetFormValues("selpType");
                string[] cTypes  = Utils.GetFormValues("selcType");
                string[] cNos    = Utils.GetFormValues("txtcNo");
                string[] mobiles = Utils.GetFormValues("txtMobile");
                if (names != null && names.Length > 0)
                {
                    IList <EyouSoft.Model.TicketStructure.PassengerInformation> passengerList = new List <EyouSoft.Model.TicketStructure.PassengerInformation>();
                    for (int i = 0; i < names.Length; i++)
                    {
                        EyouSoft.Model.TicketStructure.PassengerInformation passenger = new EyouSoft.Model.TicketStructure.PassengerInformation();
                        passenger.DocumentNo    = cNos[i];
                        passenger.DocumentType  = (EyouSoft.Model.TicketStructure.DocumentType)Utils.GetInt(cTypes[i], 1);
                        passenger.Mobile        = mobiles[i];
                        passenger.PassengerType = (EyouSoft.Model.TicketStructure.PassengerType)Utils.GetInt(pTypes[i], 1);
                        passenger.UName         = names[i];
                        passengerList.Add(passenger);
                    }
                    model.PassengerInformationList = passengerList;
                }
                if (EyouSoft.BLL.TicketStructure.GroupTickets.CreateInstance().AddGroupTickets(model))
                {
                    Utils.ShowAndRedirect("预订成功!", this.Request.Url.ToString());
                }
                else
                {
                    Utils.ShowAndRedirect("预订失败!", this.Request.Url.ToString());
                }
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GetUnionLogo();
                InitCompanyInfo();
                FrontPage basepage = this.Page as FrontPage;
                basepage.AddJavaScriptInclude(JsManage.GetJsFilePath("jquery"), false, false);
                basepage.AddStylesheetInclude(CssManage.GetCssFilePath("gouwu"));
                basepage.AddStylesheetInclude(CssManage.GetCssFilePath("body"));
                GetCity();
                CityId       = (this.Page as EyouSoft.Common.Control.FrontPage).CityId;
                IsSiteExtend = EyouSoft.BLL.AdvStructure.SiteExtend.CreateInstance().IsExtendSite(CityId);
                BindNotice();       //公告
                BindNum();          //采购商、供应商、供需数量
                GetUnionLogo();     //联盟logo
                this.GetHotCitys(); //热门城市

                switch (HeadMenuIndex)
                {
                case 1:
                    menu1.Attributes["class"] = "select";
                    break;

                case 2:
                    menu2.Attributes["class"] = "select";
                    break;

                case 3:
                    menu3.Attributes["class"] = "select";
                    break;

                case 4:
                    menu4.Attributes["class"] = "select";
                    break;

                case 5:
                    menu5.Attributes["class"] = "select";
                    break;

                case 6:
                    menu6.Attributes["class"] = "select";
                    break;

                case 7:
                    menu7.Attributes["class"] = "select";
                    break;

                default:
                    menu1.Attributes["class"] = "select";
                    break;
                }

                menu1.HRef = SubStation.CityUrlRewrite(CityId);
                menu2.HRef = Tour.GetXianLuUrl(CityId);
                //menu3.HRef = Plane.PlaneDefaultUrl(CityId);
                menu4.HRef = Hotel.GetHotelBannerUrl(CityId);
                menu5.HRef = ScenicSpot.ScenicDefalutUrl(CityId);
                menu6.HRef = EyouSoft.Common.URLREWRITE.SupplierInfo.InfoDefaultUrlWrite(CityId);
                menu7.HRef = Infomation.InfoDefaultUrlWrite();
            }
        }