Esempio n. 1
0
 public int StaticHtml(string Field, int num)
 {
     try
     {
         string Tem = Compage.Reader(FieldTem.ToString()); //读取模板内容
         #region 替换模版
         string TempSoure = Tem;
         TempSoure = TempSoure.Replace("$Field$", Field);
         #endregion
         string wenjian = FieldPath;
         if (!Directory.Exists(wenjian))
         {
             Directory.CreateDirectory(wenjian);
         }
         string htmlpaths = "";
         if (num == 1)//最新分析报告
         {
             htmlpaths = wenjian + "NewReport.html";
         }
         else if (num == 2)//推荐行业报告
         {
             htmlpaths = wenjian + "RecomReport.html";
         }
         else if (num == 3)//免费行业报告
         {
             htmlpaths = wenjian + "ChargesReport.html";
         }
         Compage.Writer(htmlpaths, TempSoure);
         return(1);
     }
     catch (Exception e)
     {
         return(0);
     }
 }
Esempio n. 2
0
        public int StaticHtml(string loginName)
        {
            try
            {
                string     TempFileName = PolicyRightTem.ToString();
                string     Tem          = Compage.Reader(TempFileName); //读取模板内容
                string     TempSoure    = Tem;
                CommStatic comm         = new CommStatic();
                TempSoure = TempSoure.Replace("$Policy$", comm.GetPolicyListUIByLoginName(loginName));

                string htmlFile = "PolicyRight.htm";
                string wenjian  = PolicyRightSuccse + loginName;
                if (!Directory.Exists(wenjian))
                {
                    Directory.CreateDirectory(wenjian);
                }
                string htmlpaths = wenjian + "/" + htmlFile;
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
        }
Esempio n. 3
0
        /// <summary>
        ///创建首页资讯链接静态页面1
        /// </summary>
        public int StaticHtmls(string loginname)
        {
            try
            {
                string TempFileName = CasesTems.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容

                string TempSoure = Tem;
                GZS.DAL.product.CommStatic dal = new GZS.DAL.product.CommStatic();
                string ds = dal.GetNewList(loginname).Trim();
                TempSoure = TempSoure.Replace("$cntex$", ds);
                //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 = MerchantTmpPathTos + loginname + "/newss.htm";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
        }
Esempio n. 4
0
        string NewSumTem  = ConfigurationManager.AppSettings["NewSumTem"].ToString();     //资讯详细页面模版存放位置
        /// <summary>
        /// 处理静态页面
        /// </summary>
        /// <param name="num">当前页面数</param>
        /// <param name="type">所对应的类型</param>
        /// <param name="state">绑定内容</param>
        /// <param name="page">绑定分页</param>
        public void HtmlPage(int num, int type, string state, string page, string title, string keyWords, string desc)
        {
            string TypeName     = Type(type);
            string TempFileName = NewSumTem.ToString();
            string Tem          = Compage.Reader(TempFileName); //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$TypeName$", TypeName);
            TempSoure = TempSoure.Replace("$State$", state);
            TempSoure = TempSoure.Replace("$Page$", page);
            TempSoure = TempSoure.Replace("$Title$", title);
            TempSoure = TempSoure.Replace("$keywords$", keyWords);
            TempSoure = TempSoure.Replace("$description$", desc);

            #endregion

            string wenjian = NewSumPath + Convert.ToString(type);
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }

            string htmlpaths = wenjian + "\\index_" + num + ".shtml";
            Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 5
0
        /// <summary>
        ///创建融资相册链接静态页面
        /// </summary>
        public int StaticRZHtmlshouyeList(string loginname, int id)
        {
            try
            {
                StringBuilder sb  = new StringBuilder();
                StringBuilder sb1 = new StringBuilder();
                string        Url = "";
                string        sql = "SELECT dbo.ImageTab.imageid, dbo.ImageTab.LoginName, dbo.ImageTab.imageName, dbo.ImageTab.Htmlurl,dbo.ImageUrlTab.Imagepath, dbo.ImageUrlTab.imgexplain FROM dbo.ImageTab INNER JOIN dbo.ImageUrlTab ON dbo.ImageTab.imageid = dbo.ImageUrlTab.Imageid where ImageTab.LoginName=@loginname order by imageid desc";

                SqlParameter[] para =
                {
                    new SqlParameter("@loginname", SqlDbType.VarChar, 20)
                };
                para[0].Value = loginname;
                DataSet ds = GZS.DAL.DBHelper.Query(sql, para);
                if (ds != null & ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        DataRow row       = ds.Tables[0].Rows[i];
                        string  Imagepath = row["Imagepath"].ToString().Trim();
                        Url = row["Htmlurl"].ToString().Trim();
                        string imageName = row["imageName"].ToString().Trim();
                        if (i == 0)
                        {
                            sb1.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/big" + Imagepath + "\" alt=\"" + imageName + "\" width=\"549\" height=\"285\" id=\"mainphoto\"\"http://dp.topfo.com/img/" + loginname + "/" + Imagepath + "\" name=\"#\" />");
                        }
                        sb.Append("<img src=\"http://dp.topfo.com/img/" + loginname + "/" + Imagepath + "\" alt=\"" + imageName + "\" width=\"131\" height=\"89\" rel=\"http://dp.topfo.com/img/" + loginname + "/" + Imagepath + "\" name=\"#\" />");
                    }
                }



                string TempFileName = rzxxzsTem.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容

                string TempSoure = Tem;
                GZS.DAL.product.CommStatic dal = new GZS.DAL.product.CommStatic();
                TempSoure = TempSoure.Replace("$cntex$", GetRZImageList(loginname));
                TempSoure = TempSoure.Replace("##userName##", loginname.ToString().Trim());
                TempSoure = TempSoure.Replace("##imgtop1##", sb1.ToString().Trim());
                TempSoure = TempSoure.Replace("##imglist##", sb.ToString().Trim());


                string wenjian = PersonSuccess + "rz" + loginname + "/";

                if (Directory.Exists(wenjian) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }
                string htmlpaths = PersonSuccess + "rz" + loginname + "/" + Url + "";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
        }
Esempio n. 6
0
        public void HtmlPage(int num, string state, string page, int areid, string areList)
        {
            string KeyWord      = "" + areList + "招商项目, " + areList + "招商项目新资讯";
            string Descript     = "有关" + areList + "招商项目信息汇总,招商项目频道,全国最新" + areList + "招商项目信息发布,让投资者更快找到" + areList + "招商项目相关的投资项目和项目信息,展示哪些企业的招商项目;同时也为企业提供全国优秀" + areList + "招商项目资讯,让企业更快找到" + areList + "招商项目相关信息。";
            string DisplayTitle = "" + areList + "招商项目|" + areList + "招商项目信息汇总|招商项目 " + areList + "项目分类 - 中国招商投资网";
            string TempFileName = NewSumTem.ToString();
            string Tem          = Compage.Reader(TempFileName); //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$KeyWord$", KeyWord);           //网页关键字
            TempSoure = TempSoure.Replace("$Descript$", Descript);         //网页描述
            TempSoure = TempSoure.Replace("$DisplayTitle$", DisplayTitle); //网页标题

            TempSoure = TempSoure.Replace("$State$", state);
            TempSoure = TempSoure.Replace("$Page$", page);

            TempSoure = TempSoure.Replace("$QuYuAre$", areList);
            TempSoure = TempSoure.Replace("$QAreList$", Convert.ToString(areid));
            #endregion

            string wenjian = NewSumPath;
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }

            string htmlpaths = wenjian + "\\zs" + areid + "_" + num + ".shtml";
            GZS.DAL.Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 7
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);
            }
        }
