Пример #1
0
        private void BindOrderDetailData()
        {
            DataTable myTable = orderDetailBLL.GetData("orderNumber ='" + orderNumber + "'");

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.Append("<tr>");

                ClassLibrary.Model.Routes route = routeBLL.GetModel(Convert.ToInt32(dr["routeID"]));
                string tmpClassPy = routeClassBll.GetModel(Convert.ToInt32(route.LocationID)).ClassNamePY;

                sb.AppendFormat("<td><a href='{3}/{2}/{0}.html' target='_blank'>{1}</a></td>", dr["routeID"].ToString(), dr["RouteName"].ToString(), tmpClassPy, SysConfig.webSite);
                string[] temp = dr["Number"].ToString().Split(',');
                sb.AppendFormat("<td>{0}</td>", temp[0] + "大" + temp[1] + "小");
                sb.AppendFormat("<td>{0}</td>", (Convert.ToInt32(dr["RoutePrice"]) == 0 ? "价格电讯" : "&yen;" + Convert.ToInt32(dr["RoutePrice"]) + "元"));
                sb.AppendFormat("<td>{0}</td>", dr["RouteTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["StartTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("</tr>");
            }

            dataOrderDetailList = sb.ToString();
        }
Пример #2
0
        private void BindOrderDetailData()
        {
            DataTable myTable = orderDetailBLL.GetData(" orderNumber ='" + orderNumber + "'");

            myTable = pg.pagination(myTable, 20, "");

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.AppendFormat("<tr id='tr_{0}'>", dr["ID"].ToString());

                ClassLibrary.Model.Routes route = routeBLL.GetModel(Convert.ToInt32(dr["routeID"]));
                string tmpClassPy = routeClassBll.GetModel(Convert.ToInt32(route.LocationID)).ClassNamePY;

                sb.AppendFormat("<td><a href='/{2}/{1}.html' target='_blank'>{0}</a></td>", dr["RouteName"].ToString(), dr["routeID"].ToString(), tmpClassPy);
                string[] temp = dr["Number"].ToString().Split(',');
                sb.AppendFormat("<td>{0}</td>", temp[0] + "大" + temp[1] + "小");
                //sb.AppendFormat("<td><input id='price_{0}' type='text' size='10' value='{1}' /><input type='button' class='button' value='修改' onclick='UpdateOrderDetailPrice({0},{2})' /></td>", dr["ID"].ToString(), Convert.ToInt32(dr["RoutePrice"]), dr["ordernumber"].ToString());
                sb.AppendFormat("<td>&yen;{0}元</td>", Convert.ToInt32(dr["RoutePrice"]));
                sb.AppendFormat("<td>{0}</td>", dr["RouteTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["StartTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("</tr>");
            }

            dataOrderDetailList = sb.ToString();
        }
Пример #3
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];
        }
Пример #4
0
        private void RouteCopy(HttpContext context)
        {
            string id = context.Request.QueryString["id"];

            ClassLibrary.BLL.Routes   routeBll   = new ClassLibrary.BLL.Routes();
            ClassLibrary.Model.Routes routemodel = routeBll.GetModel(int.Parse(id));
            if (routemodel == null || routemodel.Title == "")
            {
                Print(context, "error");
                return;
            }
            string[] oldImgs      = routemodel.Image.Split(',');
            string   fileFullPath = context.Server.MapPath(SysConfig.UploadFilePathRoutesImg);
            string   newImgs      = "";

            for (int i = 0; i < oldImgs.Length; i++)
            {
                string ext      = Path.GetExtension(oldImgs[i]);
                string fileName = Function.GetRandomTime() + ext;
                try
                {
                    File.Copy(fileFullPath + oldImgs[i], fileFullPath + fileName);
                } catch (Exception e) {
                }
                newImgs += fileName + ",";
            }
            if (!string.IsNullOrEmpty(newImgs))
            {
                newImgs = newImgs.Substring(0, newImgs.Length - 1);
            }
            routemodel.Image       = newImgs;
            routemodel.Display     = false;
            routemodel.ViewCount   = 0;
            routemodel.Order       = 999;
            routemodel.FirstTime   = DateTime.Now.ToString("yyyy-MM-dd");
            routemodel.CreatedTime = DateTime.Now;

            if (routeBll.Add(routemodel) > 0)
            {
                if (routemodel.DetailType)
                {
                    int routeId = routeBll.GetLastId();
                    ClassLibrary.BLL.RouteDetails          rdBll      = new ClassLibrary.BLL.RouteDetails();
                    List <ClassLibrary.Model.RouteDetails> detailList = rdBll.GetModelList("routeId = " + routemodel.ID);
                    foreach (ClassLibrary.Model.RouteDetails model in detailList)
                    {
                        model.RouteID = routeId;
                        rdBll.Add(model);
                    }
                    Print(context, "success");
                }
            }
            else
            {
                Print(context, "error");
            }
        }
