Esempio n. 1
0
        /// <summary>
        /// 获取一个完整的投资资源信息实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public Tz888.Model.Info.V124.CapitalSetModel GetIntegrityModel(long InfoID)
        {
            Tz888.Model.Info.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();
            //获取主要信息
            MainInfoDAL obj1 = new MainInfoDAL();

            model.MainInfoModel = obj1.GetModel(InfoID);

            //获取投资资源个性信息
            model.CapitalInfoModel = this.GetModel(InfoID);

            //获取信息联系方式
            InfoContactDAL obj3 = new InfoContactDAL();

            model.InfoContactModel = obj3.GetModel(InfoID);

            //获取信息投资区域
            CapitalInfoAreaDAL obj6 = new CapitalInfoAreaDAL();

            model.CapitalInfoAreaModels = obj6.GetModelList(InfoID);

            //短信息
            ShortInfoDAL obj7 = new ShortInfoDAL();

            model.ShortInfoModel = obj7.GetModel(InfoID);

            InfoResourceDAL obj8 = new InfoResourceDAL();

            model.InfoResourceModels = obj8.GetModelList(InfoID);

            return(model);
        }
Esempio n. 2
0
        /// <summary>
        /// 修改投资资源
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Update(Tz888.Model.Info.V124.CapitalSetModel model)
        {
            SqlParameter[] parameters =
            {
                //主表信息
                new SqlParameter("@InfoID",                      SqlDbType.BigInt,           8),
                new SqlParameter("@Title",                       SqlDbType.VarChar,        100),
                new SqlParameter("@publishT",                    SqlDbType.DateTime),
                new SqlParameter("@LoginName",                   SqlDbType.Char,            10),

                new SqlParameter("@KeyWord",                     SqlDbType.VarChar,         50),
                new SqlParameter("@Descript",                    SqlDbType.VarChar,        100),
                new SqlParameter("@DisplayTitle",                SqlDbType.VarChar,         50),
                new SqlParameter("@FrontDisplayTime",            SqlDbType.SmallDateTime),
                new SqlParameter("@ValidateStartTime",           SqlDbType.SmallDateTime),
                new SqlParameter("@ValidateTerm",                SqlDbType.Int,              4),
                new SqlParameter("@TemplateID",                  SqlDbType.Char,            10),
                //new SqlParameter("@HtmlFile", SqlDbType.VarChar,100),
                new SqlParameter("@AuditingStatus",              SqlDbType.TinyInt,          1),
                //投资资源表信息
                new SqlParameter("@IndustryBID",                 SqlDbType.Char,            10),
                new SqlParameter("@CooperationDemandType",       SqlDbType.Char,            30),
                new SqlParameter("@currency",                    SqlDbType.Char,            10),
                new SqlParameter("@CapitalID",                   SqlDbType.Char,            10),
                new SqlParameter("@CapitalTypeID",               SqlDbType.Char,            10),
                new SqlParameter("@ComAbout",                    SqlDbType.VarChar,         -1),
                new SqlParameter("@ComBreif",                    SqlDbType.VarChar,         -1),
                new SqlParameter("@Remrk",                       SqlDbType.VarChar,        200),
                new SqlParameter("@isVIP",                       SqlDbType.TinyInt,          1),
                new SqlParameter("@stageID",                     SqlDbType.TinyInt,          1),
                new SqlParameter("@joinManageID",                SqlDbType.TinyInt,          1),
                new SqlParameter("@CooperationDemandTypeRemark", SqlDbType.VarChar,         -1),

                //联系信息
                new SqlParameter("@ComName",                     SqlDbType.VarChar,         40),
                new SqlParameter("@OrgIntro",                    SqlDbType.Text,            -1),
                new SqlParameter("@LinkMan",                     SqlDbType.VarChar,         20),
                new SqlParameter("@TelCountryCode",              SqlDbType.Char,             3),
                new SqlParameter("@TelStateCode",                SqlDbType.Char,             4),
                new SqlParameter("@TelNum",                      SqlDbType.VarChar,         60),
                new SqlParameter("@FaxCountryCode",              SqlDbType.Char,             3),
                new SqlParameter("@FaxStateCode",                SqlDbType.Char,             4),
                new SqlParameter("@FaxNum",                      SqlDbType.VarChar,         60),

                new SqlParameter("@Mobile",                      SqlDbType.VarChar,         30),
                new SqlParameter("@Address",                     SqlDbType.VarChar,        100),
                new SqlParameter("@PostCode",                    SqlDbType.VarChar,         10),
                new SqlParameter("@Email",                       SqlDbType.VarChar,         50),
                new SqlParameter("@WebSite",                     SqlDbType.VarChar,        200),

                //短信息
                new SqlParameter("@ShortInfoControlID",          SqlDbType.Char,            20),
                new SqlParameter("@ShortTitle",                  SqlDbType.VarChar,        100),
                new SqlParameter("@ShortContent",                SqlDbType.VarChar,        100),
                new SqlParameter("@strRemark",                   SqlDbType.VarChar,         50),
                //2010-06-12新增的
                //添加资本资源的其他参数
                new SqlParameter("@RegisteredCapital",           SqlDbType.Char,            30),
                new SqlParameter("@TeamScale",                   SqlDbType.Char,            30),
                new SqlParameter("@AverageInvestment",           SqlDbType.Char,            30),
                new SqlParameter("@SuccessfulInvestment",        SqlDbType.Char,            30),
                new SqlParameter("@InvestmentDemand",            SqlDbType.NVarChar,       100),
                new SqlParameter("@CountryID",                   SqlDbType.Char,            10),
                new SqlParameter("@ProvinceID",                  SqlDbType.Char,            10),
                new SqlParameter("@CityID",                      SqlDbType.Char,            10),
                new SqlParameter("@CountyID",                    SqlDbType.Char,            10),
                new SqlParameter("@Prorganizers",                SqlDbType.NVarChar,       100), //10
                //new SqlParameter("@AuditingStatus",SqlDbType.TinyInt,1), //10
                new SqlParameter("@Position",                    SqlDbType.VarChar,         50), //10
            };
            parameters[0].Value  = model.MainInfoModel.InfoID;
            parameters[1].Value  = model.MainInfoModel.Title;
            parameters[2].Value  = model.MainInfoModel.publishT;
            parameters[3].Value  = model.MainInfoModel.LoginName;
            parameters[4].Value  = model.MainInfoModel.KeyWord;
            parameters[5].Value  = model.MainInfoModel.Descript;
            parameters[6].Value  = model.MainInfoModel.DisplayTitle;
            parameters[7].Value  = model.MainInfoModel.FrontDisplayTime;
            parameters[8].Value  = model.MainInfoModel.ValidateStartTime;
            parameters[9].Value  = model.MainInfoModel.ValidateTerm;
            parameters[10].Value = model.MainInfoModel.TemplateID;
            parameters[11].Value = model.MainInfoModel.AuditingStatus;

            parameters[12].Value = model.CapitalInfoModel.IndustryBID;
            parameters[13].Value = model.CapitalInfoModel.CooperationDemandType;
            parameters[14].Value = model.CapitalInfoModel.currency;
            parameters[15].Value = model.CapitalInfoModel.CapitalID;
            parameters[16].Value = model.CapitalInfoModel.CapitalTypeID;
            parameters[17].Value = model.CapitalInfoModel.ComAbout;
            parameters[18].Value = model.CapitalInfoModel.ComBreif;
            parameters[19].Value = model.CapitalInfoModel.Remrk;
            parameters[20].Value = model.CapitalInfoModel.isVIP;
            parameters[21].Value = model.CapitalInfoModel.stageID;
            parameters[22].Value = model.CapitalInfoModel.joinManageID;
            parameters[23].Value = model.CapitalInfoModel.CooperationDemandTypeRemark;

            parameters[24].Value = model.InfoContactModel.OrganizationName;
            parameters[25].Value = model.InfoContactModel.OrgIntro;
            parameters[26].Value = model.InfoContactModel.Name;
            parameters[27].Value = model.InfoContactModel.TelCountryCode;
            parameters[28].Value = model.InfoContactModel.TelStateCode;
            parameters[29].Value = model.InfoContactModel.TelNum;
            parameters[30].Value = model.InfoContactModel.FaxCountryCode;
            parameters[31].Value = model.InfoContactModel.FaxStateCode;
            parameters[32].Value = model.InfoContactModel.FaxNum;
            parameters[33].Value = model.InfoContactModel.Mobile;
            parameters[34].Value = model.InfoContactModel.Address;
            parameters[35].Value = model.InfoContactModel.PostCode;
            parameters[36].Value = model.InfoContactModel.Email;
            parameters[37].Value = model.InfoContactModel.WebSite;

            parameters[38].Value = model.ShortInfoModel.ShortInfoControlID;
            parameters[39].Value = model.ShortInfoModel.ShortTitle;
            parameters[40].Value = model.ShortInfoModel.ShortContent;
            parameters[41].Value = model.ShortInfoModel.Remark;
            //新加的资本资源的 参数

            parameters[42].Value = model.CapitalInfoModel.RegisteredCapital;
            parameters[43].Value = model.CapitalInfoModel.TeamScale;
            parameters[44].Value = model.CapitalInfoModel.AverageInvestment;
            parameters[45].Value = model.CapitalInfoModel.SuccessfulInvestment;
            parameters[46].Value = model.CapitalInfoModel.InvestmentDemand;
            parameters[47].Value = model.CapitalInfoModel.SCountryID;
            parameters[48].Value = model.CapitalInfoModel.SProvinceID;
            parameters[49].Value = model.CapitalInfoModel.SCityID;
            parameters[50].Value = model.CapitalInfoModel.SCountyID;
            parameters[51].Value = model.CapitalInfoModel.Prorganizers;
            //parameters[52].Value = model.MainInfoModel.AuditingStatus;
            parameters[52].Value = model.InfoContactModel.Position;
            //end
            bool ReturnValue = false;
            long infoID      = model.MainInfoModel.InfoID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    int rowsAffected;
                    //插入投资资源信息
                    DbHelperSQL.RunProcedure(sqlConn, sqlTran, "CapitalInfoTab_Update", parameters, out rowsAffected);

                    string countrycode = "";
                    string ProvinceID  = "";
                    string CityID      = "";
                    string countyID    = "";

                    //为投资资源更新投资区域信息
                    Tz888.SQLServerDAL.Info.CapitalInfoAreaDAL obj1 = new CapitalInfoAreaDAL();
                    obj1.DeleteByInfoID(sqlConn, sqlTran, infoID);
                    if (model.CapitalInfoAreaModels != null)
                    {
                        foreach (Tz888.Model.Info.CapitalInfoAreaModel tmpModel in model.CapitalInfoAreaModels)
                        {
                            tmpModel.InfoID = infoID;
                            obj1.Insert(sqlConn, sqlTran, tmpModel);

                            if (!string.IsNullOrEmpty(tmpModel.CountryCode))
                            {
                                countrycode += tmpModel.CountryCode.Trim() + ",";
                            }
                            if (!string.IsNullOrEmpty(tmpModel.ProvinceID))
                            {
                                ProvinceID += tmpModel.ProvinceID.Trim() + ",";
                            }
                            if (!string.IsNullOrEmpty(tmpModel.CityID))
                            {
                                CityID += tmpModel.CityID.Trim() + ",";
                            }
                            if (!string.IsNullOrEmpty(tmpModel.CountyID))
                            {
                                countyID += tmpModel.CountyID.Trim() + ",";
                            }
                        }
                    }
                    ReturnValue = true;

                    //序列化投资区域信息
                    this.CapitalInfoAreaQuery(infoID, countrycode, ProvinceID, CityID, countyID);

                    sqlTran.Commit();
                }
                catch
                {
                    sqlTran.Rollback();
                    ReturnValue = false;
                }
                finally
                {
                    sqlConn.Close();
                }
            }
            return(ReturnValue);
        }
