Ejemplo n.º 1
0
        private void BindRouteDays()
        {
            StringBuilder sb = new StringBuilder();

            if (!detailType)
            {
                sb.AppendFormat("<div class='detl_route'>{0}</div>", Function.AddTargetForMip(Function.UpdateStyleForMip(Function.UpdateImgTagForMip(replaceSite(route.DescriptionRoute)))));
            }
            else
            {
                ClassLibrary.BLL.RouteDetails          rdBll      = new ClassLibrary.BLL.RouteDetails();
                List <ClassLibrary.Model.RouteDetails> detailList = rdBll.GetModelList("routeid =" + route.ID + " order by dayorder");
                sb.AppendLine("<div class='route_days'>");
                foreach (ClassLibrary.Model.RouteDetails model in detailList)
                {
                    sb.AppendLine("<div class='days_item'>");
                    sb.AppendLine("<div class='route_date'>");
                    sb.AppendLine("<i class='icon_r'></i>");
                    sb.AppendLine("<div class='rdtitle'>");
                    sb.AppendFormat("<div class='date_no'>第{0}天</div>", model.DayOrder).AppendLine();
                    sb.AppendFormat("<div class='date_title'>{0}</div>", model.DayTitle).AppendLine();
                    sb.AppendLine("</div>");
                    sb.AppendLine("</div>");
                    sb.AppendFormat("<div class='route_dtl'>{0}</div>", Function.AddTargetForMip(Function.UpdateStyleForMip(Function.UpdateImgTagForMip(replaceSite(model.DayDetail))))).AppendLine();
                    sb.AppendLine("<div class='route_tips'>");
                    sb.AppendFormat("<div class='catering'><span>早餐:{0}</span><span>中餐:{1}</span><span>晚餐:{2}</span></div>",
                                    model.BreakFast ? "含" : "无", model.Lunch ? "含" : "无", model.Dinner ? "含" : "无");
                    sb.AppendFormat("<div class='hotel'>住宿:{0}</div>", model.Hotel == "" ? "无" : model.Hotel);
                    sb.AppendLine("</div>");
                    sb.AppendLine("</div>");
                }
                sb.AppendLine("</div>");
            }
            routedays = sb.ToString();
        }
Ejemplo n.º 2
0
        private void BindInfo()
        {
            route = bll.GetModel(routeID);
            if (route.routesClassID == "")
            {
                Response.StatusCode = 404;
                Response.End();
            }
            gList = rcBLL.GetModelList(String.Empty);
            if (route.ThemeID != "")
            {
                ClassLibrary.Model.RouteClass classmodel = gList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == Convert.ToInt32(route.ThemeID.Split(',')[0])); });
                themeName = "<div class='detl_zt'>" + classmodel.ClassName + "</div>";
            }
            routeClassId = route.LocationID;
            ClassLibrary.Model.RouteClass curClass = gList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == routeClassId); });

            if (curClass.ClassNamePY != comePY)
            {
                Response.StatusCode = 404;
                Response.End();
            }

            mipUrl = SysConfig.webSiteApp + "/" + comePY + "/" + routeID + ".html";

            //购买事件
            buyEventStr = mipUrl;

            dateType         = route.DateType;
            price            = Convert.ToInt32(route.Price);
            childPrice       = Convert.ToInt32(route.ChildPrice);
            routeFeature     = Function.AddTargetForMip(Function.UpdateStyleForMip(Function.UpdateImgTagForMip(replaceSite(route.RouteFeature))));
            descriptionPrice = Function.AddTargetForMip(Function.UpdateStyleForMip(Function.UpdateImgTagForMip(replaceSite(route.DescriptionPrice))));
            routeNotice      = Function.AddTargetForMip(Function.UpdateStyleForMip(Function.UpdateImgTagForMip(replaceSite(route.RouteNotice))));
            detailType       = route.DetailType;

            if (route.DatePrice != "")
            {
                string[] tmpDatePrice = route.DatePrice.Split('|');
                string   cDate        = DateTime.Now.ToShortDateString().ToString();
                for (int k = 0; k < tmpDatePrice.Length; k++)
                {
                    string tmpPrices = tmpDatePrice[k];
                    if (tmpPrices == "")
                    {
                        continue;
                    }
                    string[] tmpPrice = tmpPrices.Split(',');
                    TimeSpan ts       = DateTime.Parse(tmpPrice[0]) - DateTime.Now;
                    if (ts.TotalDays > 0)
                    {
                        datePrice += tmpPrices + "|";
                    }
                }
            }

            string[] imgs = route.Image.Split(',');
            image = SysConfig.webSite + SysConfig.UploadFilePathRoutesImg + imgs[0];
        }
Ejemplo n.º 3
0
 //新闻详情
 private void BindInfo()
 {
     news = newsBll.GetModel(newsID);
     if (news.Title == "")
     {
         Response.StatusCode = 404;
         Response.End();
         //Response.Redirect("/nopage/");
     }
     mipUrl       = SysConfig.webSiteApp + "/" + Enum.GetName(typeof(SysConfig.NewsClassPY), news.newsClassID) + "/" + newsID + ".html";
     articleTitle = news.Title;
     articleData  = news.Content.Replace(SysConfig.webSite, SysConfig.webSiteApp)
                    .Replace(SysConfig.webSiteApp + "/images/", SysConfig.webSite + "/images/")
                    .Replace("\"/images/", "\"" + SysConfig.webSite + "/images/");
     //.Replace("<img", "<mip-img layout='responsive'").Replace("<IMG", "<mip-img layout='responsive'")
     //.Replace("</img>", "</mip-img>").Replace("</IMG>", "</mip-img>");
     articleData = Function.UpdateImgTagForMip(articleData);
     articleData = Function.UpdateStyleForMip(articleData);
     articleData = Function.AddTargetForMip(articleData);
 }