protected string ChangeRequire(string pid, string cid, string onlycitychange, string onlyschoolchagne) { string typenaem = XiHuan_UserGoodsFacade.GetTypeNameById(pid); string childname = XiHuan_UserGoodsFacade.GetSecondTypeNameById(pid, cid); string city = onlycitychange.Equals("1") ? "限同城交换" : ""; string school = onlyschoolchagne.Equals("1") ? "限同校交换" : ""; return(string.Format("类别要求:<span class=\"inittext\">{0}</span><br/>交换条件:<span class=\"inittext\">{1}</span>", (typenaem.Length == 0 && childname.Length == 0 ? "不限" : typenaem + " " + childname), (city.Length == 0 && school.Length == 0 ? "不限" : city + " " + school) )); }
protected override void Page_PreLoad() { Header.Title = GoodDetail.Name + "--" + SystemConfigFacade.Instance().WebSiteTitle; GenerateMeta("Content-Type", string.Empty, "text/html;charset=GB2312", 0); //开启IE8兼容模式 GenerateMeta("X-UA-Compatible", string.Empty, "IE=EmulateIE7", 1); GenerateMeta(string.Empty, "keywords", GoodDetail.Name + "," + XiHuan_UserGoodsFacade.GetTypeNameById(GoodDetail.TypeId.ToString()) + "," + XiHuan_UserGoodsFacade.GetSecondTypeNameById(GoodDetail.TypeId.ToString(), GoodDetail.ChildId.ToString()), 2); GenerateMeta(string.Empty, "description", GoodDetail.Name + "," + SystemConfigFacade.Instance().WebSiteDescription, 3); GenerateMeta(string.Empty, "Robots", "All", 4); GenerateMeta(string.Empty, "GOOGLEBOT", "All", 5); GenerateMeta(string.Empty, "verify-v1", "2WI+gttAG3Vgo7KoaYDT/7Fb1mXT6UGwvFpYYrVkUkU=", 6); GenerateMeta(string.Empty, "y_key", "f00a394915068b18", 7); HtmlLink maincss = new HtmlLink(); maincss.Attributes["type"] = "text/css"; maincss.Attributes["href"] = SrcRootPath + "App_Themes/Default/style.css"; maincss.Attributes["rel"] = "stylesheet"; Header.Controls.AddAt(8, maincss); HtmlLink ymcss = new HtmlLink(); ymcss.Attributes["type"] = "text/css"; ymcss.Attributes["href"] = SrcRootPath + "Js/ymPromot/skin/qq/ymPrompt.css"; ymcss.Attributes["rel"] = "stylesheet"; Header.Controls.AddAt(9, ymcss); int i = 9; if (GoodDetail.DefaultPhoto != null && GoodDetail.DefaultPhoto.Trim().Length > 0 && !GoodDetail.DefaultPhoto.Trim().Equals("images/none.jpg")) { HtmlLink highslidecss = new HtmlLink(); highslidecss.Attributes["type"] = "text/css"; highslidecss.Attributes["href"] = SrcRootPath + "Js/highslide/highslide.css"; highslidecss.Attributes["rel"] = "stylesheet"; Header.Controls.AddAt(10, highslidecss); i = 10; } GenerateScript(SrcRootPath + "Js/ymPromot/ymPrompt.js", i + 1); GenerateScript(SrcRootPath + "Js/common.js", i + 2); GenerateScript("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js", i + 3); HtmlLink favicon = new HtmlLink(); favicon.Attributes["rel"] = "shortcut icon'"; favicon.Attributes["href"] = SrcRootPath + "images/favicon.ico"; Header.Controls.AddAt(i + 4, favicon); }