Beispiel #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string cid = Utils.GetString(context.Request.QueryString["cid"], "");

            EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType type = (EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType)Utils.GetInt(context.Request.QueryString["bookType"]);

            if (string.IsNullOrEmpty(cid))
            {
                return;
            }

            string s = string.Empty;

            if (type == EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区住宿)
            {
                s = this.GetGuideTypeStay(cid);
            }
            else
            {
                s = this.GetGuideType(cid, type);
            }

            context.Response.Write(s);
        }
Beispiel #2
0
        /// <summary>
        /// 初始化旅游资源
        /// </summary>
        /// <param name="rpt">Repeater</param>
        /// <param name="type">类型</param>
        /// <param name="expression">指定返回行数的数值表达式</param>
        private void InitTripGuide(Repeater rpt, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType type, int expression)
        {
            var items = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(expression, this.CompanyId, (int)type, null);

            rpt.DataSource = items;
            rpt.DataBind();
        }
Beispiel #3
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] tripguidetype = { };
            switch (type)
            {
            case SeniorOnlineShop.master.SPOTT1TAB.景区动态:
                tripguidetype = new EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] { EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区动态 };
                break;

            case SeniorOnlineShop.master.SPOTT1TAB.景区攻略:
                if (!string.IsNullOrEmpty(Request.QueryString["gl"]) && Request.QueryString["gl"] != "undefined")
                {
                    tripguidetype = new EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] { (EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType)Enum.Parse(typeof(EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType), Request.QueryString["gl"]) };
                }
                else
                {
                    tripguidetype = new EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] { EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区攻略, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区购物, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区交通, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区美食, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区住宿 };
                }
                break;

            case SeniorOnlineShop.master.SPOTT1TAB.景区导游:
                tripguidetype = new EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] { EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区导游 };
                break;

            default:
                TabName       = "景区线路";
                tripguidetype = new EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType[] { EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区线路 };
                break;
            }
            IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyId, StrTitle, tripguidetype);

            if (list != null && list.Count > 0)
            {
                this.rptData.DataSource = list;
                this.rptData.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = "ScenicInfoList.aspx?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            else
            {
                NoData.Visible = true;
            }
            list = null;
        }
Beispiel #4
0
        /// <summary>
        /// 获取攻略、美食、交通、购物内容
        /// </summary>
        /// <param name="cid"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private string GetGuideType(string cid, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType type)
        {
            StringBuilder l     = new StringBuilder();
            StringBuilder r     = new StringBuilder();
            var           items = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(10, cid, (int)type, null);

            l.Append("<ul class=\"sidebar02_2Content_L\">");
            r.Append("<ul class=\"sidebar02_2Content_R\">");

            if (items != null && items.Count > 0)
            {
                int i = 0;

                foreach (var item in items)
                {
                    if (i < 5)
                    {
                        l.AppendFormat("<li><a href=\"{0}\" title=\"{4}\"><font class=\"C_blue\">[{1}]</font> {2}</a> <em>{3}</em></li>", Utils.GenerateShopPageUrl2("/scenicinfodetail_" + item.ID + "_5", cid)
                                       , this.GetGuideTypeName(type)
                                       , Utils.GetText2(item.Title, 13, true)
                                       , item.IssueTime.ToString("yyyy-MM-dd")
                                       , item.Title);
                    }
                    else
                    {
                        r.AppendFormat("<li><a href=\"{0}\" title=\"{4}\"><font class=\"C_blue\">[{1}]</font> {2}</a> <em>{3}</em></li>", Utils.GenerateShopPageUrl2("/scenicinfodetail_" + item.ID + "_5", cid)
                                       , this.GetGuideTypeName(type)
                                       , Utils.GetText2(item.Title, 13, true)
                                       , item.IssueTime.ToString("yyyy-MM-dd")
                                       , item.Title);
                    }

                    i++;
                }
            }
            else
            {
                return(this.GetEmptyResponse("暂无相关内容"));
            }


            l.Append("</ul>");
            r.Append("</ul>");

            return(l.ToString() + r.ToString() + "<div class=\"clearboth\"></div>");
        }
