Exemple #1
0
        /// <summary>
        /// 成功案例静态页面显示
        /// </summary>
        /// <param name="NewsID">编号</param>
        /// <param name="title">标题</param>
        /// <param name="publishT">时间</param>
        /// <param name="Content">详细内容</param>
        public void StaticHtml(int NewsID, string title, string publishT, string Content)
        {
            string TempFileName = "E:/TopfoManage/WEB/Template/XQYE.html"; //模板页面地址
            string Tem          = Compage.Reader(TempFileName);            //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$title$", title);
            TempSoure = TempSoure.Replace("$publishT$", publishT);
            TempSoure = TempSoure.Replace("$Content$", Content);

            #endregion
            #region
            // string inPath = "E:/cgyl/";
            string fileNamehtml = DateTime.Now.ToString("yyyyMMdd"); //文件名称
            string htmlpaths    = MerchantTmpPathTo + fileNamehtml + "_" + NewsID + ".shtml";
            Compage.Writer(htmlpaths, TempSoure);
            #endregion
        }
Exemple #2
0
        public void CreateStaticPageHtml(int NewsID, string infoID, string DisplayTitle, string MerchantType,
                                         string CooperationDemandType, string IndustryControl, string ZoneSelectControl, string CapitalTotal,
                                         string CapitalCurrency, string MerchantTotal, string MerchantCurrency, string PublishT, string ValiditeTerm, string ZoneAbout,
                                         string EconomicIndicators, string InvestmentEnvironment, string ProjectStatus, string Market, string Benefit, string zfzs,
                                         string zbzy, string qyxm, string qtzy, string xgzx,
                                         string CompanyName, string Undertaker, string Name, string Position, string CountryCode, string StateCode,
                                         string TelNum, string Email, string Address, string Infom)
        {
            StringBuilder str = new StringBuilder();

            #region 模板地址
            //模板页面地址
            // string Tempath = ConfigurationManager.AppSettings["Templatepath"].ToString();
            //静态页面地址
            // string htmlpath = ConfigurationManager.AppSettings["Htmppath"].ToString();
            //string Name1 = "/temV1.html"; //模板页面地址
            #endregion
            // string TempFileName = ApplicationRootPath + MerchantTmpPath + Name1;//文件地址
            string TempFileName = "E:/TopfoManage/WEB/Template/temV1.html"; //模板页面地址
            string Tem          = Compage.Reader(TempFileName);             //读取模板内容
            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$infoID$", infoID);
            TempSoure = TempSoure.Replace("$DisplayTitle$", DisplayTitle);
            TempSoure = TempSoure.Replace("$MerchantType$", MerchantType);
            TempSoure = TempSoure.Replace("$CooperationDemandType$", CooperationDemandType);
            TempSoure = TempSoure.Replace("$IndustryControl$", IndustryControl);
            TempSoure = TempSoure.Replace("$ZoneSelectControl$", ZoneSelectControl);
            TempSoure = TempSoure.Replace("$CapitalTotal$", CapitalTotal);
            TempSoure = TempSoure.Replace("$CapitalCurrency$", CapitalCurrency);
            TempSoure = TempSoure.Replace("$MerchantTotal$", MerchantTotal);
            TempSoure = TempSoure.Replace("$MerchantCurrency$", MerchantCurrency);
            TempSoure = TempSoure.Replace("$PublishT$", PublishT);
            TempSoure = TempSoure.Replace("$ValiditeTerm$", ValiditeTerm);
            TempSoure = TempSoure.Replace("$ZoneAbout$", ZoneAbout);
            TempSoure = TempSoure.Replace("$EconomicIndicators$", EconomicIndicators);
            TempSoure = TempSoure.Replace("$InvestmentEnvironment$", InvestmentEnvironment);
            TempSoure = TempSoure.Replace("$ProjectStatus$", ProjectStatus);
            TempSoure = TempSoure.Replace("$Market$", Market);
            TempSoure = TempSoure.Replace("$Benefit$", Benefit);
            TempSoure = TempSoure.Replace("$zfzs$", zfzs);
            TempSoure = TempSoure.Replace("$zbzy$", zbzy);
            TempSoure = TempSoure.Replace("$qyxm$", qyxm);
            TempSoure = TempSoure.Replace("$qtzy$", qtzy);
            TempSoure = TempSoure.Replace("$xgzx$", xgzx);
            TempSoure = TempSoure.Replace("$CompanyName$", CompanyName);
            TempSoure = TempSoure.Replace("$Undertaker$", Undertaker);
            TempSoure = TempSoure.Replace("$Name$", Name);
            TempSoure = TempSoure.Replace("$Position$", Position);
            TempSoure = TempSoure.Replace("$CountryCode$", CountryCode);
            TempSoure = TempSoure.Replace("$StateCode$", StateCode);
            TempSoure = TempSoure.Replace("$TelNum$", TelNum);
            TempSoure = TempSoure.Replace("$Email$", Email);
            TempSoure = TempSoure.Replace("$Address$", Address);
            TempSoure = TempSoure.Replace("$Infom$", Infom);
            #endregion
            #region
            string inPath       = "E:/Merchant/";
            string fileNamehtml = DateTime.Now.ToString("yyyyMMdd"); //文件名称
            string htmlpaths    = inPath + fileNamehtml + "_" + NewsID + ".shtml";
            Compage.Writer(htmlpaths, TempSoure);
            #endregion
        }