Esempio n. 3
0
        private const string CapitalPicPath = "http://images.topfo.com/";                        //图片路径



        #region 投资模版静态页面
        /// <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 CooperationTypeName, string Money, string validateID, string MerchantNameTotal, string Idstuny, string pic, string IsVip, string KeyWord, string DisplayTitle, string Descript, string Register)
        {
            try
            {
                Tz888.BLL.Info.V124.CapitalInfoBLL    bll   = new Tz888.BLL.Info.V124.CapitalInfoBLL();
                Tz888.Model.Info.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();
                model = bll.GetIntegrityModel(infoID);
                #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=" + CapitalPicPath.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=" + CapitalPicPath.Trim() + Pic1_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p1     = "<div id=\"con_tophome_1\"  ><a href=" + CapitalPicPath.Trim() + Pic1_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.Trim() + Pic1_s.Trim() + "  alt=\"3\" /></a></div>";
                }

                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=" + CapitalPicPath.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=" + CapitalPicPath.Trim() + Pic2_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p2     = "<div id=\"con_tophome_2\"  class=\"hidecontent\"><a href=" + CapitalPicPath.Trim() + Pic2_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.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=" + CapitalPicPath.Trim() + Pic3_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=3;setTab('tophome',3,3,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + CapitalPicPath.Trim() + Pic3_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p3     = "<div id=\"con_tophome_3\"  class=\"hidecontent\"><a href=" + CapitalPicPath.Trim() + Pic3_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.Trim() + Pic3_s.Trim() + "  alt=\"3\" /></a></div>";
                }
                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=" + CapitalPicPath.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=" + CapitalPicPath.Trim() + Pic4_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p4     = "<div id=\"con_tophome_4\"  class=\"hidecontent\"><a href=" + CapitalPicPath.Trim() + Pic4_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.Trim() + Pic4_s.Trim() + "  alt=\"3\" /></a></div>";
                }
                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=" + CapitalPicPath.Trim() + Pic5_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=45;setTab('tophome',5,5,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + CapitalPicPath.Trim() + Pic5_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p5     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><a href=" + CapitalPicPath.Trim() + Pic5_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.Trim() + Pic5_s.Trim() + "  alt=\"3\" /></a></div>";
                }
                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_5\" class=\"out\"><a href=" + CapitalPicPath.Trim() + Pic6_s.Trim() + " target=\"_blank\"   onmousemove=\"startIndex=45;setTab('tophome'6,6,'out','on');\" onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.SOSO_2'});\"><img src=" + CapitalPicPath.Trim() + Pic6_s.Trim() + " class=\"tab_img\" alt=\"4\"/></a></li>";
                    p6     = "<div id=\"con_tophome_5\"  class=\"hidecontent\"><a href=" + CapitalPicPath.Trim() + Pic6_s.Trim() + " target=\"_blank\"  onclick=\"javascript:pgvSendClick({hottag:'KF.SERVICE.INDEX.STUDY_1'});\"><img  src=" + CapitalPicPath.Trim() + Pic6_s.Trim() + "  alt=\"3\" /></a></div>";
                }


                #endregion
                if (Register == "%")
                {
                    Register = "面谈";
                }
                if (AreaName == "")
                {
                    AreaName = "全国";
                }
                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("$State$", CooperationTypeName);             //投资方式
                TempSoure = TempSoure.Replace("$Money$", Money);                           //收费资源
                TempSoure = TempSoure.Replace("$validateID$", validateID);                 //有效期
                TempSoure = TempSoure.Replace("$MerchantNameTotal$", MerchantNameTotal);   //投资金额
                TempSoure = TempSoure.Replace("$XianXi$", Idstuny);                        //详细信息
                //TempSoure = TempSoure.Replace("$pic$", pic);//图片   //暂时不用
                TempSoure = TempSoure.Replace("$Register$", Register);                     //投资回报率
                TempSoure = TempSoure.Replace("$ZhongDa$", IsVip);                         //重大投资项目
                TempSoure = TempSoure.Replace("$KeyWord$", KeyWord);                       //网页关键字
                TempSoure = TempSoure.Replace("$Descript$", Descript);                     //网页描述
                TempSoure = TempSoure.Replace("$DisplayTitle$", DisplayTitle);             //网页标题
                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);
                }


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

                string   sql1     = "select a.HtmlFile from MainInfoTab as a inner join CapitalInfoTab 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("Capital", "");
                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. 4
