Ejemplo n.º 1
0
        string FieldTem  = ConfigurationManager.AppSettings["FieldTem"].ToString();     //模版存放位置

        #region 成功案例静态页面生成
        /// <summary>
        /// 成功案例静态页面生成
        /// </summary>
        /// <param name="NewsID">编号</param>
        /// <param name="title">标题</param>
        /// <param name="publishT">时间</param>
        /// <param name="Content">详细内容</param>
        public void StaticHtml(string Field, string num)
        {
            string Tem = Compage.Reader(FieldTem.ToString()); //读取模板内容

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


            string wenjian = MerchantTmpPathTo;
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }
            string htmlpaths = "";
            if (num == "1")//招商
            {
                htmlpaths = wenjian + "Merchant.shtml";
            }
            else if (num == "2")//融资
            {
                htmlpaths = wenjian + "Project.shtml";
            }
            else if (num == "3")//投资
            {
                htmlpaths = wenjian + "Capital.shtml";
            }
            Compage.Writer(htmlpaths, TempSoure);
        }
Ejemplo n.º 2
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 InfoID, string title, string publishT, string laiyuan, string zuozhe, string Content, string TypeID)
        {
            string TempFileName = "";
            string keep         = "<a target='_blank' href='http://member.topfo.com/helper/CollectingInfo.aspx?infoid=" + NewsID + "'>收藏本页</a>";

            if (TypeID == "01")
            {
                TempFileName = CasesMerchant.ToString();
            }
            else if (TypeID == "02")
            {
                TempFileName = CasesProject.ToString();
            }
            else if (TypeID == "08")
            {
                TempFileName = CasesCapital.ToString();
            }
            else
            {
                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);
            TempSoure = TempSoure.Replace("$keep$", keep);
            TempSoure = TempSoure.Replace("$InfoID$", InfoID);
            TempSoure = TempSoure.Replace("$laiyuan$", laiyuan);
            TempSoure = TempSoure.Replace("$zuozhe$", zuozhe);
            #endregion

            string inPathTo = "Cases";

            string   sql1     = "select a.HtmlFile from MainInfoTab as a inner join CasesInfoTab 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("Cases", "");
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }

            string htmlpaths = wenjian + "\\" + inPathTo + cc + "_" + NewsID + ".shtml";
            Compage.Writer(htmlpaths, TempSoure);
        }
Ejemplo n.º 3
0
        string FieldTem  = ConfigurationManager.AppSettings["FieldTem"].ToString();     //模版存放位置

        #region 成功案例静态页面生成
        /// <summary>
        /// 成功案例静态页面生成
        /// </summary>
        /// <param name="NewsID">编号</param>
        /// <param name="title">标题</param>
        /// <param name="publishT">时间</param>
        /// <param name="Content">详细内容</param>
        public int StaticHtml(string Field, string 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) == false)
                {
                    Directory.CreateDirectory(wenjian);
                }
                string htmlpaths = "";
                if (num == "1")//招商
                {
                    htmlpaths = wenjian + "Merchant.shtml";
                }
                else if (num == "2")//融资
                {
                    htmlpaths = wenjian + "Project.shtml";
                }
                else if (num == "3")//投资
                {
                    htmlpaths = wenjian + "Capital.shtml";
                }
                else if (num == "4")//投资
                {
                    htmlpaths = wenjian + "union.shtml";
                }

                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception e)
            {
                return(0);
            }
        }