Пример #5
0
        private void BindList()
        {
            DataTable myTable = comBLL.GetData("UserName='******'");

            myTable  = pg.pagination(myTable, 10, "");
            pageInfo = pg.pageNumList;

            StringBuilder sb = new StringBuilder();
            List <ClassLibrary.Model.RouteClass> rcList = new List <ClassLibrary.Model.RouteClass>();

            if (myTable.Rows.Count != 0)
            {
                ClassLibrary.BLL.RouteClass rcBLL = new ClassLibrary.BLL.RouteClass();
                rcList = rcBLL.GetModelList(string.Empty);
            }
            int rowIndex = 0;

            foreach (DataRow dr in myTable.Rows)
            {
                sb.Append("<tr'>");
                ClassLibrary.Model.Routes route = routeBLL.GetModel(Convert.ToInt32(dr["routeID"]));

                string tmpClassPy = rcList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == route.LocationID); }).ClassNamePY;

                sb.AppendFormat("<td align='center'>{0}</td>", ++rowIndex);
                sb.AppendFormat("<td align='center'><a href='{3}/{2}/{0}.html' target='_blank'>{1}</a></td>", dr["routeID"].ToString(), route.Title, tmpClassPy, SysConfig.webSite);
                sb.AppendFormat("<td align='center'>{0}</td>", GetGradeImg(dr["Grade"].ToString()));
                sb.AppendFormat("<td align='center'>{0}</td>", dr["Content"].ToString());
                sb.AppendFormat("<td align='center'>{0}</td>", Convert.ToBoolean(dr["Checked"]) ? "<span class='red'>已审核</span>" : "审核中");
                sb.AppendFormat("<td align='center'>{0}</td>", Convert.ToDateTime(dr["CreatedTime"]).ToString("yyyy-MM-dd"));

                sb.Append("</tr>");
            }

            if (sb.Length == 0)
            {
                sb.Append("<tr><td colspan='6'>暂无评价!</td></tr>");
            }

            dataList = sb.ToString();
        }
Пример #6
0
        private void BindData(string sql)
        {
            DataTable myTable = routeCommentBLL.GetData(sql);

            myTable  = pg.pagination(myTable, 20, "");
            pageInfo = pg.pageNumList;

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.AppendFormat("<tr id='tr_{0}'>", dr["ID"].ToString());
                ClassLibrary.Model.Routes rmodel = routeBLL.GetModel(Convert.ToInt32(dr["routeId"]));
                string tmpClassPy = rcList.Find(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ID == rmodel.LocationID); }).ClassNamePY;

                sb.AppendFormat("<td><a href='/{2}/{1}.html' target='_blank'>{0}</a></td>", Function.Clip(GetRoute(Convert.ToInt32(dr["routeID"])), 10, true), Convert.ToInt32(dr["routeID"]), tmpClassPy);
                sb.AppendFormat("<td>{0}</td>", Convert.ToInt16(dr["Grade"].ToString()));
                sb.AppendFormat("<td>{0}</td>", dr["UserName"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Nickname"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Email"].ToString());
                sb.AppendFormat("<td>{0}</td>", Convert.ToBoolean(dr["Checked"]) ? "<span class='green'>是</span>" : "<span class='red'>否</span>");
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("<td>");
                if (!Convert.ToBoolean(dr["Checked"]))
                {
                    sb.AppendFormat("<a href='RouteCommentList.aspx?ID={0}'>审核</a> ", dr["ID"].ToString());
                }
                else
                {
                    sb.Append("   ");
                }
                sb.AppendFormat("<a href='RouteCommentDetail.aspx?id={0}'>查看</a> ", dr["ID"].ToString());
                sb.AppendFormat("<a href='javascript:void(0)' onclick='routeCommentDelete({0})'>删除</a>", dr["ID"].ToString());
                sb.Append("</td>");

                sb.Append("</tr>");
            }
            dataRouteCommentList = sb.ToString();
        }
