/// <summary> ///创建视频静态页面 /// </summary> public int StaticHtml(int id, string loginname) { try { string TempFileName = CasesTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; GZS.Model.VideoSysM model = videosysdal.GetModel(id); StringBuilder imageurls = new StringBuilder(); // string inPathTo = "/video"; List <GZS.Model.VideoSysM> list = videosysdal.GetTopModel(loginname); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { string urlhtml = list[i].htmlurl.Trim();//连接地址 if (list[i].ImageName.Trim() != ConfigurationManager.AppSettings["VideoDefaultImgeName"].ToString().Trim()) { imageurls.Append("<li><a href=\"http://" + loginname + ".topfo.com/" + urlhtml + "\"><img alt=\"" + list[i].videotitle + "\" src=\"http://dp.topfo.com/img/" + loginname + "/"); imageurls.Append(list[i].ImageName + "\""); imageurls.Append(" width=\"110\" height=\"83\" /></a></li>"); } else { imageurls.Append("<li><a href=\"http://" + loginname + ".topfo.com/" + urlhtml + "\"><img alt=\"" + list[i].videotitle + "\" src=\"http://dp.topfo.com/UpImage/" + ConfigurationManager.AppSettings["VideoDefaultImgeNames"].ToString().Trim() + "\""); imageurls.Append(" width=\"110\" height=\"83\" /></a></li>"); } } } TempSoure = TempSoure.Replace("$VoidioTitle$", model.videotitle.ToString().Trim()); TempSoure = TempSoure.Replace("$context$", model.introduction.ToString().Trim()); TempSoure = TempSoure.Replace("$name$", model.VidoiName.Trim()); TempSoure = TempSoure.Replace("$imageurl$", imageurls.ToString()); TempSoure = TempSoure.Replace("$loginName$", loginname.Trim()); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginname)); string htmlFile = model.htmlurl.ToString().Trim(); //string[] html = htmlFile.Split('/'); //string[] nn = html[2].Split('_'); //string cc = nn[0].Substring(nn[0].Length - 8); string wenjian = MerchantTmpPathTo + loginname + "/"; if (Directory.Exists(wenjian) == false) { Directory.CreateDirectory(wenjian); } string htmlpaths = MerchantTmpPathTo + loginname + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
public int StaticHtml(int id, string loginName) { try { //string TempFileName = InvestTem.ToString(); //string Tem = Compage.Reader(TempFileName); //读取模板内容 //string TempSoure = Tem; //string boolS = boolStr(loginName); //TempSoure = TempSoure.Replace("$InvestID$", id.ToString()); //TempSoure = TempSoure.Replace("$Content$", content(loginName, boolS)); //TempSoure = TempSoure.Replace("$loginName$", loginName); //CompanyShow com = new CompanyShow(); //TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginName)); //string htmlFile = "cost.htm"; //string wenjian = InvestPath + loginName; //if (!Directory.Exists(wenjian)) //{ // Directory.CreateDirectory(wenjian); //} //string htmlpaths = wenjian + "/" + htmlFile; //Compage.Writer(htmlpaths, TempSoure); //return 1; string TempFileName = InvestTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; InvestCostM costm = new InvestCostM(); InvestCostDAL costb = new InvestCostDAL(); if (id == 0) { costm = costb.GetModels(loginName); } else { costm = costb.GetModel(id); } TempSoure = TempSoure.Replace("$zhongwencontex$", costm.Chineseintroduced.ToString()); TempSoure = TempSoure.Replace("$EnglishContext$", costm.Englishintroduction.ToString()); TempSoure = TempSoure.Replace("$loginName$", loginName); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginName)); string htmlFile = "cost.htm"; string wenjian = InvestPath + loginName; if (!Directory.Exists(wenjian)) { Directory.CreateDirectory(wenjian); } string htmlpaths = wenjian + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
public int StaticHtml(int id, string loginName) { try { string TempFileName = ProductTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; ProductDominM doma = new ProductDominM(); if (id == 0) { doma = doBll.GetProductByName(loginName); } else { doma = doBll.GetModel(id); } if (doma != null) { TempSoure = TempSoure.Replace("$ProductID$", doma.productid.ToString().Trim()); } else { string a = "0"; TempSoure = TempSoure.Replace("$ProductID$", a); } string ids = ""; int scriptId = 0; TempSoure = TempSoure.Replace("$typeName$", type(ref ids, ref scriptId, loginName)); TempSoure = TempSoure.Replace("$loginName$", loginName); TempSoure = TempSoure.Replace("$ChinaName$", content(ids, loginName)); //TempSoure = TempSoure.Replace("$ProductScript$", script(scriptId)); TempSoure = TempSoure.Replace("$ProductScript$", scriptId.ToString()); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginName)); if (string.IsNullOrEmpty(doM.htmlurl)) { doma.htmlurl = "industry.htm"; // doma.htmlurl = doma.loginName + "/" + DateTime.Now.ToString("yyyyMMdd") + "_" + id + ".shtml"; } string htmlFile = "industry.htm"; string wenjian = ProductPath + loginName; if (!Directory.Exists(wenjian)) { Directory.CreateDirectory(wenjian); } string htmlpaths = wenjian + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
public int StaticHtmls(int id, string loginname) { try { GZS.Model.ImageTabM model = GetModel(id); string TempFileName = CasesTems.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; List <GZS.Model.ImageUrlTabM> list = dal.GetAlls(loginname); StringBuilder ste = new StringBuilder(); if (list.Count > 0) { for (int i = 0; i < list.Count; i++) { GZS.Model.ImageTabM dsd = GetModel(Convert.ToInt32(list[i].Imageid)); List <GZS.Model.ImageUrlTabM> lists = dal.GetAllByImageIds(Convert.ToInt32(list[i].Imageid)); if (lists.Count > 0) { string imagetu = lists[0].Imagepath.Trim(); string imagemiaoshu = list[i].imgexplain; ste.Append("<li><a href=\"http://" + loginname + ".topfo.com/" + dsd.Htmlurl + "\"><img alt=\"" + imagemiaoshu + "\" src=\"http://dp.topfo.com/img/" + loginname + "/" + imagetu + "\" /></a> </li>"); } } } TempSoure = TempSoure.Replace("$context$", ste.ToString()); TempSoure = TempSoure.Replace("$loginName$", loginname.ToString().Trim()); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginname)); string htmlFile = model.Htmlurllist.ToString().Trim(); // string[] html = htmlFile.Split('/'); // string[] nn = html[1].Split('_'); //string[] nn = html[2].Split('_'); // string cc = nn[0].Substring(nn[0].Length - 8); string wenjian = MerchantTmpPathTo + loginname + "/"; if (Directory.Exists(wenjian) == false) { Directory.CreateDirectory(wenjian); } string htmlpaths = MerchantTmpPathTo + loginname + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
string ParkTem = ConfigurationManager.AppSettings["ParkTemplate"].ToString(); //其他成功案例模版存放位置 public int StaticHtml(int id, string loginName) { try { string TempFileName = ParkTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; if (id == 0) { parkM = parkBLL.GetParkByLoginName(loginName); } else { parkM = parkBLL.GetModel(id); } TempSoure = TempSoure.Replace("$ParkID$", parkM.parkid.ToString().Trim()); string ids = ""; int scriptId = 0; TempSoure = TempSoure.Replace("$typeName$", type(ref ids, ref scriptId, loginName)); TempSoure = TempSoure.Replace("$style$", types(ids)); TempSoure = TempSoure.Replace("$ChinaName$", content(ids, loginName)); TempSoure = TempSoure.Replace("$loginName$", loginName); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginName)); //TempSoure = TempSoure.Replace("$ProductScript$", script(scriptId)); TempSoure = TempSoure.Replace("$ParkScript$", scriptId.ToString()); if (string.IsNullOrEmpty(parkM.htmlurl)) { parkM.htmlurl = "Park.htm"; } string htmlFile = "Park.htm";//parkM.htmlurl; string wenjian = ParkPath + loginName; if (!Directory.Exists(wenjian)) { Directory.CreateDirectory(wenjian); } string htmlpaths = wenjian + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
string PolicyRightTem = ConfigurationManager.AppSettings["PolicyRight"].ToString(); //其他成功案例模版存放位置 public int StaticHtml(int id, string loginName) { try { string TempFileName = CasesTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; PolicyModel policyModel = new PolicyModel(); if (id == 0) { policyModel = dal.GetPolicyByName(loginName); } else { policyModel = dal.GetModel(id); } TempSoure = TempSoure.Replace("$PolicyID$", policyModel.policyId.ToString().Trim()); TempSoure = TempSoure.Replace("$ChinaName$", policyModel.Chineseintroduced.ToString().Trim()); TempSoure = TempSoure.Replace("$englishName$", policyModel.Englishintroduction.ToString().Trim()); TempSoure = TempSoure.Replace("$loginName$", loginName); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginName)); if (string.IsNullOrEmpty(policyModel.htmlUrl)) { //policyModel.htmlUrl = policyModel.loginName + "/policy" + policyModel.loginName + ".htm"; policyModel.htmlUrl = "Preferentialpolicies.htm"; } string htmlFile = "Preferentialpolicies.htm"; string wenjian = PolicyPath + loginName; if (!Directory.Exists(wenjian)) { Directory.CreateDirectory(wenjian); } string htmlpaths = wenjian + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
/// <summary> ///创建相册静态页面 /// </summary> public int StaticHtml(int id, string loginname) { try { string TempFileName = CasesTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; GZS.Model.ImageTabM areatabm = GetModel(id); //主表 List <GZS.Model.ImageUrlTabM> list = dal.GetAllByImageIds(id); //从表 StringBuilder imageurls = new StringBuilder(); StringBuilder imagedescript = new StringBuilder(); //上一影集; GZS.Model.ImageTabM shangImageModel = GetYinJi(id, loginname, "<", "desc"); string shangImangeUrl = ""; //链接地址 string shangImageDefault = ""; //默认图片 if (shangImageModel != null) { List <GZS.Model.ImageUrlTabM> listd = dal.GetAllByImageIds(shangImageModel.imageid); if (listd.Count > 0) { shangImageDefault = listd[0].Imagepath.Trim(); } else { shangImageDefault = ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString(); } shangImangeUrl = shangImageModel.Htmlurl; } else { shangImangeUrl = areatabm.Htmlurl; if (list.Count > 0) { shangImageDefault = list[0].Imagepath.Trim(); } else { shangImageDefault = ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString(); } } //下一影集; GZS.Model.ImageTabM xiaImageModel = GetYinJi(id, loginname, ">", "asc"); string xiaImangeUrl = ""; //链接地址 string xiaImageDefault = ""; //默认图片 if (xiaImageModel != null) { xiaImangeUrl = xiaImageModel.Htmlurl; List <GZS.Model.ImageUrlTabM> lists = dal.GetAllByImageIds(xiaImageModel.imageid); if (lists.Count > 0) { xiaImageDefault = lists[0].Imagepath.Trim(); } else { xiaImageDefault = ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString(); } } else { xiaImangeUrl = areatabm.Htmlurl; if (list.Count > 0) { xiaImageDefault = list[0].Imagepath.Trim(); } else { xiaImageDefault = ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString(); } } string iamgedefault = ""; if (list.Count > 0) { iamgedefault = "<img src=\"http://dp.topfo.com/img/" + loginname + "/" + list[0].Imagepath.Trim() + "\" id=\"placeholder\" />"; for (int i = 0; i < list.Count; i++) { imageurls.Append(" <div class=\"pic\"><a href=\"http://dp.topfo.com/img/" + loginname + "/" + list[i].Imagepath.Trim() + "\" onMouseOver=\"showPic(this," + (i + 1) + "," + list.Count + ");return false;\" target=\"_blank\">"); imageurls.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/" + list[i].Imagepath.Trim() + "\" width=\"126\" height=\"94\" /> </a> </div>"); if (i == 0) { imagedescript.Append("<div style=\"text-align:center; display:block\" id=\"show" + (i + 1) + "\">" + list[i].imgexplain + "</div>"); } else { imagedescript.Append("<div style=\"text-align:center; display:none\" id=\"show" + (i + 1) + "\">" + list[i].imgexplain + "</div>"); } } } else { iamgedefault = ""; imageurls.Append(""); } string shanga = ""; string xiaa = ""; if (shangImageDefault.Trim() != ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString().Trim()) { shanga = "<a href=\"http://" + loginname + ".topfo.com/" + shangImangeUrl + "\"><img src=\"http://dp.topfo.com/img/" + loginname + "/" + shangImageDefault + "\" /></a><p><a href=\"http://" + loginname + ".topfo.com/" + shangImangeUrl + "\">上一影集</a></p>"; } else { shanga = "<a href=\"http://" + loginname + ".topfo.com/" + shangImangeUrl + "\"><img src=\"" + ConfigurationManager.AppSettings["ImagesDefaultLuJin"].ToString() + "\" /></a><p><a href=\"http://" + loginname + ".topfo.com/" + shangImangeUrl + "\">上一影集</a></p>"; } if (xiaImageDefault.Trim() != ConfigurationManager.AppSettings["ImagesDefaultImgeName"].ToString().Trim()) { xiaa = "<a href=\"http://" + loginname + ".topfo.com/" + xiaImangeUrl + "\"><img src=\"http://dp.topfo.com/img/" + loginname + "/" + xiaImageDefault + "\" /></a><p><a href=\"http://" + loginname + ".topfo.com/" + xiaImangeUrl + "\">下一影集</a></p>"; } else { xiaa = "<a href=\"http://" + loginname + ".topfo.com/" + xiaImangeUrl + "\"><img src=\"" + ConfigurationManager.AppSettings["ImagesDefaultLuJin"].ToString() + "\" /></a><p><a href=\"http://" + loginname + ".topfo.com/" + xiaImangeUrl + "\">下一影集</a></p>"; } TempSoure = TempSoure.Replace("$shang$", shanga); TempSoure = TempSoure.Replace("$xia$", xiaa); TempSoure = TempSoure.Replace("$ImageTitle$", areatabm.imageName.Trim()); TempSoure = TempSoure.Replace("$DefaultImage$", iamgedefault.Trim()); TempSoure = TempSoure.Replace("$ImageList$", imageurls.ToString()); TempSoure = TempSoure.Replace("$loginName$", loginname.Trim()); TempSoure = TempSoure.Replace("$imagedescript$", imagedescript.ToString()); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginname)); string htmlFile = areatabm.Htmlurl.ToString().Trim(); // string[] html = htmlFile.Split('/'); // string[] nn = html[1].Split('_'); //string[] nn = html[2].Split('_'); // string cc = nn[0].Substring(nn[0].Length - 8); string wenjian = MerchantTmpPathTo + loginname + "/"; if (Directory.Exists(wenjian) == false) { Directory.CreateDirectory(wenjian); } string htmlpaths = MerchantTmpPathTo + loginname + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
/// <summary> ///创建投资环境静态页面 /// </summary> public int StaticHtml(string loginname) { try { string ids = ""; string TempFileName = CasesTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 string TempSoure = Tem; GZS.DAL.EnvironmentTypeDAL typedal = new EnvironmentTypeDAL(); GZS.DAL.EnvironmentImgDAL Imgdal = new EnvironmentImgDAL(); List <GZS.Model.EnvironmentTypeM> list = typedal.GetAllType(); StringBuilder str = new StringBuilder(); for (int i = 0; i < list.Count; i++) { GZS.Model.EnvironmentTabM envtab = EnvironmentlistByLoginNameandTypeid(loginname, list[i].EnvironmentTypeID); string zhongwen = ""; string english = ""; string txt1 = ""; string txt2 = ""; string txt3 = ""; string txt4 = ""; string txts1 = ""; string txts2 = ""; string txts3 = ""; string txts4 = ""; if (envtab != null) { zhongwen = envtab.Chineseintroduced.Trim(); english = envtab.Englishintroduction.Trim(); List <GZS.Model.EnvironmentImgM> lists = Imgdal.GetAllByEnvironmentTabId(envtab.Environmentid); for (int t = 0; t < lists.Count; t++) { if (t == 0) { txt1 = lists[t].imgpath; txts1 = lists[t].imgexplain; } if (t == 1) { txt2 = lists[t].imgpath; txts2 = lists[t].imgexplain; } if (t == 2) { txt3 = lists[t].imgpath; txts3 = lists[t].imgexplain; } if (t == 3) { txt4 = lists[t].imgpath; txts4 = lists[t].imgexplain; } } } if (i == 0) { str.Append("<div id=\"gk_con_" + (10 + i) + "\" style =\"display:block\">"); ids += 10 + i + ","; } else { ids += 10 + i + ","; str.Append("<div id=\"gk_con_" + (10 + i) + "\" style =\"display:none\">"); } str.Append("<div class=\"envuroment-right1\">" + zhongwen + "</div>"); str.Append("<div class=\"envuroment-right1\">" + english + "</div>"); str.Append("<div class=\"envuroment-right2\">"); str.Append("<div class=\"industry-img-left001\"><ul>"); if (txt1.Trim() != "") { str.Append("<li class=\"l\">"); str.Append("<a href=\"http://dp.topfo.com/img/" + loginname + "/" + txt1 + "\" alt='点击查看大图' target=\"_blank\">"); str.Append("<img alt='点击查看大图' src=\"http://dp.topfo.com/img/" + loginname + "/" + txt1 + "\" />"); str.Append("<p style=\"text-align:center;\">" + txts1 + "</p>"); str.Append("</li>"); } else { //str.Append("<li class=\"l\">"); } if (txt2.Trim() != "") { str.Append("<li class=\"r\">"); str.Append("<a href=\"http://dp.topfo.com/img/" + loginname + "/" + txt2 + "\" alt='点击查看大图' target=\"_blank\">"); str.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/" + txt2 + "\" alt='点击查看大图'/>"); str.Append("<p style=\"text-align:center;\">" + txts2 + "</p>"); str.Append("</li>"); } else { // str.Append("<li class=\"r\">"); } str.Append("</ul>"); str.Append("</div></div>"); if (txt3.Trim() != "") { str.Append("<div class=\"envuroment-right3\"><div class=\"industry-img-left001\">"); str.Append("<a href=\"http://dp.topfo.com/img/" + loginname + "/" + txt3 + "\" alt='点击查看大图' target=\"_blank\">"); str.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/" + txt3 + "\" alt='点击查看大图'/>"); str.Append("<p style=\"text-align:center;\">" + txts3 + "</p>"); str.Append("</div>"); } else { //str.Append("<div class=\"envuroment-right3\">"); } if (txt4.Trim() != "") { str.Append("<div class=\"envuroment-right4\"><div class=\"industry-img-left001\">"); str.Append("<a href=\"http://dp.topfo.com/img/" + loginname + "/" + txt4 + "\" alt='点击查看大图' target=\"_blank\">"); str.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/" + txt4 + "\" />"); str.Append("<p style=\"text-align:center;\">" + txts4 + "</p>"); str.Append("</div>"); } else { //str.Append("<div class=\"envuroment-right4\">"); } //str.Append("</div></div>"); str.Append("</div>"); } TempSoure = TempSoure.Replace("$contex$", str.ToString()); TempSoure = TempSoure.Replace("$loginName$", loginname.Trim()); TempSoure = TempSoure.Replace("$styles$", types(ids)); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loginname)); string wenjian = MerchantTmpPathTo + loginname + "/"; if (Directory.Exists(wenjian) == false) { Directory.CreateDirectory(wenjian); } string htmlpaths = MerchantTmpPathTo + loginname + "/" + "Investmentenvironment.htm"; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }
/// <summary> ///创建区域静态页面 /// </summary> public int StaticHtml(int id, string loaginnames) { try { string TempFileName = CasesTem.ToString(); string Tem = Compage.Reader(TempFileName); //读取模板内容 GZS.Model.AreaTab areatabm = null; List <GZS.Model.Areaimg> list = null; string TempSoure = Tem; if (id == 0) { areatabm = GetModelCountByLogName(loaginnames); } else { areatabm = GetModel(id); } StringBuilder imageurls = new StringBuilder(); GZS.DAL.AreaimgDAL areaimgdal = new AreaimgDAL(); if (id == 0) { list = areaimgdal.GetAllModelByareId(areatabm.areaid); } else { list = areaimgdal.GetAllModelByareId(id); } string iamgedefaults = ""; string iamgedefault = ""; if (list.Count > 0) { if (list[0].ImageUrl.Trim() != "") { iamgedefaults = "<img src=\" http://dp.topfo.com/img/" + loaginnames + "/" + list[0].ImageUrl.Trim() + "\" />"; iamgedefault = "<img src=\" http://dp.topfo.com/img/" + loaginnames + "/" + list[0].ImageUrl.Trim() + "\" id=\"placeholder\" />"; for (int i = 0; i < list.Count; i++) { imageurls.Append(" <div class=\"pic\"><a href=\"http://dp.topfo.com/img/" + loaginnames + "/" + list[i].ImageUrl.Trim() + "\" onMouseOver=\"showPic(this);return false;\" target=\"_blank\">"); imageurls.Append("<img id=\"dx" + i + "\" src=\"http://dp.topfo.com/img/" + loaginnames + "/" + list[i].ImageUrl.Trim() + "\" /> </a> </div>"); } } else { iamgedefault = ""; iamgedefaults = ""; imageurls.Append("<li></li>"); } } TempSoure = TempSoure.Replace("$zhongwencontex$", areatabm.Chineseintroduced.Trim()); TempSoure = TempSoure.Replace("$EnglishContext$", areatabm.Englishintroduction.Trim()); TempSoure = TempSoure.Replace("$DefaultImage$", iamgedefault.Trim()); TempSoure = TempSoure.Replace("$ImageList$", imageurls.ToString()); TempSoure = TempSoure.Replace("$loginName$", loaginnames.Trim()); TempSoure = TempSoure.Replace("$txtup$", iamgedefaults.Trim()); CompanyShow com = new CompanyShow(); TempSoure = TempSoure.Replace("$CompanyName$", com.GetCompanyNameByLoginName(loaginnames)); string htmlFile = areatabm.Htmlurl.ToString().Trim(); //string[] nn = html[2].Split('_'); // string cc = nn[0].Substring(nn[0].Length - 8); string wenjian = MerchantTmpPathTo + loaginnames + "/"; if (Directory.Exists(wenjian) == false) { Directory.CreateDirectory(wenjian); } string htmlpaths = MerchantTmpPathTo + loaginnames + "/" + htmlFile; Compage.Writer(htmlpaths, TempSoure); return(1); } catch (Exception e) { return(0); } }