Ejemplo n.º 4
0
        public void ProjectZqHtml(string InfoID, string ProjectName, string ComAbout, string CountryCode, string ProvinceID,
                                  string CItyID, string CountyID, string IndustryBID, string CapitalTotal, string iZqYqjjdwqk,
                                  string iZqXmyxqs, string PublishT, string ComBrief, string ManageTeamAbout, string DisplayTitle, string KeyWord,
                                  string Descript, int num, string lated, string MainPoint, string FixPriceID)
        {
            ProjectSetModel TheProject = new ProjectSetModel();
            string          style      = "display:none";

            #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 图片属性
            TheProject = this.objGetProjectInfoByInfoID(long.Parse(InfoID.Trim()));
            string NameTotal = TheProject.ProjectInfoModel.CapitalName.Trim();
            if (NameTotal == "0")
            {
                NameTotal = "暂未填写";
            }
            ArrayList arrListPic = new ArrayList();
            ArrayList arrListDoc = new ArrayList();
            if (TheProject.InfoResourceModels != null)
            {
                foreach (Tz888.Model.Info.InfoResourceModel objModelResource in TheProject.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=" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p1     = "<div id=\"con_tophome_1\"  ><a href=" + ProjectPicPath.Trim() + Pic1_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "  alt=\"3\" /></a></div>";
                //Pic1_r = "<li><a href=\"" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onmousemove=\"startIndex=2;setTab('tophome',2,2,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + ProjectPicPath.Trim() + Pic2_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p2     = "<div id=\"con_tophome_2\" class=\"hidecontent\" ><a href=" + ProjectPicPath.Trim() + Pic1_s.Trim() + " target=\"_blank\"   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onmousemove=\"startIndex=6;setTab('tophome',3,3,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + ProjectPicPath.Trim() + Pic3_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p3     = "<div id=\"con_tophome_3\"  class=\"hidecontent\"><a href=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.Trim() + Pic3_s.Trim() + "  alt=\"3\" /></a></div>";
                //Pic3_r = "<li><a href=\"" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "  onmousemove=\"startIndex=4;setTab('tophome',4,4,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + ProjectPicPath.Trim() + Pic4_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p4     = "<div id=\"con_tophome_4\"  class=\"hidecontent\"><a href=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.Trim() + Pic4_s.Trim() + "  alt=\"3\" /></a></div>";

                //Pic4_r = "<li><a href=\"" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onmousemove=\"startIndex=5;setTab('tophome',5,5,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + ProjectPicPath.Trim() + Pic5_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p5     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><a href=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.Trim() + Pic5_s.Trim() + "  alt=\"3\" /></a></div>";

                //Pic5_r = "<li><a href=\"" + ProjectPicPath.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=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "   onmousemove=\"startIndex=6;setTab('tophome',6,6,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + ProjectPicPath.Trim() + Pic6_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                p6     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><ahref=" + ProjectPicPath.Trim() + Pic1_s.Trim() + "  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + ProjectPicPath.Trim() + Pic6_s.Trim() + "  alt=\"3\" /></a></div>";

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


            #endregion
            string TempFileName = "";
            if (num == 1)//为债权融资
            {
                TempFileName = ZqTerm.ToString();
            }
            else if (num == 2)//股权融资$MainPoint$
            {
                TempFileName = GqTerm.ToString();
            }
            string Tem = Compage.Reader(TempFileName); //读取模板内容
            #region 替换模版
            string TempSoure = Tem;
            TempSoure = TempSoure.Replace("$ProjectName$", ProjectName);
            TempSoure = TempSoure.Replace("$ComAbout$", ComAbout);
            TempSoure = TempSoure.Replace("$CountryCode$", CountryCode);
            TempSoure = TempSoure.Replace("$ProvinceID$", ProvinceID);
            TempSoure = TempSoure.Replace("$CItyID$", CItyID);
            TempSoure = TempSoure.Replace("$CountyID$", CountyID);
            TempSoure = TempSoure.Replace("$IndustryBID$", IndustryBID);

            TempSoure = TempSoure.Replace("$CapitalTotal$", CapitalTotal);
            TempSoure = TempSoure.Replace("$iZqYqjjdwqk$", iZqYqjjdwqk);
            TempSoure = TempSoure.Replace("$iZqXmyxqs$", iZqXmyxqs);
            TempSoure = TempSoure.Replace("$PublishT$", PublishT);
            TempSoure = TempSoure.Replace("$DisplayTitle$", DisplayTitle);
            TempSoure = TempSoure.Replace("$KeyWord$", KeyWord);
            TempSoure = TempSoure.Replace("$Descript$", Descript);
            TempSoure = TempSoure.Replace("$InfoID$", InfoID);
            TempSoure = TempSoure.Replace("$ComBrief$", ComBrief);
            TempSoure = TempSoure.Replace("$ManageTeamAbout$", ManageTeamAbout);

            TempSoure = TempSoure.Replace("$lated$", lated);
            TempSoure = TempSoure.Replace("$MainPoint$", MainPoint);
            TempSoure = TempSoure.Replace("$FixPriceID$", FixPriceID);
            TempSoure = TempSoure.Replace("$Pic$", Pic1_r);
            TempSoure = TempSoure.Replace("$NameToal$", NameTotal);
            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);
            if (arrListPic.Count == 0)
            {
                string tupian = "display:none";

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

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


            if (ManageTeamAbout == "")
            {
                TempSoure = TempSoure.Replace("$tudui$", style);
            }
            else
            {
                TempSoure = TempSoure.Replace("$tudui$", "display:block");
            }
            #endregion
            string         sql  = "select HtmlFile from MainInfoTab  where InfoID=@InfoID";
            SqlParameter[] para =
            {
                new SqlParameter("@InfoID", SqlDbType.VarChar, 100)
            };
            para[0].Value = InfoID;
            string   htmlFile = Tz888.DBUtility.DbHelperSQL.GetSingle(sql, para).ToString();
            string[] html     = htmlFile.Split('/');
            string[] ht       = html[2].Split('_');
            string   wenjian  = ProjectPath + html[1].ToString();
            if (Directory.Exists(wenjian) == false)
            {
                Directory.CreateDirectory(wenjian);
            }
            string htmlpaths = wenjian + "\\" + ht[0].ToString() + "_" + InfoID + ".shtml";
            Compage.Writer(htmlpaths, TempSoure);
        }