Пример #7
0
 private string GetRoute(int routeId)
 {
     return(routeBLL.GetModel(routeId).Title);
 }
Пример #8
0
        //网站信息
        private void GetWebInfo()
        {
            webMeta.Title       = "重庆青年旅行社_重庆旅行社_重庆中国青年旅行社_重庆中青旅行社";
            webMeta.Description = "重庆中国青年旅行社(www.qu17.com)称重庆青旅,旅游热线:400-017-5761.共青团市委直属重庆旅行社,中青旅集团成员单位,优质服务示范重庆旅行社,重庆青年旅行社具有国家旅游局颁证的出境旅游资质的国际旅行社,旅游品质最高的重庆旅行社,重庆十大金牌旅行社,出入境游、国内游、重庆周边游、长江三峡游为主导。";
            webMeta.Keyword     = "重庆旅行社,重庆青年旅行社,重庆中青旅,重庆中国青年旅行社,重庆旅游网";
            string url      = HttpContext.Current.Request.CurrentExecutionFilePath.ToLower();
            string tmpTitle = "_重庆中国青年旅行社";

            if (url.IndexOf("approutesearch.aspx") > -1)
            {
                webMeta.Title       = "旅游线路搜索结果" + tmpTitle;
                webMeta.Keyword     = "";
                webMeta.Description = "";
            }
            else if (url.IndexOf("approutelist.aspx") > -1)
            {
                string ping = Function.GetQueryString("py");
                ClassLibrary.BLL.RouteClass          routeClassBll = new ClassLibrary.BLL.RouteClass();
                List <ClassLibrary.Model.RouteClass> rcList        = routeClassBll.GetModelList("classNamePy='" + ping + "'");
                if (rcList.Count > 0)
                {
                    ClassLibrary.Model.RouteClass rc = rcList[0];
                    if (rc.ClassLevel == 4)
                    {
                        webMeta.Title       = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName);
                        webMeta.Keyword     = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName);
                        webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName);
                    }
                    else if (rc.ClassLevel == 3)
                    {
                        if (rc.ID == (int)SysConfig.RouteClass.重庆)
                        {
                            webMeta.Title       = "重庆周边游_重庆周边旅游线路报价_重庆中国青年旅行社";
                            webMeta.Keyword     = "重庆周边旅游,重庆周边旅游线路,重庆周边旅游行程,重庆周边旅游报价";
                            webMeta.Description = "重庆周边旅游线路、周边旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761.";
                        }
                        else if (rc.ParentID == (int)SysConfig.RouteClass.豪华船)
                        {
                            webMeta.Title       = string.Format("重庆三峡{0}旅游_{0}三峡旅游报价", rc.ClassName);
                            webMeta.Keyword     = string.Format("重庆三峡{0}旅游,三峡{0}旅游报价,重庆三峡旅游", rc.ClassName);
                            webMeta.Description = string.Format("重庆青年旅行社提供重庆三峡{0}旅游线路报价,重庆三峡{0}旅游费用,长江三峡豪华游船旅游价格,三峡{0}旅游要多少钱,详询中青旅电话400-017-5761.", rc.ClassName);
                        }
                        else
                        {
                            webMeta.Title       = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName);
                            webMeta.Keyword     = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName);
                            webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName);
                        }
                    }
                    else if (rc.ClassLevel == 2)
                    {
                        if (rc.ParentID == (int)SysConfig.RouteClass.峡旅游)
                        {
                            if (rc.ID == (int)SysConfig.RouteClass.豪华船)
                            {
                                webMeta.Title       = "三峡豪华游船_豪华游船航期表_重庆三峡豪华游轮_重庆中国青年旅行社";
                                webMeta.Keyword     = "重庆三峡豪华游船,长江三峡游船,豪华游船航期表,三峡涉外豪华游轮";
                                webMeta.Description = "重庆中国青年旅行社提供各系列长江三峡豪华游轮,以及三峡涉外豪华游轮旅游品质服务,重庆三峡涉外豪华游轮预定,重庆中青旅热线:400-017-5761";
                            }
                            else
                            {
                                webMeta.Title       = "三峡国内游船_重庆三峡国内船_重庆中国青年旅行社";
                                webMeta.Keyword     = "重庆三峡国内游船,长江三峡游船,三峡国内游轮";
                                webMeta.Description = "重庆中国青年旅行社提供长江三峡国内游船,长江三峡旅游品质服务,重庆三峡国内游船预定,重庆中青旅热线:400-017-5761";
                            }
                        }
                        else
                        {
                            webMeta.Title       = string.Format("{0}旅游线路行程_{0}跟团游报价_重庆中国青年旅行社", rc.ClassName);
                            webMeta.Keyword     = string.Format("{0}旅游,{0}跟团游,{0}旅游行程报价,{0}旅游线路,重庆中青旅{0}旅游团", rc.ClassName);
                            webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆到{0}旅游最新报价,{0}跟团游最具性价比的旅行社,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rc.ClassName);
                        }
                    }
                    else
                    {
                        if (rc.ID == (int)SysConfig.RouteClass.国内旅游)
                        {
                            webMeta.Title       = "国内旅游线路行程_重庆出发国内旅游线路_重庆中国青年旅行社";
                            webMeta.Keyword     = "国内游线路,国内游行程,国内游报价,国内游跟团,重庆出发国内游";
                            webMeta.Description = "重庆出发国内旅游线路、国内旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761.";
                        }
                        else if (rc.ID == (int)SysConfig.RouteClass.出境旅游)
                        {
                            webMeta.Title       = "出境旅游线路行程_重庆出发出境旅游线路_重庆中国青年旅行社";
                            webMeta.Keyword     = "出境游线路,出境游行程,出境游报价,出境游跟团,重庆出发出境游";
                            webMeta.Description = "重庆出发出境旅游线路、出境旅游行程报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761.";
                        }
                        else if (rc.ID == (int)SysConfig.RouteClass.峡旅游)
                        {
                            webMeta.Title       = "重庆长江三峡旅游_重庆三峡旅游行程景点_重庆中国青年旅行社";
                            webMeta.Keyword     = "重庆三峡旅游,长江三峡旅游线路,三峡旅游报价,三峡游景点,三峡游船预定";
                            webMeta.Description = "重庆三峡旅游行程、三峡游线路、长江三峡旅游报价由重庆中国青年旅行社提供设计,重庆青旅热线400-017-5761.";
                        }
                    }
                }
                else
                {
                    ClassLibrary.BLL.RouteType          rtBll  = new ClassLibrary.BLL.RouteType();
                    List <ClassLibrary.Model.RouteType> rtList = rtBll.GetModelList("classNamePy='" + ping + "'");
                    if (rtList.Count > 0)
                    {
                        ClassLibrary.Model.RouteType rtc = rtList[0];
                        webMeta.Title       = string.Format("{0}旅游线路_重庆出发{0}旅游报价", rtc.ClassName.Replace("游", "")) + tmpTitle;
                        webMeta.Keyword     = string.Format("{0}旅游,{0}旅游报价,{0}旅游线路", rtc.ClassName.Replace("游", ""));
                        webMeta.Description = string.Format("重庆中国青年旅行社设计{0}旅游线路行程,重庆出发{0}旅游最新报价,{0}跟团游价格,重庆出发{0}旅游选择青旅品质服务享受旅途,重庆青旅热线400-017-5761.", rtc.ClassName.Replace("游", ""));
                    }
                }
            }
            else if (url.IndexOf("approutedetail.aspx") > -1)
            {
                int id = Convert.ToInt32(Function.GetQueryString("id"));
                ClassLibrary.BLL.Routes   routeBll = new ClassLibrary.BLL.Routes();
                ClassLibrary.Model.Routes rModel   = routeBll.GetModel(id);
                webMeta.Title = rModel.Title + tmpTitle;
                if (rModel.SeoTitle != null && rModel.SeoTitle.Trim() != "")
                {
                    webMeta.Title = rModel.SeoTitle;
                }
                webMeta.Keyword = rModel.SeoKeywords;
                if (webMeta.Keyword == "")
                {
                    webMeta.Keyword = rModel.Title;
                }

                webMeta.Description = rModel.SeoDescription;
                if (webMeta.Description == "")
                {
                    webMeta.Description = Function.Clip(Function.ClearHtml(rModel.RouteFeature + rModel.DescriptionRoute).Replace(" ", "").Replace("	", ""), 80, false);
                }
            }
            else if (url.IndexOf("appabout.aspx") > -1)
            {
                webMeta.Title       = "重庆中国青年旅行社简介";
                webMeta.Keyword     = "";
                webMeta.Description = "";
            }
            else if (url.IndexOf("apparticlelist.aspx") > -1)
            {
                string strId = Function.GetQueryString("id");
                if (strId != "")
                {
                    int classid = Convert.ToInt32(strId);
                    if (classid == (int)SysConfig.NewsClass.旅游资讯)
                    {
                        webMeta.Title       = "重庆旅行社旅游资讯_最新旅游资讯指南" + tmpTitle;
                        webMeta.Description = "重庆旅游资讯,重庆旅游指南,旅游最新资讯,重庆旅行社资讯";
                        webMeta.Keyword     = "重庆青年旅行社旅游资讯大致包含旅行社资讯,旅游相关实时新闻,旅游行业最新资讯消息,重庆以及周边旅游指南,重庆中青旅一如既往的高品质服务游客.";
                    }
                    else if (classid == (int)SysConfig.NewsClass.旅游攻略)
                    {
                        webMeta.Title       = "重庆旅行社旅游攻略_最新旅游攻略" + tmpTitle;
                        webMeta.Description = "重庆旅游攻略,重庆旅游指南,旅游最新攻略";
                        webMeta.Keyword     = "重庆青年旅行社旅游攻略大致包含旅游的吃、住、行、游、购、娱方面的介绍以及方式方法,重庆青旅更新的旅游攻略内容板块将更加方便您的出游.";
                    }
                }
                else
                {
                    webMeta.Title       = "旅游攻略网_旅游景点网_最新旅游指南_重庆中国青年旅行社";
                    webMeta.Keyword     = "旅游攻略网,旅游景点网,最新旅游指南";
                    webMeta.Description = "重庆中国青年旅行社旅游攻略网旅游景点网提供各种旅游攻略,旅游景点排行,最新旅游资讯,旅游景点推荐,详情请咨询中青旅400-017-5761";
                }
            }
            else if (url.IndexOf("apparticledetail.aspx") > -1)
            {
                int id = Convert.ToInt32(Function.GetQueryString("id"));
                ClassLibrary.BLL.News   newsBll = new ClassLibrary.BLL.News();
                ClassLibrary.Model.News rModel  = newsBll.GetModel(id);
                webMeta.Title   = rModel.Title + tmpTitle;
                webMeta.Keyword = rModel.Keywords;
                if (webMeta.Keyword == "")
                {
                    webMeta.Keyword = rModel.Title;
                }

                webMeta.Description = rModel.Description;
                if (webMeta.Description == "")
                {
                    webMeta.Description = Function.Clip(Function.ClearHtml(rModel.Description).Replace(" ", "").Replace("	", ""), 80, false);
                }
            }
            else if (url.IndexOf("appnav.aspx") > -1)
            {
                webMeta.Title       = "旅游目的地导航" + tmpTitle;
                webMeta.Keyword     = "";
                webMeta.Description = "";
            }
            else if (url.IndexOf("apporder.aspx") > -1)
            {
                webMeta.Title       = "订单提交信息" + tmpTitle;
                webMeta.Keyword     = "";
                webMeta.Description = "";
            }
            else if (url.IndexOf("appshopcart.aspx") > -1)
            {
                webMeta.Title       = "旅游订单信息" + tmpTitle;
                webMeta.Keyword     = "";
                webMeta.Description = "";
            }
            else if (url.IndexOf("appsaleslist.aspx") > -1)
            {
                webMeta.Title       = "特价旅游专区_最划算的旅游" + tmpTitle;
                webMeta.Keyword     = "青旅特价旅游,特价旅游旅行社,重庆旅行社特价团";
                webMeta.Description = "重庆中国青年旅行社特价旅游专区产品为限时限量旅游线路,由于游客临时退位置或者旅行社原因,导致紧急处理的旅游产品,在整个旅游行业可以说是性价比最高,超级划算的特价旅游产品.";
            }
        }