0
 public bool Update(Tz888.Model.Info.V124.CapitalSetModel model)
 {
     return(dal.Update(model));
 }
Esempio n. 5
0
        /// <summary>
        /// 通过InfoID获取一个Merchant的信息实体
        /// </summary>
        /// <returns></returns>
        public PageStatic objGetMerchantInfoByInfoID(long InfoID)
        {
            PageStatic      page       = new PageStatic();
            CapitalSetModel theCapital = new CapitalSetModel();

            Tz888.BLL.Info.V124.CapitalInfoBLL    bll   = new Tz888.BLL.Info.V124.CapitalInfoBLL();
            Tz888.Model.Info.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();
            model = bll.GetIntegrityModel(InfoID);

            page.Title           = model.MainInfoModel.Title.ToString().Trim();
            page.PublishT        = model.MainInfoModel.publishT.ToShortDateString();
            page.Hit             = Convert.ToString(model.MainInfoModel.Hit);
            page.Content         = ThrowHtml(model.CapitalInfoModel.ComAbout);
            page._auditingStatus = Convert.ToInt32(model.MainInfoModel.AuditingStatus);

            if (model.MainInfoModel.ValidateTerm.ToString().Trim() != null)
            {
                string ValidateTerm = "";
                switch (model.MainInfoModel.ValidateTerm.ToString().Trim())
                {
                case "3": ValidateTerm = "3个月"; break;

                case "6": ValidateTerm = "6个月"; break;

                case "36": ValidateTerm = "3年"; break;

                case "60": ValidateTerm = "5年"; break;

                case "12": ValidateTerm = "1年"; break;

                case "14": ValidateTerm = "2年"; break;

                case "24": ValidateTerm = "2年"; break;
                }
                page.ValidateID = ValidateTerm;
            }
            else
            {
                page.ValidateID = "暂无";
            }

            if (model.MainInfoModel.MainPointCount.ToString().Trim() == "0")
            {
                page.Money = "该资源为免费资源";
            }
            else
            {
                page.Money = model.MainInfoModel.MainPointCount.ToString().Trim() + "元";
            }
            //合作方式
            page.CooperationTypeName = "";
            if (model.CapitalInfoModel.CooperationDemandType != null)
            {
                string[] str = model.CapitalInfoModel.CooperationDemandType.Split(new char[] { ',' });//11,2,1

                string[] strchild = str;
                for (int j = 0; j < strchild.Length - 1; j++)
                {
                    if (!string.IsNullOrEmpty(strchild[j].ToString()))
                    {
                        switch (strchild[j].ToString())
                        {
                        case "1":
                            page.CooperationTypeName += "  " + "资金借贷";
                            break;

                        case "11":
                            page.CooperationTypeName += "  " + "直接投资";
                            break;

                        case "2":
                            page.CooperationTypeName += "  " + "股权投资";
                            break;

                        default:
                            break;
                        }
                    }
                }
            }
            //foreach (string sCoopTypeName in model.CapitalInfoModel.CooperationDemandTypeName)
            //{
            //    page.CooperationTypeName +=" " + sCoopTypeName.Trim();
            //}

            //投资区域
            page.AreaName = "";
            if (model.CapitalInfoAreaModels != null)
            {
                foreach (Tz888.Model.Info.CapitalInfoAreaModel tempCIAM in model.CapitalInfoAreaModels)
                {
                    //if (!string.IsNullOrEmpty(tempCIAM.CountryName))
                    //{
                    //    page.AreaName = tempCIAM.CountryName.Trim();
                    //}
                    if (!string.IsNullOrEmpty(tempCIAM.ProvinceName))
                    {
                        page.AreaName += " " + tempCIAM.ProvinceName.Trim();
                    }
                    if (!string.IsNullOrEmpty(tempCIAM.CityName))
                    {
                        page.AreaName += " " + tempCIAM.CityName.Trim();
                    }
                    if (!string.IsNullOrEmpty(tempCIAM.CountyName))
                    {
                        page.AreaName += " " + tempCIAM.CountyName.Trim();
                    }
                    //if (!string.IsNullOrEmpty(page.AreaName))
                    //    page.AreaName += "<br />";
                }
            }
            else
            {
                page.AreaName = "不限";
            }
            page.Are = model.CapitalInfoModel.IndustryBID.Trim();

            //所属于行业
            page.IndustryCarveOutID = "";
            foreach (string sTempIndustry in model.CapitalInfoModel.IndustryBName)
            {
                page.IndustryCarveOutID += sTempIndustry.Trim() + " ";
            }
            page.MerchantNameTotal = model.CapitalInfoModel.CapitalName.Trim();
            if (page.MerchantNameTotal == "0")
            {
                page.MerchantNameTotal = "暂无";
            }
            page.Keword        = model.MainInfoModel.KeyWord;
            page.Descript      = model.MainInfoModel.Descript;
            page.DisplayTitles = model.MainInfoModel.DisplayTitle;
            page.Register      = model.CapitalInfoModel.RegisteredCapital.ToString().Trim() + "%";
            if (page.Register == "" && page.Register == "%")
            {
                page.Register = "暂无";
            }


            return(page);
        }