Beispiel #5
0
        /// <summary>
        /// 获取名称
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        private string GetGuideTypeName(EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType type)
        {
            string s = string.Empty;

            switch (type)
            {
            case EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区攻略: s = "攻略"; break;

            case EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区购物: s = "购物"; break;

            case EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区交通: s = "交通"; break;

            case EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区美食: s = "美食"; break;

            case EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区住宿: s = "住宿"; break;
            }

            return(s);
        }
Beispiel #6
0
        private void ShowGuides(int TypeId)
        {
            EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.风土人情;
            switch (TypeId)
            {
            case 1:
                tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.风土人情;
                break;

            case 2:
                tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.温馨提醒;
                break;

            case 3:
                tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.综合介绍;
                break;
            }
            guidType     = tripguidetype.ToString();
            CurrencyPage = StringValidate.GetIntValue(Request.QueryString["Page"], 1);
            IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetList(intPageSize, CurrencyPage, ref intRecordCount, Master.CompanyId, "", tripguidetype);

            if (list != null && list.Count > 0)
            {
                this.rptGuides.DataSource = list;
                this.rptGuides.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            else
            {
                GuideHtml = "<div style=\"text-align:center;margin-top:75px; margin-bottom:75px;\">暂无风土人情信息!</div>";
            }
            list = null;
        }
Beispiel #7
0
        /// <summary>
        /// 初始化出游指南
        /// </summary>
        /// <param name="ltr">Literal</param>
        /// <param name="type">出游指南类型</param>
        /// <param name="expression">指定返回行数的数值表达式</param>
        private void InitCYZH(Literal ltr, EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType type, int expression)
        {
            var items = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(3, this.CompanyId, (int)type, null);

            if (items == null || items.Count < 1)
            {
                return;
            }
            StringBuilder html = new StringBuilder();

            #region 综合介绍
            if (type == EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.综合介绍)
            {
                foreach (var item in items)
                {
                    html.AppendFormat(@"<tr><td height=""19""><a href=""{0}"">·{1}</a></td></tr>", "javascript:void(0)"
                                      , Utils.GetText(item.Title, 14, true));
                }
            }
            #endregion

            #region 风土人情 温馨提醒 旅游资源推荐
            if (type != EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.综合介绍)
            {
                string s = @"<tr>
                                    <td height=""90"">
                                        <table width=""202"" border=""0"" align=""right"" cellpadding=""0"" cellspacing=""0"" class=""maintop5"" style=""margin-bottom: 5px;"">
                                            <tr>
                                                <td width=""45%"" rowspan=""2"">
                                                    <a href=""{0}"">
                                                        <img src=""{1}"" width=""79"" height=""67"" border=""0"" class=""borderhui"" /></a>
                                                </td>
                                                <td width=""55%"" height=""24"" style=""padding-left: 3px;"">
                                                    <a href=""{2}"" class=""zhinanbt"">{3}</a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign=""top"" style=""padding-left: 3px; line-height: 16px;"">
                                                    {4}
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>";
                html.AppendFormat(s, "javascript:void(0)"
                                  , Utils.GetLineShopImgPath(items[0].ImagePath, 4)
                                  , "javascript:void(0)"
                                  , Utils.GetText(items[0].Title, 8)
                                  , Utils.GetText(items[0].ContentText, 26, true));

                html.Append(@"<tr><td><table width=""205"" border=""0"" align=""right"" cellpadding=""0"" cellspacing=""0"" bgcolor=""#F4F4F4"">");

                for (int i = 1; i < items.Count; i++)
                {
                    html.AppendFormat(@"<tr><td height=""20""><a href=""{0}"">·{1}</a></td></tr>", "javascript:void(0)"
                                      , Utils.GetText(items[i].Title, 14, true));
                }

                html.Append("</table></td></tr>");
            }
            #endregion

            ltr.Text = html.ToString();
        }