Пример #9
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.RouteType classmodel = rtBll.GetModel(Convert.ToInt32(route.ThemeID.Split(',')[0]));
                if (classmodel != null)
                {
                    themeName = string.Format("<div class='info_zhuti'><a href='{0}/{1}/' target='_blank'>{2}</a></div>", SysConfig.webSite, classmodel.classNamePY, classmodel.ClassName);
                }
            }
            routeClassId = route.LocationID;
            traffic      = route.TrafficModel;
            if (traffic.IndexOf("自理") > -1)
            {
                traffic = traffic.Replace("自理去", "").Replace("自理回", "").Trim();
            }

            ClassLibrary.Model.RouteClass curClass = gList.Find(delegate(ClassLibrary.Model.RouteClass rc) { return(rc.ID == routeClassId); });

            pingYin = curClass.ClassNamePY;
            if (curClass.ClassLevel == 4)
            {
                parentId    = curClass.ParentID;
                displayName = curClass.ClassName;
                displayPy   = curClass.ClassNamePY;
            }
            else if (curClass.ID == (int)SysConfig.RouteClass.峡旅游 || curClass.ParentID == (int)SysConfig.RouteClass.峡旅游 || curClass.ParentID == (int)SysConfig.RouteClass.豪华船)
            {
                parentId    = (int)SysConfig.RouteClass.峡旅游;
                displayName = "三峡";
                displayPy   = "sanxia";
            }
            else
            {
                parentId    = curClass.ID;
                displayName = curClass.ClassName;
                displayPy   = curClass.ClassNamePY;
            }

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

            //购买事件
            buyEventStr = string.Format("buy2('{0}','{1}','{2}','{3}')",
                                        route.ID,
                                        Function.Clip(route.Title, 18, true),
                                        route.RouteTime,
                                        pingYin);

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

            if (price == 0)
            {
                strPrice = "电询";
            }
            else
            {
                strPrice = "&yen;<em>" + price + "</em>起";
            }

            datePrice = "";

            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 + "|";
                    }
                }
            }

            StringBuilder sb = new StringBuilder();

            string[] imgs = route.Image.Split(',');
            if (imgs.Length <= 3)
            {
                inactive = "inactive";
            }
            int imgIndex = 0;

            foreach (string img in imgs)
            {
                imgIndex++;
                if (imgIndex == 1)
                {
                    firstImg = ClassLibrary.Common.SysConfig.UploadFilePathRoutesImg + img;
                }
                sb.AppendFormat("<li class='{1}'><i></i><img src='{0}' alt='' width='100' height='63' /></li>", ClassLibrary.Common.SysConfig.UploadFilePathRoutesImg + img, imgIndex == 1 ? "on" : "");
            }
            smallImageList = sb.ToString();
        }