Esempio n. 8
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);
            }
        }
Esempio n. 9
0
        public int ywjsList(string longinName)
        {
            try
            {
                StringBuilder sb  = new StringBuilder();
                StringBuilder sb1 = new StringBuilder();
                DataTable     dt  = GetJobList(longinName);
                if (dt != null && dt.Rows.Count > 0)
                {
                    int Count = dt.Rows.Count;
                    if (dt != null && Count > 0)
                    {
                        sb.Append("<ul>");
                        for (int i = 0; i < Count; i++)
                        {
                            if (i == 0)
                            {
                                sb.Append("<li onclick=\"onClik(this)\" id=\"" + i.ToString() + "\"><a href=\"javascript:void(0)\" class=\"fdsd\">·" + dt.Rows[i]["YwType"].ToString() + "</a></li>");
                                sb1.Append("<div style=\"display:block\" id=\"item" + i.ToString() + "\">" + dt.Rows[i]["Content"].ToString() + "</div>");
                            }
                            else
                            {
                                sb.Append("<li onclick=\"onClik(this)\" id=\"" + i.ToString() + "\"><a href=\"javascript:void(0)\">·" + dt.Rows[i]["YwType"].ToString() + "</a></li>");
                                sb1.Append("<div style=\"display:none\" id=\"item" + i.ToString() + "\">" + dt.Rows[i]["Content"].ToString() + "</div>");
                            }
                        }
                        sb.Append("</ul>");
                    }
                }

                string TempFileName = ywjs.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容

                string TempSoure = Tem;

                TempSoure = TempSoure.Replace("$YwJs$", sb.ToString().Trim());
                TempSoure = TempSoure.Replace("$context$", sb1.ToString().Trim());



                string wenjian = PersonSuccess + "zf" + longinName + "/";

                if (Directory.Exists(wenjian) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }
                string htmlpaths = PersonSuccess + "zf" + longinName + "/ywjs.htm";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 企业名片最新加入企业
        /// </summary>
        /// <param name="name"></param>
        public void ComPanyTime()
        {
            string TempFileName = ComTime.ToString();
            string PanyTime     = SelCompanyTime();
            string Tem          = Compage.Reader(TempFileName); //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$CompanyTime$", PanyTime);
            #endregion

            string htmlpaths = ComPath + "NewsCompany.html";
            Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 11
0
        public void StaticHtml(string LoginName, string Title, string KeyWord, string Descript)
        {
            PersonBLL perbll     = new PersonBLL();
            PersonM   model      = perbll.GetModelByLoginName(LoginName);
            string    PersonTems = PersonTem.ToString();
            string    TempSoure  = Compage.Reader(PersonTems);

            if (model != null)
            {
                string img = "";
                if (string.IsNullOrEmpty(model.img.ToString()))
                {
                    img = "http://www.topfo.com/dservice/image/photo.jpg";
                }
                else
                {
                    img = "http://dp.topfo.com/img/" + LoginName + "/" + model.img.ToString();
                }
                string imgstr = "<img id=\"imgPerson\" src=" + img + " style=\"height:106px;width:155px;border-width:0px;\" />";
                //string strName = model.name + "&nbsp;" + model.birthDay.ToString("yyyy年MM月dd日") + "出生&nbsp;" + model.address.ToString();
                string strName = model.name;// +"&nbsp;" + model.birthDay.ToString("yyyy年MM月dd日") + "出生&nbsp;" + model.address.ToString();
                TempSoure = TempSoure.Replace("$Name$", strName);
                TempSoure = TempSoure.Replace("[userName]", LoginName);
                TempSoure = TempSoure.Replace("[暂无图片]", imgstr);
                TempSoure = TempSoure.Replace("[暂无格言]", model.signature.ToString());
                TempSoure = TempSoure.Replace("[暂无介绍]", SubStr(model.description.ToString(), 185));
                TempSoure = TempSoure.Replace("$Title$", Title.ToString().Trim());
                TempSoure = TempSoure.Replace("$Description$", KeyWord.ToString().Trim());
                TempSoure = TempSoure.Replace("$KeyWords$", Descript.ToString().Trim());
            }
            else
            {
                string img    = "http://www.topfo.com/dservice/image/photo.jpg";
                string imgstr = "<img id=\"imgPerson\" src=" + img + " style=\"height:106px;width:155px;border-width:0px;\" />";
                TempSoure = TempSoure.Replace("$Name$", "");
                TempSoure = TempSoure.Replace("[userName]", LoginName);
                TempSoure = TempSoure.Replace("[暂无图片]", imgstr);
                TempSoure = TempSoure.Replace("$Title$", Title.ToString().Trim());
                TempSoure = TempSoure.Replace("$Description$", KeyWord.ToString().Trim());
                TempSoure = TempSoure.Replace("$KeyWords$", Descript.ToString().Trim());
            }
            string htmlpaths = PersonSuccess + "lm" + LoginName + "\\index.htm";

            if (!Directory.Exists(PersonSuccess + "lm" + LoginName))
            {
                Directory.CreateDirectory(PersonSuccess + "lm" + LoginName);
            }
            Compage.Writer(htmlpaths, TempSoure);
            StaticHtmls(LoginName);
        }
Esempio n. 12
0
        /// <summary>
        /// 联系我们
        /// </summary>
        /// <param name="LoginName"></param>
        public void lxwmList(string LoginName)
        {
            string PersonTems = lxwm.ToString();
            string TempSoure  = Compage.Reader(PersonTems);

            TempSoure = TempSoure.Replace("$UserName$", LoginName.ToString().Trim());
            string htmlpaths = PersonSuccess + "zf" + LoginName + "\\content.htm";

            if (!Directory.Exists(PersonSuccess + "zf" + LoginName))
            {
                Directory.CreateDirectory(PersonSuccess + "zf" + LoginName);
            }
            Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 13
0
        /// <summary>
        /// 企业名片会员排行
        /// </summary>
        /// <param name="name"></param>
        public void ComPanyHit()
        {
            string TempFileName = ComHit.ToString();
            string PanyHit      = SelCompanyHit();
            string Tem          = Compage.Reader(TempFileName); //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$CompanyHit$", PanyHit);
            #endregion

            string htmlpaths = ComPath + "CompanyCard.html";
            Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 14
0
        public void ComPanyHtml(string CompanyID, string LoginName, string CompanyName, string IndustryName, string RangeName, string NatureName,
                                string HtmlFile, string EstablishMent, string Employees, string Capital, string Introduction, string ServiceProce,
                                string Title, string Keywords, string Description, string logo, string FronID)
        {
            CompanyBLL comBll       = new CompanyBLL();
            string     TempFileName = ComTerm.ToString();
            string     seeLinkName  = comBll.SelLinkName(Convert.ToInt32(CompanyID));
            string     Tem          = Compage.Reader(TempFileName); //读取模板内容

            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$CompanyId$", CompanyID);
            TempSoure = TempSoure.Replace("$CompanyName$", CompanyName);
            TempSoure = TempSoure.Replace("$IndustryName$", IndustryName);

            TempSoure = TempSoure.Replace("$RangeName$", RangeName);
            TempSoure = TempSoure.Replace("$NatureName$", NatureName);
            TempSoure = TempSoure.Replace("$HtmlFile$", HtmlFile);
            TempSoure = TempSoure.Replace("$EstablishMent$", EstablishMent);
            TempSoure = TempSoure.Replace("$Employees$", Employees);
            TempSoure = TempSoure.Replace("$Capital$", Capital);
            TempSoure = TempSoure.Replace("$Introduction$", Introduction);
            TempSoure = TempSoure.Replace("$ServiceProce$", ServiceProce);
            TempSoure = TempSoure.Replace("$Title$", Title);
            TempSoure = TempSoure.Replace("$Keywords$", Keywords);
            TempSoure = TempSoure.Replace("$Description$", Description);

            TempSoure = TempSoure.Replace("$SeeLinkName$", seeLinkName);
            TempSoure = TempSoure.Replace("$Logo$", logo);
            #endregion
            string wenjian = "", htmlpaths = "";
            if (FronID == "1")
            {
                wenjian   = ComPath + "company/";
                htmlpaths = wenjian + "\\" + CompanyID + ".html";
            }
            else
            {
                wenjian   = ComPath + LoginName;
                htmlpaths = wenjian + "\\" + "index.html";
            }
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }
            // string htmlpaths = wenjian+"c" + "\\" + "index.html";
            Compage.Writer(htmlpaths, TempSoure);
        }
Esempio n. 15
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);
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 生成招商投资融资模板页
        /// </summary>
        /// <param name="LoginName"></param>
        public int PmcStatic(string LoginName)
        {
            string wenjian = ComShowPath + LoginName;


            string TempFileName10 = CSproject.ToString();
            string TempSoure10    = Compage.Reader(TempFileName10);

            TempSoure10 = TempSoure10.Replace("$loginName$", LoginName);
            Tz888.SQLServerDAL.Company.CompanyShowDAL com = new Tz888.SQLServerDAL.Company.CompanyShowDAL();
            TempSoure10 = TempSoure10.Replace("$CompanyName$", com.GetCompanyNameByLoginName(LoginName));
            string htmlpaths10 = wenjian + "\\" + "project.htm";

            Compage.Writer(htmlpaths10, TempSoure10);
            return(1);
        }
Esempio n. 17
0
        /// <summary>
        /// 生成招商项目Ifrom
        /// </summary>
        /// <param name="LoginName"></param>
        public int MerchantStatic(string LoginName)
        {
            Tz888.SQLServerDAL.Info.IndexSelect dal = new Tz888.SQLServerDAL.Info.IndexSelect();
            string wenjian = ComShowPath + LoginName;

            try
            {
                string ProjectList = "";
                string temp        = "";

                for (int i = 0; i < 3; i++)
                {
                    string title = "";

                    if (i == 0)//招商信息
                    {
                        ProjectList = dal.MerchantNew(LoginName);
                        temp        = "MearcharList.htm";
                        title       = "招商项目";
                    }
                    else if (i == 1)//投资信息
                    {
                        ProjectList = dal.CapitalNew(LoginName);
                        temp        = "InvestNeedList.htm";
                        title       = "投资项目";
                    }
                    else if (i == 2)//融资信息
                    {
                        ProjectList = dal.ProjectlNew(LoginName);
                        temp        = "RZProjectList.htm";
                        title       = "融资项目";
                    }
                    string TempFileName13 = MerchntList.ToString();
                    string TempSoure13    = Compage.Reader(TempFileName13);
                    TempSoure13 = TempSoure13.Replace("$ProjectList$", ProjectList);
                    TempSoure13 = TempSoure13.Replace("$ProjectTitle$", title);
                    string htmlpaths13 = wenjian + "\\" + temp;
                    Compage.Writer(htmlpaths13, TempSoure13);
                }
                return(1);
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// 投资项目生成静态页面
        /// </summary>
        /// <param name="LoginName"></param>
        public void tzsm(string LoginName)
        {
            string PersonTems = tz_sm.ToString();
            string TempSoure  = Compage.Reader(PersonTems);

            TempSoure = TempSoure.Replace("$UserName$", LoginName.ToString().Trim());
            string htmlpaths = PersonSuccess + "tz" + LoginName + "\\tzsm.htm";

            if (!Directory.Exists(PersonSuccess + "tz" + LoginName))
            {
                Directory.CreateDirectory(PersonSuccess + "tz" + LoginName);
            }
            Compage.Writer(htmlpaths, TempSoure);
            ywjs(LoginName);
            tzdt(LoginName);
            lxwm(LoginName);
        }
Esempio n. 19
0
        /// <summary>
        /// 资讯活动
        /// </summary>
        /// <param name="LoginName"></param>
        public void zxhdStaticHtml(string LoginName)
        {
            string PersonTems = news.ToString();
            string TempSoure  = Compage.Reader(PersonTems);

            TempSoure = TempSoure.Replace("$UserName$", LoginName.ToString().Trim());



            string htmlpaths = PersonSuccess + "zf" + LoginName + "\\news.htm";

            if (!Directory.Exists(PersonSuccess + "zf" + LoginName))
            {
                Directory.CreateDirectory(PersonSuccess + "zf" + LoginName);
            }
            Compage.Writer(htmlpaths, TempSoure);
            TzxmStaticHtml(LoginName);
        }
Esempio n. 20
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);
            }
        }
Esempio n. 21
0
        private void StaticHtmls(string loginName)
        {
            #region  融资项目
            string PersonRZ  = PersonRZTem.ToString();
            string TempSoure = Compage.Reader(PersonRZ);
            TempSoure = TempSoure.Replace("[userName]", loginName);
            string htmlpaths = PersonSuccess + "lm" + loginName + "\\rzindex.htm";
            if (!Directory.Exists(PersonSuccess + "lm" + loginName))
            {
                Directory.CreateDirectory(PersonSuccess + "lm" + loginName);
            }
            Compage.Writer(htmlpaths, TempSoure);
            #endregion
            #region  投资项目
            string PersonTZ   = PersonTZTem.ToString();
            string TempSoure1 = Compage.Reader(PersonTZ);
            TempSoure1 = TempSoure1.Replace("[userName]", loginName);
            htmlpaths  = PersonSuccess + "lm" + loginName + "\\tzindex.htm";
            Compage.Writer(htmlpaths, TempSoure1);
            #endregion

            #region  招商项目
            string PersonZS   = PersonZSTem.ToString();
            string TempSoure2 = Compage.Reader(PersonZS);
            TempSoure2 = TempSoure2.Replace("[userName]", loginName);
            htmlpaths  = PersonSuccess + "lm" + loginName + "\\zsindex.htm";
            Compage.Writer(htmlpaths, TempSoure2);
            #endregion
            #region  专业服务
            string PersonPS   = PersonPSTem.ToString();
            string TempSoure3 = Compage.Reader(PersonPS);
            TempSoure3 = TempSoure3.Replace("[userName]", loginName);
            htmlpaths  = PersonSuccess + "lm" + loginName + "\\psindex.htm";
            Compage.Writer(htmlpaths, TempSoure3);
            #endregion
            #region  最新资讯
            string PersonZX   = PersonZXTem.ToString();
            string TempSoure4 = Compage.Reader(PersonZX);
            TempSoure4 = TempSoure4.Replace("[userName]", loginName);
            htmlpaths  = PersonSuccess + "lm" + loginName + "\\zxindex.htm";
            Compage.Writer(htmlpaths, TempSoure4);
            #endregion
        }
Esempio n. 22
0
        string InvestTem  = ConfigurationManager.AppSettings["InvestCen"].ToString();       //其他成功案例模版存放位置
        /// <summary>
        /// 1,投资成本
        /// 2,园区特色
        /// 3,产业优势
        /// </summary>
        /// <param name="loginName"></param>
        /// <param name="num"></param>
        /// <returns></returns>
        public int StaticHtml(string loginName, int num)
        {
            try
            {
                string     TempFileName = InvestTem.ToString();
                string     Tem          = Compage.Reader(TempFileName); //读取模板内容
                string     TempSoure    = Tem;
                CommStatic comm         = new CommStatic();
                string     str          = "";
                string     htmlFile     = "";
                if (num == 1)
                {
                    str      = comm.GetInvestListUIByLoginName(loginName);
                    htmlFile = "InvestIF.htm";
                }
                else if (num == 2)
                {
                    str      = comm.GetParkListUIByLoginName(loginName);
                    htmlFile = "ParkIF.htm";
                }
                else if (num == 3)
                {
                    str      = comm.GetListUIByloginName(loginName);
                    htmlFile = "ProductIF.htm";
                }
                TempSoure = TempSoure.Replace("$content$", str);

                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);
            }
        }
Esempio n. 23
0
        private void StaticHtmls(string loginName)
        {
            string rzNewsTem1 = rzNewsTem.ToString();
            string TempSoure  = Compage.Reader(rzNewsTem1);

            TempSoure = TempSoure.Replace("##userName##", loginName);
            string htmlpaths = PersonSuccess + "rz" + loginName + "\\news.htm";

            if (!Directory.Exists(PersonSuccess + "rz" + loginName))
            {
                Directory.CreateDirectory(PersonSuccess + "rz" + loginName);
            }
            Compage.Writer(htmlpaths, TempSoure);

            StaticRZHtmlshouye(loginName);

            string rzXMRZ        = rzxmrzTem.ToString();
            string TempXMRZSoure = Compage.Reader(rzXMRZ);

            TempXMRZSoure = TempXMRZSoure.Replace("##userName##", loginName);
            string htmlpaths22 = PersonSuccess + "rz" + loginName + "\\teamrz.htm";

            if (!Directory.Exists(PersonSuccess + "rz" + loginName))
            {
                Directory.CreateDirectory(PersonSuccess + "rz" + loginName);
            }
            Compage.Writer(htmlpaths22, TempXMRZSoure);



            string rzLXWM       = rzlxfsTem.ToString();
            string TempLXFSoure = Compage.Reader(rzLXWM);

            TempLXFSoure = TempLXFSoure.Replace("##userName##", loginName);
            string htmlpaths33 = PersonSuccess + "rz" + loginName + "\\contentus.htm";

            if (!Directory.Exists(PersonSuccess + "rz" + loginName))
            {
                Directory.CreateDirectory(PersonSuccess + "rz" + loginName);
            }
            Compage.Writer(htmlpaths33, TempLXFSoure);
        }
Esempio n. 24
0
        string CasesTem          = ConfigurationManager.AppSettings["DKNewsListLink"].ToString(); //其他更多资讯成功案例模版存放位置
        /// <summary>
        ///创建首页更多资讯链接静态页面
        /// </summary>
        public int StaticHtml(string loginname)
        {
            try
            {
                string TempFileName = CasesTem.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容

                string TempSoure = Tem;
                List <GZS.Model.news.NewsTab> list = GetNewsTabAllByUserName(loginname);
                StringBuilder ste = new StringBuilder();
                for (int i = 0; i < list.Count; i++)
                {
                    if (i < 20)
                    {
                        ste.Append(" <li><a href='http://news.topfo.com/" + list[i].Urlhtml.ToString() + "' target=\"_blank\"><span class=\"infor-l\">" + list[i].NTitle + "</span><span  class=\"infor-r\">" + Convert.ToDateTime(list[i].Createdate).ToString("yyyy-MM-dd") + "</span></a></li>");
                    }
                }
                TempSoure = TempSoure.Replace("$cntex$", ste.ToString());
                TempSoure = TempSoure.Replace("$loginName$", loginname.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 + "/infor.htm";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
        }
Esempio n. 25
0
        public void StaticHtml(string LoginName, string Title, string KeyWord, string Descript)
        {
            string PersonTems = PersonTem.ToString();
            string TempSoure  = Compage.Reader(PersonTems);

            TempSoure = TempSoure.Replace("##UserNmae##", LoginName.ToString().Trim());
            TempSoure = TempSoure.Replace("$Title$", Title.ToString().Trim());
            TempSoure = TempSoure.Replace("$Description$", KeyWord.ToString().Trim());
            TempSoure = TempSoure.Replace("$KeyWords$", Descript.ToString().Trim());
            string htmlpaths = PersonSuccess + "rz" + LoginName + "\\index.htm";

            if (!Directory.Exists(PersonSuccess + "rz" + LoginName))
            {
                Directory.CreateDirectory(PersonSuccess + "rz" + LoginName);
            }
            Compage.Writer(htmlpaths, TempSoure);


            Company(LoginName);
            Job(LoginName);
            StaticHtmls(LoginName);
        }
Esempio n. 26
0
        string FieldTem  = ConfigurationManager.AppSettings["KXTem"].ToString();     //模版存放位置
        public int StaticHtml()
        {
            ExpressBLL bll = new ExpressBLL();

            try
            {
                DataSet       ds  = bll.GetList(20, " 1=1", " Expressdata desc");
                StringBuilder str = new StringBuilder();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    DateTime dt        = Convert.ToDateTime(dr["Expressdata"].ToString());
                    string   ordertime = dt.ToString("yyyy-MM-dd");
                    str.Append("<div class=\"let_c\"><div class=\"let_c_m\"><div class=\"let_c_m_middle\">");
                    str.Append(dr["express"].ToString());
                    str.Append("</div><div class=\"let_c_m_bottom\"><div class=\"let_c_m_bottom_b\">");
                    str.Append("<span class=\"liebiao\">日期:</span><span class=\"lienei\">");
                    str.Append(ordertime);
                    str.Append("</span></div> </div> </div> </div>");
                }
                string TempFileName = FieldTem.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容
                string TempSoure    = Tem;
                TempSoure = TempSoure.Replace("$express$", str.ToString());
                //string folder = FieldPath + DateTime.Now.ToString("yyyyMM");
                //if (!Directory.Exists(folder))
                //{
                //    Directory.CreateDirectory(folder);
                //}
                //string htmlpaths = folder + "/" + DateTime.Now.ToString("yyyyMMdd") + ".html";
                string htmlpaths = FieldPath + "index.html";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Esempio n. 27
0
 public int StaticHtml(string Field)
 {
     try
     {
         string Tem = Compage.Reader(KXTemd.ToString()); //读取模板内容
         #region 替换模版
         string TempSoure = Tem;
         TempSoure = TempSoure.Replace("$Field$", Field);
         #endregion
         string wenjian = KXPath;
         if (!Directory.Exists(wenjian))
         {
             Directory.CreateDirectory(wenjian);
         }
         string htmlpaths = wenjian + "KXNew.html";
         Compage.Writer(htmlpaths, TempSoure);
         return(1);
     }
     catch (Exception e)
     {
         return(0);
     }
 }
Esempio n. 28
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)
        {
            try
            {
                string TempFileName = CasesTem.ToString();
                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 inPathTo = "/News";

                string   sql1     = "select a.HtmlFile from MainInfoTab as a inner join NewsTab as b on a.InfoID=b.InfoID where a.InfoID=" + NewsID + "";
                string   htmlFile = Tz888.DBUtility.DbHelperSQL.GetSingle(sql1).ToString();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string wenjian = MerchantTmpPathTo + html[1].Replace("News", "");
                if (Directory.Exists(wenjian) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }

                string htmlpaths = wenjian + inPathTo + cc + "_" + NewsID + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
            #endregion
        }
Esempio n. 29
0
        /// <summary>
        ///创建招商静态页面
        /// </summary>
        /// <param name="NewsID">编号</param>
        /// <param name="title">标题</param>
        /// <param name="publishT">时间</param>
        /// <param name="Content">详细内容</param>
        public int StaticHtml(int infoID, string title, string publishT, string AreaName, string Content, string IndustryCarveOutID, string MerchantNameTotal, string validateID, string Idstuny, string IsVip, string KeyWord, string DisplayTitle, string Descript, string pic)
        {
            string Money = "";

            Tz888.BLL.Info.MarchantInfoBLL    bll   = new Tz888.BLL.Info.MarchantInfoBLL();
            Tz888.Model.Info.MerchantSetModel model = bll.GetIntegrityModel(Convert.ToInt64(infoID));

            string Type = model.MerchantInfoModel.CapitalCurrency.ToString().Trim();

            if (Type == "CNY")
            {
                Type = "人民币";
            }
            if (Type == "HKD")
            {
                Type = "港币";
            }
            if (Type == "USD")
            {
                Type = "美元";
            }
            if (model.MainInfoModel.MainPointCount.ToString().Trim() == "0")
            {
                Money = "该资源为免费资源";
            }
            else
            {
                Money = model.MainInfoModel.MainPointCount.ToString().Trim() + "元";
            }
            #region 图片属性
            string Pic1   = "";
            string Pic1_c = "";
            string Pic1_s = "";
            string Pic1_r = "";
            string Pic2   = "";
            string Pic2_c = "";
            string Pic2_s = "";
            string Pic2_r = "";
            string Pic3   = "";
            string Pic3_c = "";
            string Pic3_s = "";
            string Pic3_r = "";
            string Pic4   = "";
            string Pic4_c = "";
            string Pic4_s = "";
            string Pic4_r = "";
            string Pic5   = "";
            string Pic5_c = "";
            string Pic5_s = "";
            string Pic5_r = "";
            string Pic6   = "";
            string Pic6_c = "";
            string Pic6_s = "";
            string Pic6_r = "";
            string p1     = "";
            string p2     = "";
            string p3     = "";
            string p4     = "";
            string p5     = "";
            string p6     = "";

            #endregion
            #region 图片封装
            ArrayList arrListPic = new ArrayList();
            ArrayList arrListDoc = new ArrayList();
            if (model.InfoResourceModels != null)
            {
                foreach (Tz888.Model.Info.InfoResourceModel objModelResource in model.InfoResourceModels)
                {
                    //ResourceType 0:其他文档 1:图片 2:视频
                    if (objModelResource.ResourceType.ToString().Trim() == "1")
                    {
                        string[] arTempPic = new string[2];
                        arTempPic[0] = objModelResource.ResourceAddr.Trim();
                        arTempPic[1] = objModelResource.ResourceName.Trim();
                        arrListPic.Add(arTempPic);
                    }
                    if (objModelResource.ResourceType.ToString().Trim() == "0")
                    {
                        string[] arTempDoc = new string[2];
                        arTempDoc[0] = objModelResource.ResourceAddr.Trim();
                        arTempDoc[1] = objModelResource.ResourceName.Trim();
                        arrListDoc.Add(arTempDoc);
                    }
                }
            }

            if (arrListPic.Count > 0)
            {
                string[] sPicTemp = (string[])arrListPic[0];
                Pic1   = sPicTemp[0];
                Pic1_c = sPicTemp[1];
                //Pic1_s = Common.GetMiniPic(Pic1);
                Pic1_s = Pic1;
                Pic1_r = "<li id=\"tab_tophome_1\" class=\"on\"><a href=" + MerchantPicPath.Trim() + Pic1_s.Trim() + " target=\"_blank\"  onmousemove=\"startIndex=1;setTab('tophome',1,1,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic1_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p1     = "<div id=\"con_tophome_1\"  ><a href=" + MerchantPicPath.Trim() + Pic1_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic1_s.Trim() + "  alt=\"3\" /></a></div>";
                //Pic1_r = "<li><a href=\"" + MerchantPicPath.Trim() + Pic1_s.Trim() + "\" target=\"_blank\"><img src=\"http://www.topfo.com/V4/img/chakan.jpg\"></a></li>";
            }

            if (arrListPic.Count > 1)
            {
                string[] sPicTemp = (string[])arrListPic[1];
                Pic2   = sPicTemp[0];
                Pic2_c = sPicTemp[1];
                //Pic2_s = Common.GetMiniPic(Pic2);
                Pic2_s = Pic2;
                Pic2_r = "<li id=\"tab_tophome_2\" class=\"out\"><a href=" + MerchantPicPath.Trim() + Pic2_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=2;setTab('tophome',2,2,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic2_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p2     = "<div id=\"con_tophome_2\" class=\"hidecontent\" ><a href=" + MerchantPicPath.Trim() + Pic2_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic2_s.Trim() + "  alt=\"3\" /></a></div>";
            }
            if (arrListPic.Count > 2)
            {
                string[] sPicTemp = (string[])arrListPic[2];
                Pic3   = sPicTemp[0];
                Pic3_c = sPicTemp[1];
                //Pic3_s = Common.GetMiniPic(Pic3);
                Pic3_s = Pic3;
                Pic3_r = "<li id=\"tab_tophome_3\" class=\"out\"><a href=" + MerchantPicPath.Trim() + Pic3_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=6;setTab('tophome',3,3,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic3_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p3     = "<div id=\"con_tophome_3\"  class=\"hidecontent\"><a href=" + MerchantPicPath.Trim() + Pic3_s.Trim() + "  target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic3_s.Trim() + "  alt=\"3\" /></a></div>";
                //Pic3_r = "<li><a href=\"" + MerchantPicPath.Trim() + Pic3_s.Trim() + "\" target=\"_blank\"><img src=\"http://www.topfo.com/V4/img/chakan.jpg\"></a></li>";
            }
            if (arrListPic.Count > 3)
            {
                string[] sPicTemp = (string[])arrListPic[3];
                Pic4   = sPicTemp[0];
                Pic4_c = sPicTemp[1];
                //Pic4_s = Common.GetMiniPic(Pic4);
                Pic4_s = Pic4;
                Pic4_r = "<li id=\"tab_tophome_4\" class=\"out\"><a href=" + MerchantPicPath.Trim() + Pic4_s.Trim() + " target=\"_blank\"  onmousemove=\"startIndex=4;setTab('tophome',4,4,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic4_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p4     = "<div id=\"con_tophome_4\"  class=\"hidecontent\"><a href=" + MerchantPicPath.Trim() + Pic4_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic4_s.Trim() + "  alt=\"3\" /></a></div>";

                //Pic4_r = "<li><a href=\"" + MerchantPicPath.Trim() + Pic4_s.Trim() + "\" target=\"_blank\"><img src=\"http://www.topfo.com/V4/img/chakan.jpg\"></a></li>";
            }
            if (arrListPic.Count > 4)
            {
                string[] sPicTemp = (string[])arrListPic[4];
                Pic5   = sPicTemp[0];
                Pic5_c = sPicTemp[1];
                //Pic5_s = Common.GetMiniPic(Pic5);
                Pic5_s = Pic5;
                Pic5_r = "<li id=\"tab_tophome_5\" class=\"out\"><a href=" + MerchantPicPath.Trim() + Pic5_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=5;setTab('tophome',5,5,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic5_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p5     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><a href=" + MerchantPicPath.Trim() + Pic5_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic5_s.Trim() + "  alt=\"3\" /></a></div>";

                //Pic5_r = "<li><a href=\"" + MerchantPicPath.Trim() + Pic5_s.Trim() + "\" target=\"_blank\"><img src=\"http://www.topfo.com/V4/img/chakan.jpg\"></a></li>";
            }
            if (arrListPic.Count > 5)
            {
                string[] sPicTemp = (string[])arrListPic[5];
                Pic6   = sPicTemp[0];
                Pic6_c = sPicTemp[1];
                //Pic6_s = Common.GetMiniPic(Pic6);
                Pic6_s = Pic6;
                Pic6_r = "<li id=\"tab_tophome_6\" class=\"out\"><a href=" + MerchantPicPath.Trim() + Pic6_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=6;setTab('tophome',6,6,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + MerchantPicPath.Trim() + Pic6_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p6     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><a href=" + MerchantPicPath.Trim() + Pic6_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + MerchantPicPath.Trim() + Pic6_s.Trim() + "  alt=\"3\" /></a></div>";

                //Pic6_r = "<li><a href=\"" + MerchantPicPath.Trim() + Pic6_s.Trim() + "\" target=\"_blank\"><img src=\"http://www.topfo.com/V4/img/chakan.jpg\"></a></li>";
            }


            #endregion
            if (pic == "0")
            {
                pic = "面谈";
            }
            else
            {
                pic = pic + "%";
            }
            try
            {
                string TempFileName = Merchant.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容
                #region 替换模版
                string TempSoure = Tem;
                TempSoure = TempSoure.Replace("$infoID$", Convert.ToString(infoID));
                TempSoure = TempSoure.Replace("$title$", title);                                       //标题
                TempSoure = TempSoure.Replace("$publishT$", publishT);                                 //时间
                TempSoure = TempSoure.Replace("$AreaName$", AreaName);                                 //区域
                TempSoure = TempSoure.Replace("$Content$", Content);                                   //内容
                TempSoure = TempSoure.Replace("$IndustryCarveOutID$", IndustryCarveOutID);             //行业
                TempSoure = TempSoure.Replace("$MerchantNameTotal$", MerchantNameTotal + "万元" + Type); //总投资金额
                TempSoure = TempSoure.Replace("$validateID$", validateID);                             //有效期
                TempSoure = TempSoure.Replace("$XianXi$", Idstuny);                                    //详细信息
                TempSoure = TempSoure.Replace("$Merchant$", IsVip);                                    //设置重大投资
                TempSoure = TempSoure.Replace("$KeyWord$", KeyWord);                                   //网页关键字
                TempSoure = TempSoure.Replace("$Descript$", Descript);                                 //网页描述
                TempSoure = TempSoure.Replace("$DisplayTitle$", DisplayTitle);                         //网页标题
                TempSoure = TempSoure.Replace("$pic$", pic);                                           //关键字
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic1#", Pic1_r);
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic2#", Pic2_r);
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic3#", Pic3_r);
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic4#", Pic4_r);
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic5#", Pic5_r);
                TempSoure = TempSoure.Replace("#@TmpFeild-Pic6#", Pic6_r);
                TempSoure = TempSoure.Replace("#@p1@#", p1);
                TempSoure = TempSoure.Replace("#@p2@#", p2);
                TempSoure = TempSoure.Replace("#@p3@#", p3);
                TempSoure = TempSoure.Replace("#@p4@#", p4);
                TempSoure = TempSoure.Replace("#@p5@#", p5);
                TempSoure = TempSoure.Replace("#@p6@#", p6);
                TempSoure = TempSoure.Replace("$Money$", Money);
                if (arrListPic.Count == 0)
                {
                    string tupian = "display:none";

                    TempSoure = TempSoure.Replace("$tupian$", tupian);
                }
                else
                {
                    string tupian = "display:block";

                    TempSoure = TempSoure.Replace("$tupian$", tupian);
                }



                #endregion
                #region
                string inPathTo = "/Merchant";

                string   sql1     = "select a.HtmlFile from MainInfoTab as a inner join MerchantInfoTab as b on a.InfoID=b.InfoID where a.InfoID=" + infoID + "";
                string   htmlFile = Tz888.DBUtility.DbHelperSQL.GetSingle(sql1).ToString();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string wenjian = MerchantTmpPathTo + html[1].Replace("Merchant", "");
                if (Directory.Exists(wenjian) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }

                string htmlpaths = wenjian + inPathTo + cc + "_" + infoID + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
            #endregion
        }
Esempio n. 30
0
        string CasesTem          = ConfigurationManager.AppSettings["DKMerchantTem"].ToString(); //其他成功案例模版存放位置
        #region 创建招商静态页面
        /// <summary>
        ///创建贷款静态页面
        /// </summary>
        public int StaticHtml(int loansInfoID)
        {
            Tz888.BLL.loansInfoTab     loansinfotabbll     = new loansInfoTab();
            Tz888.BLL.LoansInfo        loansinfobll        = new LoansInfo();
            Tz888.BLL.loanscontactsTab loanscontactstabbll = new loanscontactsTab();

            Tz888.Model.LoansInfoTab     loansinfotab     = loansinfotabbll.GetLoansInfoTabByLoansInfoId(loansInfoID);
            Tz888.Model.LoansInfo        loansinfo        = loansinfobll.GetLoansInfoByLoansInfoId(loansInfoID);
            Tz888.Model.LoanscontactsTab loanscontactstab = loanscontactstabbll.GetLoanscontactsTabByLoansInfoId(loansInfoID);
            try
            {
                string proviceID    = loansinfo.ProvinceID.ToString().Trim();
                string TempFileName = CasesTem.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容
                #region 替换模版
                string TempSoure = Tem;
                TempSoure = TempSoure.Replace("$title$", loansinfotab.LoansTitle.ToString().Trim());
                string ProvinceID   = loansinfo.ProvinceID.ToString().Trim();
                string provincename = loansinfobll.GetProvinceNameByProvinceId(ProvinceID).Trim();
                if (provincename.Trim() == "")
                {
                    provincename = "中国";
                }
                string deadlineriqi = "";
                if (loansinfo.Deadline == 3)
                {
                    deadlineriqi = "3个月";
                }
                if (loansinfo.Deadline == 6)
                {
                    deadlineriqi = "半年";
                }
                if (loansinfo.Deadline == 12)
                {
                    deadlineriqi = "1年";
                }
                if (loansinfo.Deadline == 24)
                {
                    deadlineriqi = "2年";
                }
                if (loansinfo.Deadline == 36)
                {
                    deadlineriqi = "3年";
                }
                if (loansinfo.Deadline == 60)
                {
                    deadlineriqi = "5年";
                }
                string systime = "";
                if (loansinfo.ValidityID == 3)
                {
                    systime = "3个月";
                }
                if (loansinfo.ValidityID == 6)
                {
                    systime = "半年";
                }
                if (loansinfo.ValidityID == 12)
                {
                    systime = "1年";
                }
                if (loansinfo.ValidityID == 24)
                {
                    systime = "2年";
                }
                if (loansinfo.ValidityID == 36)
                {
                    systime = "3年";
                }
                if (loansinfo.ValidityID == 60)
                {
                    systime = "5年";
                }
                string danbao = "";
                if (loansinfo.Guarantee == 0)
                {
                    danbao = "担保";
                }
                if (loansinfo.Guarantee == 1)
                {
                    danbao = "抵押";
                }
                if (loansinfo.Guarantee == 2)
                {
                    danbao = "信用";
                }
                string titlesystemname = sethtml();
                string hai             = "";
                if (loansinfo.Reimbursement == 0)
                {
                    hai = "月";
                }
                if (loansinfo.Reimbursement == 1)
                {
                    hai = "季";
                }
                if (loansinfo.Reimbursement == 2)
                {
                    hai = "年";
                }
                string xiangxi = sethtmls(loansinfo.ProvinceID.ToString().Trim());
                TempSoure = TempSoure.Replace("$infoID$", loansInfoID.ToString().Trim());
                TempSoure = TempSoure.Replace("$loansTitle$", loansinfotab.LoansTitle.ToString().Trim());
                TempSoure = TempSoure.Replace("$Are$", provincename);
                TempSoure = TempSoure.Replace("$money$", loansinfo.Amount.ToString().Trim());
                TempSoure = TempSoure.Replace("$borrowmoneyqixian$", deadlineriqi.ToString().Trim());
                TempSoure = TempSoure.Replace("$danbaotype$", danbao.ToString().Trim());
                TempSoure = TempSoure.Replace("$publishdate$", loansinfotab.Loansdate.ToString().Trim().Substring(0, 9));
                TempSoure = TempSoure.Replace("$systime$", systime.ToString().Trim());
                TempSoure = TempSoure.Replace("$Content$", loansinfo.BorrowingUse.ToString().Trim());
                TempSoure = TempSoure.Replace("$Titlesytem$", titlesystemname.ToString().Trim());
                TempSoure = TempSoure.Replace("$DisplayTitle$", loansinfo.Title.ToString().Trim());
                TempSoure = TempSoure.Replace("$KeyWord$", loansinfo.Keywords.ToString().Trim());
                TempSoure = TempSoure.Replace("$description$", loansinfo.Description.ToString().Trim());
                TempSoure = TempSoure.Replace("$haifangshi$", hai.ToString().Trim());
                TempSoure = TempSoure.Replace("$XianXi$", xiangxi);


                #endregion
                #region

                string inPathTo = "/loans";

                string   htmlFile = loansinfotab.Url.ToString().Trim();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string wenjian = MerchantTmpPathTo + html[1].Replace("loans", "");
                if (Directory.Exists(wenjian) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }

                string htmlpaths = wenjian + inPathTo + cc + "_" + loansInfoID + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }

            catch (Exception e)
            {
                return(0);
            }
            #endregion
        }