Example #1
0
        private void ShowGuides(string keywords)
        {
            //  string idStr = "style=\"display:{0};\" id=\"{1}\"";
            EyouSoft.IBLL.ShopStructure.IHighShopTripGuide         bll  = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance();
            IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = null;

            #region  风土人情
            list = bll.GetWebList(6, Master.CompanyId, 1, keywords);
            if (list != null && list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    // ArryId1 += list[i].ID + ",";
                    string url = Utils.GenerateShopPageUrl2("/MuDiDi_" + list[i].ID, Master.CompanyId);
                    //if (i == 0)
                    //{
                    //    Guide1Html = string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220),string.Format(idStr,"block","show"+list[i].ID))+ string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "none", list[i].ID), 1,list[i].ID);

                    //}
                    //else
                    //{
                    //    Guide1Html += string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220), string.Format(idStr, "none", "show" + list[i].ID))+ string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "block", list[i].ID), 1, list[i].ID);
                    //}
                    if (i == 0)
                    {
                        Guide1Html = string.Format(topNo1, url, Utils.GetLineShopImgPath(list[i].ImagePath, 5), Utils.GetText(Utils.InputText(list[i].ContentText), 220));
                    }
                    else
                    {
                        Guide1Html += string.Format(Other, url, Utils.GetText(Utils.InputText(list[i].Title), 86), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"));
                    }
                }
            }
            else
            {
                Guide1Html = "<div style=\"text-align:center;margin-top:75px; margin-bottom:75px;\">暂无风土人情信息!</div>";
            }
            list = null;
            #endregion

            #region 温馨提醒
            list = bll.GetWebList(6, Master.CompanyId, 2, keywords);
            if (list != null && list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    // ArryId2 += list[i].ID + ",";
                    string url = Utils.GenerateShopPageUrl2("/MuDiDi_" + list[i].ID, Master.CompanyId);
                    //if (i == 0)
                    //{
                    //    Guide2Html= string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220), string.Format(idStr, "block", "show" + list[i].ID))+ string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "none", list[i].ID), 2, list[i].ID);
                    //}
                    //else
                    //{
                    //    Guide2Html += string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220), string.Format(idStr, "none", "show" + list[i].ID))+ string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "block", list[i].ID), 2, list[i].ID);
                    //}
                    if (i == 0)
                    {
                        Guide2Html = string.Format(topNo1, url, Utils.GetLineShopImgPath(list[i].ImagePath, 5), Utils.GetText(Utils.InputText(list[i].ContentText), 220));
                    }
                    else
                    {
                        Guide2Html += string.Format(Other, url, Utils.GetText(Utils.InputText(list[i].Title), 44), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"));
                    }
                }
            }
            else
            {
                Guide2Html = "<div style=\"text-align:center;margin-top:75px; margin-bottom:75px;\">暂无温馨提醒信息!</div>";
            }
            list = null;
            #endregion

            #region 综合介绍
            list = bll.GetWebList(6, Master.CompanyId, 3, keywords);
            if (list != null && list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    // ArryId3 += list[i].ID + ",";
                    string url = Utils.GenerateShopPageUrl2("/MuDiDi_" + list[i].ID, Master.CompanyId);
                    //if (i == 0)
                    //{
                    //    Guide3Html = string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220), string.Format(idStr, "block", "show" + list[i].ID))+ string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "none", list[i].ID), 3, list[i].ID);
                    //}
                    //else
                    //{
                    //    Guide3Html += string.Format(topNo1, url, GetImagePath(list[i].ImagePath), GetNewsTitle(list[i].ContentText, 220), string.Format(idStr, "none", "show" + list[i].ID))+string.Format(Other, url, GetNewsTitle(list[i].Title, 25), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format(idStr, "block", list[i].ID), 3, list[i].ID);
                    //}

                    if (i == 0)
                    {
                        Guide3Html = string.Format(topNo1, url, Utils.GetLineShopImgPath(list[i].ImagePath, 5), Utils.GetText(Utils.InputText(list[i].ContentText), 220));
                    }
                    else
                    {
                        Guide3Html += string.Format(Other, url, Utils.GetText(Utils.InputText(list[i].Title), 44), list[i].IssueTime.ToString("yyyy-MM-dd HH:mm"));
                    }
                }
            }
            else
            {
                Guide3Html = "<div style=\"text-align:center;margin-top:75px; margin-bottom:75px;\">暂无综合介绍信息!</div>";
            }
            list = null;
            #endregion
        }
Example #2
0
        //TypeID 1.风土人情介绍 2.温馨提醒 3.综合介绍
        #region 目的地指南
        private void InitTripGuidInfo()
        {
            EyouSoft.IBLL.ShopStructure.IHighShopTripGuide bll = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance();

            string tmpText = "<tr><td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"maintop5\" style=\"margin-bottom: 5px;\"><tr><td><a href=\"javascript:void(0)\"><img src=\"{0}\" width=\"97\" height=\"73\" border=\"0\" /></a></td><td style=\"padding-left: 3px;\" align=\"left\"><a href=\"javascript:void(0)\" class=\"huizi\">{1}</a></td></tr></table></td></tr>";

            #region 风土人情
            IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> TripGuideList = bll.GetWebList(3, CompanyID, 1, "");
            if (TripGuideList != null && TripGuideList.Count > 0)
            {
                for (int i = 0; i < TripGuideList.Count; i++)
                {
                    if (i == 0)
                    {
                        strTripGuide1 += string.Format(tmpText, Utils.GetLineShopImgPath(TripGuideList[i].ImagePath, 5), Utils.GetText(Utils.InputText(TripGuideList[i].ContentText), 50));
                    }
                    else
                    {
                        strTripGuide1 += string.Format("<tr><td>•&nbsp;&nbsp;<a href=\"javascript:void(0)\" class=\"huizi\">{0}</a></td></tr>", Utils.GetText(TripGuideList[i].Title, 25));
                    }
                }
            }
            else
            {
                strTripGuide1 = "<tr><td><div style=\"text-align:center;margin-top:50px; margin-bottom:50px;\">暂无风土人情信息!</div></td></tr>";
            }
            TripGuideList = null;
            #endregion

            #region 温馨提醒
            TripGuideList = bll.GetWebList(3, CompanyID, 2, "");
            if (TripGuideList != null && TripGuideList.Count > 0)
            {
                for (int i = 0; i < TripGuideList.Count; i++)
                {
                    if (i == 0)
                    {
                        strTripGuide2 += string.Format(tmpText, Utils.GetLineShopImgPath(TripGuideList[i].ImagePath, 5), Utils.GetText(Utils.InputText(TripGuideList[i].ContentText), 50));
                    }
                    else
                    {
                        strTripGuide2 += string.Format("<tr><td>•&nbsp;&nbsp;<a href=\"javascript:void(0)\" class=\"huizi\">{0}</a></td></tr>", Utils.GetText(TripGuideList[i].Title, 25));
                    }
                }
            }
            else
            {
                strTripGuide2 = "<tr><td><div style=\"text-align:center;  margin-top:50px; margin-bottom:50px;\">暂无温馨提醒信息!</div></td></tr>";
            }

            TripGuideList = null;
            #endregion

            #region 综合介绍
            TripGuideList = bll.GetWebList(3, CompanyID, 3, "");
            if (TripGuideList != null && TripGuideList.Count > 0)
            {
                this.crptTripGuide3.DataSource = TripGuideList;
                this.crptTripGuide3.DataBind();
            }
            else
            {
                div_GuideNoMessage.Visible = true;
            }
            #endregion

            TripGuideList = null;
            bll           = null;
        }