Пример #10
0
        private void BindData()
        {
            myModel = routeBLL.GetModel(routeId);

            if (myModel != null)
            {
                themeID          = myModel.ThemeID;
                routeClassId     = Int32.Parse(myModel.routesClassID.Split(',')[1]);
                routeParentId    = Int32.Parse(myModel.routesClassID.Split(',')[0]);
                trafficModel1    = myModel.TrafficModel.Substring(0, 2);
                trafficModel2    = myModel.TrafficModel.Substring(4, 2);
                title            = myModel.Title;
                price            = Convert.ToInt32(myModel.Price);
                routeOrder       = myModel.Order;
                startPosition    = myModel.StartPosition;
                routeTime        = myModel.RouteTime;
                descriptionRoute = myModel.DescriptionRoute;
                descriptionPrice = myModel.DescriptionPrice;
                recommendHot     = myModel.RecommendHot;
                destination      = myModel.Destination;
                supplierName     = myModel.Supplier;
                supplierTel      = myModel.SupplierTel;
                seoTitle         = myModel.SeoTitle;
                bright           = myModel.Bright;
                boatName         = myModel.BoatName;
                image            = myModel.Image;
                appImage         = myModel.AppImg;

                string[]      images = myModel.Image.Split(',');
                StringBuilder sbri   = new StringBuilder();
                for (int i = 0; i < images.Length; i++)
                {
                    sbri.AppendLine("<div>");
                    sbri.AppendLine("<input type='file' name='Image' onchange='CheckImgFile(this)' />");
                    sbri.AppendFormat("<img src='{0}' width='70' height='50' />", ClassLibrary.Common.SysConfig.UploadFilePathRoutesImg + images[i]);
                    sbri.AppendLine("</div>");
                }
                routeImage     = sbri.ToString();
                seoKeywords    = myModel.SeoKeywords;
                seoDescription = myModel.SeoDescription;
                viewCount      = myModel.ViewCount;
                detailType     = myModel.DetailType;
                dateType       = myModel.DateType;
                datePrice      = "";

                if (myModel.DatePrice != "")
                {
                    string[] tmpDatePrice = myModel.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 + "|";
                        }
                    }
                }
                childPrice          = Convert.ToInt32(myModel.ChildPrice);
                advanceDays         = myModel.AdvanceDays;
                routeFeature        = myModel.RouteFeature;
                routeNotice         = myModel.RouteNotice;
                isdisplay           = myModel.Display;
                routeParentClassIds = myModel.routesPrentClassID;
                if (detailType)
                {
                    routeList = routeDetailBll.GetModelList("RouteID = '" + routeId + "' order by dayOrder");
                    StringBuilder sb = new StringBuilder();
                    for (int i = 1; i <= routeList.Count; i++)
                    {
                        ClassLibrary.Model.RouteDetails detail = routeList[i - 1];
                        sb.AppendFormat("<div class='fieldset xingcheng-by-day' id='day_{0}'>", i);
                        //sb.AppendFormat("<dl><dd><b>第{0}天:<input class='text' id='route_{0}_0' name='route_{0}_0'  style='width:300px;' value='{1}'/></b>{2}</dd></dl>", i, detail.DayTitle, (i != 1) ? ("&nbsp;<a id='remove_day" + i + "' href='#' onclick='xingcheng_remove_day();return false;' style='display:" + ((i == routeList.Count) ? "" : "none") + "'>删除第" + i + "天行程</a>") : "");

                        sb.AppendFormat("<dl><dd><b>第{0}天:<input type='radio' name='rdo_title_{0}' value='False' {1} onclick='checkTitle(this,{0})' />按标题<input class='text' id='route_{0}_0' name='route_{0}_0' value='{3}'  style='width:300px;{2}' />",
                                        i, detail.Titletype ? "" : "checked='checked'", detail.Titletype ? "display:none;" : "", detail.Titletype ? "" : detail.DayTitle);
                        sb.AppendFormat("<input type='radio' name='rdo_title_{0}' value='True' {1} onclick='checkTitle(this,{0})' />按景点</b>{2}</dd></dl>",
                                        i, detail.Titletype ? "checked='checked'" : "", (i != 1) ? ("&nbsp;<a id='remove_day" + i + "' href='#' onclick='xingcheng_remove_day();return false;' style='display:" + ((i == routeList.Count) ? "" : "none") + "'>删除第" + i + "天行程</a>") : "");

                        if (detail.Titletype)
                        {
                            string[] dtitle = new string[detail.Scenicnum];
                            string[] dslt   = new string[detail.Scenicnum - 1];
                            string   tle    = detail.DayTitle;
                            dtitle[0] = tle.Substring(0, tle.IndexOf("<em"));
                            for (int m = 1; m < detail.Scenicnum; m++)
                            {
                                tle         = tle.Substring(tle.IndexOf("tfc") + 3);
                                dslt[m - 1] = tle.Substring(0, tle.IndexOf("'"));
                                tle         = tle.Substring(tle.IndexOf("</em>") + 5);
                                if (m == detail.Scenicnum - 1)
                                {
                                    dtitle[m] = tle;
                                }
                                else
                                {
                                    dtitle[m] = tle.Substring(0, tle.IndexOf("<em"));
                                }
                            }
                            //555<em class='tfc2'></em>444<em class='tfc3'></em>333<em class='tfc1'></em>222<em class='tfc2'></em>111<em class='tfc3'></em>900

                            sb.AppendFormat("<dl class='titleByJd' id='jd_title_{0}'><dd><input class='text' id='route_{0}_0_0' name='route_{0}_0_0' size='10' value='{1}' /></dd>", i, dtitle[0]);
                            for (int n = 1; n < detail.Scenicnum; n++)
                            {
                                sb.AppendFormat("<dd><select name='s_route_{0}_0_{1}'><option value='1' {2}>=飞机=</option><option value='2' {3}>=汽车=</option><option value='3' {4}>=轮船=</option><option value='4' {5}>=火车=</option></select>",
                                                i, n - 1, dslt[n - 1] == "1" ? "selected" : "", dslt[n - 1] == "2" ? "selected" : "", dslt[n - 1] == "3" ? "selected" : "", dslt[n - 1] == "4" ? "selected" : "");
                                sb.AppendFormat("<input class='text' id='route_{0}_0_{1}' name='route_{0}_0_{1}' size='10' value='{2}' /></dd>", i, n, dtitle[n]);
                            }
                            sb.AppendFormat("<a href='#?' onclick='xingcheng_add_jd({0});'>+添加</a><a href='#?' onclick='xingcheng_remove_jd({0});'>-减少</a>", i);
                            sb.AppendFormat("<input type='hidden' id='jd_title_sc{0}' name='jd_title_sc{0}' value='{1}' /></dl>", i, detail.Scenicnum);
                        }

                        sb.AppendFormat("<dl><dt>行程安排:</dt>");
                        sb.AppendFormat("<dd><div class='add_del_box'>");
                        sb.AppendFormat("<textarea id='route_{0}_1' name='route_{0}_1' style='width:700px;' rows='15'>{1}</textarea>", i, detail.DayDetail);
                        sb.AppendFormat("</div></dd></dl>");
                        sb.AppendFormat("<dl class='hotel'><dd>");
                        sb.AppendFormat("<div class='floatL'>早餐:<input id='route_{0}_2' name='route_{0}_2' type='checkbox' {2} /><input class='text text160' id='route_{0}_6' name='route_{0}_6' type='text' size='20' value='{1}' /></div>", i, detail.Breakfastdesc, detail.BreakFast ? "checked" : "");
                        sb.AppendFormat("<div class='floatL'>中餐:<input id='route_{0}_3' name='route_{0}_3' type='checkbox' {2} /><input class='text text160' id='route_{0}_7' name='route_{0}_7' type='text' size='20' value='{1}' /></div>", i, detail.Lunchdesc, detail.Lunch ? "checked" : "");
                        sb.AppendFormat("<div class='floatL'>晚餐:<input id='route_{0}_4' name='route_{0}_4' type='checkbox' {2} /><input class='text text160' id='route_{0}_8' name='route_{0}_8' type='text' size='20' value='{1}' /></div>", i, detail.Dinnerdesc, detail.Dinner ? "checked" : "");
                        sb.AppendFormat("</dd></dl>");
                        sb.AppendFormat("<dl><dt>住宿:<input type='text' class='text text160' id='route_{0}_5' name='route_{0}_5' value='{1}'/></dt></dl></div>", i, detail.Hotel);
                    }
                    routeDetails = sb.ToString();
                }
                else
                {
                    StringBuilder sb = new StringBuilder();

                    sb.AppendFormat("<div class='fieldset xingcheng-by-day' id='day_1'>");
                    //sb.AppendFormat("<dl><dd><b>第1天:<input class='text' id='route_1_0' name='route_1_0'  style='width:300px;' /></b></dd></dl>");

                    sb.AppendFormat("<dl><dd><b>第1天:<input type='radio' name='rdo_title_1' value='False' checked='checked' onclick='checkTitle(this,1)' />按标题<input class='text' id='route_1_0' name='route_1_0'  style='width:300px;' />");
                    sb.AppendFormat("<input type='radio' name='rdo_title_1' value='True' onclick='checkTitle(this,1)' />按景点</b></dd></dl>");

                    sb.AppendFormat("<dl><dt>行程安排:</dt>");
                    sb.AppendFormat("<dd><div class='add_del_box'>");
                    sb.AppendFormat("<textarea id='route_1_1' name='route_1_1' style='width:700px;' rows='15'></textarea>");
                    sb.AppendFormat("</div></dd></dl>");
                    sb.AppendFormat("<dl class='hotel'><dd>");
                    sb.AppendFormat("<div class='floatL'>早餐:<input id='route_1_2' name='route_1_2' type='checkbox' /><input class='text text160' id='route_1_6' name='route_1_6' type='text' size='20' /></div>");
                    sb.AppendFormat("<div class='floatL'>中餐:<input id='route_1_3' name='route_1_3' type='checkbox' /><input class='text text160' id='route_1_7' name='route_1_7' type='text' size='20' /></div>");
                    sb.AppendFormat("<div class='floatL'>晚餐:<input id='route_1_4' name='route_1_4' type='checkbox' /><input class='text text160' id='route_1_8' name='route_1_8' type='text' size='20' /></div>");
                    sb.AppendFormat("</dd></dl>");
                    sb.AppendFormat("<dl><dt>住宿:<input type='text' class='text text160' id='route_1_5' name='route_1_5' /></dt></dl></div>");

                    routeDetails = sb.ToString();
                }
            }
            else
            {
                Function.goMessagePage("修改路线", "操作失败,数据不存在!", "Routes/RouteList.aspx");
            }
        }