Exemple #1
0
 /// <summary>
 /// 商机信息发布
 /// </summary>
 /// <returns></returns>
 public long Insert(Tz888.Model.Info.MainInfoModel mainInfoModel,
                    Tz888.Model.Info.OpportunityInfoModel opportunity,
                    Tz888.Model.Info.ShortInfoModel shortInfoModel
                    )
 {
     return(dal.Insert(mainInfoModel, opportunity, shortInfoModel));
 }
Exemple #2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();

        model.InfoID           = _infoID;
        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = txtCareer.Value.Trim();
        model.TelStateCode     = txtTelStateCode.Value.Trim();
        model.TelNum           = txtTel.Value.Trim();
        model.Mobile           = txtMobile.Value.Trim();
        model.Address          = txtAddress.Value.Trim();
        model.WebSite          = txtWebSite.Value.Trim();
        model.Email            = txtEmail.Value.Trim();
        bool b = dal.Add(model);

        if (b)
        {
            Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            Tz888.BLL.Info.MainInfoBLL     mainDAL       = new Tz888.BLL.Info.MainInfoBLL();
            mainInfoModel = mainDAL.GetModel(_infoID);
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, _infoID);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(_infoID, HtmlFile);
            string actionMsg = "";
            Tz888.BLL.PageStatic.ProjectPageStatic dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            dalPage.CreateStaticPageProject_New(_infoID.ToString(), ref actionMsg);
            Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + title));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败..");
        }
    }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //本地调试时使用默认值
        //InfoID = "103";
        if (string.IsNullOrEmpty(Page.User.Identity.Name))
        {
            Response.Redirect("/Login.aspx?ReturnUrl=" + Server.UrlEncode(Request.RawUrl));
        }
        if (Request.QueryString["InfoID"] != null)
        {
            InfoID = Request.QueryString["InfoID"].ToString();
        }

        //根据InfoID获取资源标题
        //Session["Title"] = "投资壹亿美金合作建设“中国硅热法炼镁”基地";
        if (InfoID.Trim() != "")
        {
            Tz888.BLL.Info.MainInfoBLL     MainInfoBLL   = new Tz888.BLL.Info.MainInfoBLL();
            Tz888.Model.Info.MainInfoModel MainInfoModel = new Tz888.Model.Info.MainInfoModel();
            MainInfoModel = MainInfoBLL.GetModel(long.Parse(InfoID));
            if (MainInfoModel != null)
            {
                tbTitle.Value = MainInfoModel.Title.ToString();
            }
        }
    }
    //第二步,确认联络方式
    private int ConfirmContact()
    {
        Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();
        int returnValue = 0;

        model.InfoID           = _infoID2;
        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = txtCareer.Value.Trim();
        model.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

        if (telFg.Value.Trim() != "")                          //如果分机号不为空
        {
            model.TelNum = txtTel.Value.Trim() + "-" + telFg.Value.Trim();
        }
        else
        {
            model.TelNum = txtTel.Value.Trim(); //电话号加分机号
        }
        model.Mobile  = txtMobile.Value.Trim();
        model.Address = txtAddress.Value.Trim();
        model.WebSite = txtWebSite.Value.Trim();
        model.Email   = txtEmail.Value.Trim();
        bool b = dal.Update(model);     //修改联络方式信息

        if (b)
        {
            //用于生成静态页,暂不用
            Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            Tz888.BLL.Info.MainInfoBLL     mainDAL       = new Tz888.BLL.Info.MainInfoBLL();
            mainInfoModel = mainDAL.GetModel(_infoID2);
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, _infoID2);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(_infoID2, HtmlFile);
            string actionMsg = "";
            Tz888.BLL.PageStatic.ProjectPageStatic dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            dalPage.CreateStaticPageProject_New(_infoID2.ToString(), ref actionMsg);
            //Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + title));
            //Tz888.Common.MessageBox.Show(this.Page, "发布资源成功!");
            returnValue = 1;
        }
        else
        {
            //Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败,请检查!");
        }
        return(returnValue);
    }
    private void MainOppor(int num)
    {
        main = opp.SetMainInfo(num);
        this.txtTitle.Text             = main.Title.ToString().Trim();
        this.ddlGrade.SelectedValue    = main.GradeID;
        this.ddlFixPrice.SelectedValue = main.FixPriceID;
        this.rblAuditing.SelectedValue = main.AuditingStatus.ToString().Trim();
        this.txtKeyWord.Text           = main.KeyWord.ToString().Trim();
        this.txtDescript.Text          = main.Descript.ToString().Trim();
        this.rdbtXM.SelectedValue      = main.ValidateTerm.ToString().Trim();
        this.txtDisplayTitle.Text      = main.DisplayTitle.ToString().Trim();
        if (this.rblAuditing.SelectedValue == "1")
        {
            divAuditing.Style["display"] = "block";
        }

        pOpportunity         = opp.SetOpportunity(num);
        this.txtAdTitle.Text = pOpportunity.AdTitle.ToString().Trim();
        this.ddlOpportunityType.SelectedValue = pOpportunity.OpportunityType;
        this.ZoneSelectControl2.CountryID     = pOpportunity.CountryCode.ToString().Trim();
        this.ZoneSelectControl2.ProvinceID    = pOpportunity.ProvinceID.ToString().Trim();
        this.ZoneSelectControl2.CountyID      = pOpportunity.CountyID.ToString().Trim();
        this.ddlIndustry.SelectedValue        = pOpportunity.IndustryOpportunityID;
        // this.txtContent.Text =HtmlToTxt(pOpportunity.Content.ToString().Trim());
        this.txtContent.Text  = pOpportunity.Content.ToString().Trim();
        this.txtAnalysis.Text = pOpportunity.Analysis.ToString().Trim();
        this.txtRequest.Text  = pOpportunity.Request.ToString().Trim();
        this.txtFlow.Text     = pOpportunity.Flow.ToString().Trim();
        this.txtRemark.Text   = pOpportunity.Remark.ToString().Trim();
        this.txtComName.Text  = pOpportunity.ComName.ToString().Trim();
        this.txtLinkMan.Text  = pOpportunity.LinkMan.ToString().Trim();
        string[] tel = pOpportunity.Tel.ToString().Trim().Split('-');
        this.txtTelCountry.Text  = tel[0].ToString();
        this.txtTelZoneCode.Text = tel[1].ToString();
        this.txtTelNumber.Text   = tel[2].ToString();
        this.txtMobile.Text      = pOpportunity.Mobile.ToString().Trim();
        this.txtAddress.Text     = pOpportunity.Address.ToString().Trim();
        this.txtPostCode.Text    = pOpportunity.PostCode.ToString().Trim();
        this.txtEmail.Text       = pOpportunity.Email.ToString().Trim();
        this.txtWebSite.Text     = pOpportunity.WebSite.ToString().Trim();

        shortInfoRule             = opp.SetShortInfo(num);
        this.txtShortContent.Text = shortInfoRule.ShortContent.ToString().Trim();
        this.txtShortTitle.Text   = shortInfoRule.ShortTitle.ToString().Trim();
    }
    /// <summary>
    /// 查询信息
    /// </summary>
    /// <param name="infoId"></param>
    private void selCase(int infoId)
    {
        mainInfo                           = cases.selMainInfo(infoId);//主信息表信息
        this.txtTitle.Text                 = mainInfo.Title;
        this.txtKeyWord.Text               = HtmlToTxt(mainInfo.KeyWord);
        this.txtDescript.Text              = HtmlToTxt(mainInfo.Descript);
        this.txtDisplayTitle.Text          = HtmlToTxt(mainInfo.DisplayTitle);
        this.rdlValiditeTerm.SelectedValue = mainInfo.ValidateTerm.ToString().Trim();

        this.txtHit.Text = mainInfo.Hit.ToString();
        this.rblAuditing.SelectedValue = mainInfo.AuditingStatus.ToString().Trim();

        shortInfo = cases.selShortInfo(infoId);//短信息表信息
        this.txtShortContent.Text = HtmlToTxt(shortInfo.ShortContent);
        this.txtShortTitle.Text   = HtmlToTxt(shortInfo.ShortTitle);

        casesInfo = cases.selcaseInfo(infoId);//案例表信息
        this.ddlCasesTypeID.SelectedValue = CasesType(casesInfo.CasesTypeID.Trim());
        // this.txtContent.Text=HtmlToTxt(casesInfo.Content);
        this.FreeTextBox1.Text = casesInfo.Content;

        infoResource = cases.selInfoResource(infoId);
        //this.FilesUploadControl1.InfoList = infoResource;
    }
    protected void btnIssueOK_Click(object sender, EventArgs e)
    {
        Tz888.BLL.Info.ProjectInfoBLL     projectObj       = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel    mainInfoModel    = new Tz888.Model.Info.MainInfoModel();                      //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel projectInfoModel = new Tz888.Model.Info.ProjectInfoModel();                   //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel   sortInfoModel    = new Tz888.Model.Info.ShortInfoModel();                     //创建短信息实体

        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>();         //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY";
        projectInfoModel.ProjectCurrency = "CNY";


        //投资总额
        //if (!string.IsNullOrEmpty(txtCapitalTotal.Value.Trim()))
        //    projectInfoModel.CapitalTotal = 20;


        projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        //借钱金额
        projectInfoModel.CapitalID = "0";
        //项目详细描述
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAbout.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        projectInfoModel.financingID = "01,";
        //融资计划及还款能力
        projectInfoModel.warrant = "";

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        projectInfoModel.cZqXmlxqkb = "1,";
        //企业发展阶段
        projectInfoModel.cZqQyfzjd = "1";
        //要求资金到位情况
        projectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率
        projectInfoModel.iZqCpsczzl = 1;
        //产品市场容量
        projectInfoModel.iZqCpscYl = 1;
        //资产负债率
        projectInfoModel.iZqZcfzl = 1;
        //流动比率
        projectInfoModel.iZqYdbl = 1;
        //投资收益率
        projectInfoModel.iZqTzsl = 1;
        //销售利润率
        projectInfoModel.iZqXslyl = 1;
        //投资回报期
        projectInfoModel.iZqTzfbq = 1;
        //项目有效期限
        projectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        projectInfoModel.ComBrief = "";
        //项目关键字 textbox
        string strXmgjz = "";

        projectInfoModel.cZqXmgjz = strXmgjz;


        //##项目详细资料
        //*借款单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*借款单位年净利润
        projectInfoModel.nDwljly = 1;
        //*借款单位总资产
        projectInfoModel.nDwzzc = 1;
        //*借款单位总负债
        projectInfoModel.nDwzfz = 1;


        //产品概述
        projectInfoModel.cZqCpks = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.cZqJzfx = "";
        //商业模式
        projectInfoModel.cZqSyms = "";
        //管理团队
        projectInfoModel.cZqGltd = "";

        //信息完整度
        projectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------



        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        string str = industryModels[0].IndustryBID;

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore = true;
        //  mainInfoModel.LoginName = "topfo001";
        mainInfoModel.LoginName          = bp.LoginName;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = this.rblFixPrice.SelectedValue.ToString().Trim();
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.ValidateTerm       = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        mainInfoModel.MainPointCount = Convert.ToDecimal(txtPointCount.Text.ToString().Trim());
        mainInfoModel.AuditingStatus = Convert.ToByte(this.rblAuditing.SelectedValue.ToString());



        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        mainInfoModel.KeyWord           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        mainInfoModel.Descript          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        string theURL = Request.CurrentExecutionFilePath;


        //包括上传文件
        long infoID = projectObj.PublishProjectZQ1(mainInfoModel, projectInfoModel, sortInfoModel, infoResourceModels);

        _infoID = infoID;


        if (infoID > 0)
        {
            ConfirmContact();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        //获取投资资源的信息
        Tz888.Model.Info.MainInfoModel               mainInfoModel         = new Tz888.Model.Info.MainInfoModel();               //创建主体信息实体
        Tz888.Model.Info.V124.CapitalInfoModel       capitalInfoModel      = new Tz888.Model.Info.V124.CapitalInfoModel();       //创建投资信息实体
        List <Tz888.Model.Info.CapitalInfoAreaModel> capitalInfoAreaModels = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); //投资区域信息实体列表

        Tz888.Model.Info.ShortInfoModel shortInfoModel = new Tz888.Model.Info.ShortInfoModel();                                  //创建短信息实体
        //以下是文件上传的实体声明
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();

        DateTime time_now = DateTime.Now;

        //拟投向区域
        capitalInfoAreaModels = this.ZoneMoreSelectControl1.CapitalInfoAreaModels;

        //主体信息实体付值


        #region 投资信息实体赋值

        //投资意向详细说明
        capitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim());

        //单项目可投资金额

        capitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
        //投资回报率
        capitalInfoModel.RegisteredCapital = this.txtHBao.Text.ToString().Trim();
        //项目介绍提炼
        capitalInfoModel.ComBreif = "";

        capitalInfoModel.CooperationDemandType = "";

        //拟投资行业
        capitalInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;
        //投资项目阶段
        //2010-06-23

        capitalInfoModel.stageID = Convert.ToInt32(1);//(this.rblStage.SelectedValue);
        // 是否参与项目方管理
        //2010-06-23
        capitalInfoModel.joinManageID = Convert.ToInt32(1); //(this.rdlJoinManage.SelectedValue);

        //投资方式
        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                capitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }


        //以下是需要添加的参数
        //注册资金
        //capitalInfoModel.RegisteredCapital = "";// this.rblRegisterdollar.SelectedValue;
        //团队规模
        capitalInfoModel.TeamScale = "";            // this.rblTeam.SelectedValue;
        //机构年平均投资事件数
        capitalInfoModel.AverageInvestment = "";    // this.rblPinJ.SelectedValue;
        //机构成功投资事件总数
        capitalInfoModel.SuccessfulInvestment = ""; // this.rblSucess.SelectedValue;
        //投资需求摘要
        capitalInfoModel.InvestmentDemand = Tz888.Common.Utility.PageValidate.TxtToHtml("");

        //添加所属区域


        capitalInfoModel.SCountryID  = "001";
        capitalInfoModel.SProvinceID = "001";
        capitalInfoModel.SCityID     = "001";
        capitalInfoModel.SCountyID   = "001";



        //项目承办单位
        capitalInfoModel.Prorganizers = "no";
        //文件上传的
        infoResourceModels = FilesUploadControl1.InfoList;


        #endregion


        //这里是其他的实体值
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }

        string CountryCode;
        try
        {
            CountryCode = capitalInfoAreaModels[0].CountryCode;
        }
        catch
        {
            CountryCode = "ALL";
        }
        mainInfoModel.InfoCode       = Tz888.BLL.Info.Common.CreateInfoCode("Capital", capitalInfoModel.IndustryBID.Split(',')[0], CountryCode, time_now);
        mainInfoModel.publishT       = time_now;
        mainInfoModel.Hit            = 0;
        mainInfoModel.MainPointCount = Convert.ToDecimal(txtPointCount.Text.ToString().Trim());
        mainInfoModel.IsCore         = true;
        //mainInfoModel.LoginName = "cxj";

        mainInfoModel.LoginName          = bp.LoginName; //用户名称
        mainInfoModel.InfoOriginRoleName = "0";          //用户角色
        mainInfoModel.GradeID            = "0";

        if (chkIsPoint.Checked == true)
        {
            mainInfoModel.FixPriceID = "2";
        }
        else
        {
            mainInfoModel.FixPriceID = "1";
        }

        mainInfoModel.FeeStatus = 0;

        string keyword = "";


        mainInfoModel.KeyWord  = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        mainInfoModel.Descript = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_now;
        mainInfoModel.ValidateStartTime = time_now;
        //意向有效期限
        //20100623
        mainInfoModel.ValidateTerm = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue.Trim());
        capitalInfoModel.isVIP     = Convert.ToInt32(this.ddlIsVip.SelectedValue.ToString());
        mainInfoModel.IsVip        = Convert.ToInt32(this.ddlIsVip.SelectedValue.ToString());
        mainInfoModel.TemplateID   = "001";
        mainInfoModel.HtmlFile     = "";

        shortInfoModel.ShortInfoControlID = "CapitalIndex1";
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        shortInfoModel.ShortContent = "";
        shortInfoModel.Remark       = "";

        Tz888.BLL.Info.V124.CapitalInfoBLL bll = new Tz888.BLL.Info.V124.CapitalInfoBLL();

        //这里是插入资源投资信息
        //long infoID = bll.Insert(mainInfoModel, capitalInfoModel, this.GetInfoContact(), shortInfoModel, capitalInfoAreaModels, null, infoResourceModels);
        long infoID = bll.Insert(mainInfoModel, capitalInfoModel, this.GetInfoContact(), shortInfoModel, capitalInfoAreaModels, infoResourceModels);
        //以下进行图片的插入


        if (infoID > 0)
        {
            Tz888.BLL.MerchantManage.PageStatic merstatic = new Tz888.BLL.MerchantManage.PageStatic();
            #region 定价
            string price = "";


            #endregion

            if (chkIsPoint.Checked == true)
            {
                price = "2";
            }
            else
            {
                price = "1";
            }

            bool pric = mainBll.HasFixPrice(infoID, price, bp.LoginName);
            if (rdPass.Checked == true)
            {
                string url = "Capital/" + DateTime.Now.ToString("yyyyMM") + "/Capital" + DateTime.Now.ToString("yyyyMMdd") + "_" + infoID + ".shtml";

                merstatic.UpdateUrl(url, infoID);
            }
            long   _infoID = Convert.ToInt64(infoID);
            string title   = Convert.ToString("投资发布");
            Tz888.Model.Info.InfoContactModel infoContactModel = new Tz888.Model.Info.InfoContactModel(); //创建信息联系方式主体

            string email       = this.txtEmail.Text.Trim();
            string telCountry  = this.txtTelCountry.Text.Trim();
            string telZoneCode = this.txtTelZoneCode.Text.Trim();
            string telNumber   = this.txtTelNumber.Text.Trim();
            //注释掉传真
            string faxCountry  = "0";
            string faxZoneCode = "0";
            string faxNumber   = "0";
            string webSite     = this.txtWebSite.Text.Trim();
            string name        = this.txtLinkMan.Text.Trim();
            string mobile      = this.txtMobile.Text.Trim();
            string address     = this.txtAddress.Text.Trim();
            //注释右邮编
            string postCode = "0";

            //以下是职位
            string position = ""; //this.txtPosition.Text.Trim();
            //投资机构名称
            string organizationName = this.txtGovName.Text.Trim();


            infoContactModel.OrganizationName = organizationName;
            infoContactModel.InfoID           = _infoID;
            infoContactModel.Email            = email;
            infoContactModel.WebSite          = webSite;
            infoContactModel.TelCountryCode   = telCountry;
            infoContactModel.TelStateCode     = telZoneCode;
            infoContactModel.TelNum           = telNumber;
            infoContactModel.FaxCountryCode   = faxCountry;
            infoContactModel.FaxStateCode     = faxZoneCode;
            infoContactModel.FaxNum           = faxNumber;
            infoContactModel.Name             = name;
            infoContactModel.Mobile           = mobile;
            infoContactModel.Address          = address;
            infoContactModel.PostCode         = postCode;
            //以下是职位
            infoContactModel.Position = position;

            Tz888.BLL.Info.InfoContact obj = new Tz888.BLL.Info.InfoContact();

            //这里是更新联系信息
            if (obj.Update(infoContactModel))
            {
                Tz888.Model.Info.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();
                page = page.objGetMerchantInfoByInfoID(_infoID);    //根ID获取信息
                string IsVip   = Mercahrstatic.SelCapitalInfoVip(); //查询为重点推荐资源
                string Idstuny = page.SelectLndus(page.Are);        //根据区域查询信息
                int    sum     = page.StaticHtml(Convert.ToInt32(_infoID), page.Title, page.PublishT, page.AreaName, page.Content, page.IndustryCarveOutID, page.CooperationTypeName, page.Money, page.ValidateID, page.MerchantNameTotal, Idstuny, page.Pic, IsVip, page.Title, page.Title, page.Title, page.Register);
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('添加信息成功!');location.href='CapitalManage.aspx'", true);
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "更新联系方式失败!");
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Exemple #9
0
        public long Insert(Tz888.Model.Info.MainInfoModel mainInfoModel,
                           Tz888.Model.Info.OpportunityInfoModel opportunity,
                           Tz888.Model.Info.ShortInfoModel shortInfoModel
                           )
        {
            SqlParameter[] parameters = { new SqlParameter("@InfoID",                  SqlDbType.BigInt),
                                          new SqlParameter("@Title",                   SqlDbType.VarChar,        100),
                                          new SqlParameter("@InfoCode",                SqlDbType.Char,            30),
                                          new SqlParameter("@publishT",                SqlDbType.DateTime),
                                          new SqlParameter("@Hit",                     SqlDbType.BigInt),

                                          new SqlParameter("@IsCore",                  SqlDbType.Bit),
                                          new SqlParameter("@IndexOrderNum",           SqlDbType.BigInt),
                                          new SqlParameter("@IndexTopValidateDate",    SqlDbType.Int),
                                          new SqlParameter("@IndexPicInfoNum",         SqlDbType.BigInt),
                                          new SqlParameter("@InfoTypeOrderNum",        SqlDbType.BigInt),
                                          new SqlParameter("@InfoTypeTopValidateDate", SqlDbType.Int),
                                          new SqlParameter("@InfoTypePicInfoNum",      SqlDbType.BigInt),

                                          new SqlParameter("@LoginName",               SqlDbType.Char,            16),
                                          new SqlParameter("@InfoOriginRoleName",      SqlDbType.Char,            10),

                                          new SqlParameter("@GradeID",                 SqlDbType.Char,            10),
                                          new SqlParameter("@FixPriceID",              SqlDbType.Char,            10),
                                          new SqlParameter("@FeeStatus",               SqlDbType.TinyInt),

                                          //2005/12/12  add
                                          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),
                                          new SqlParameter("@TemplateID",              SqlDbType.Char,            10),
                                          new SqlParameter("@HtmlFile",                SqlDbType.VarChar,        100), //该字段不需要更新,只有在审核时才更新

                                                                                                                       //商机信息
                                          new SqlParameter("@AdTitle",                 SqlDbType.VarChar,         50),
                                          new SqlParameter("@OpportunityType",         SqlDbType.Char,            10),
                                          new SqlParameter("@CountryCode",             SqlDbType.Char,            10),
                                          new SqlParameter("@ProvinceID",              SqlDbType.Char,            10),
                                          new SqlParameter("@CountyID",                SqlDbType.Char,            10),

                                          new SqlParameter("@IndustryOpportunityID",   SqlDbType.Char,            10),
                                          new SqlParameter("@ValidateID",              SqlDbType.Char,            10),

                                          new SqlParameter("@Pic1",                    SqlDbType.VarChar,        100),
                                          new SqlParameter("@Content",                 SqlDbType.Text),
                                          new SqlParameter("@Analysis",                SqlDbType.Text),
                                          new SqlParameter("@Request",                 SqlDbType.Text),
                                          new SqlParameter("@Flow",                    SqlDbType.Text),
                                          new SqlParameter("@Remark",                  SqlDbType.Text),

                                          new SqlParameter("@ComName",                 SqlDbType.VarChar,         40),
                                          new SqlParameter("@LinkMan",                 SqlDbType.VarChar,         20),
                                          new SqlParameter("@Tel",                     SqlDbType.VarChar,         30),
                                          new SqlParameter("@Fax",                     SqlDbType.VarChar,         30),
                                          new SqlParameter("@Mobile",                  SqlDbType.VarChar,         20),
                                          new SqlParameter("@Address",                 SqlDbType.VarChar,         50),
                                          new SqlParameter("@PostCode",                SqlDbType.VarChar,          6),
                                          new SqlParameter("@Email",                   SqlDbType.VarChar,         40),
                                          new SqlParameter("@WebSite",                 SqlDbType.VarChar,         40),

                                          // 短内容信息表
                                          new SqlParameter("@ShortInfoControlID",      SqlDbType.Char,            20),
                                          new SqlParameter("@ShortTitle",              SqlDbType.VarChar,        100),
                                          new SqlParameter("@ShortContent",            SqlDbType.VarChar,        100),
                                          new SqlParameter("@strRemark",               SqlDbType.VarChar, 50) };

            parameters[0].Direction = ParameterDirection.InputOutput;
            parameters[0].Value     = mainInfoModel.InfoID;
            parameters[1].Value     = mainInfoModel.Title;
            parameters[2].Value     = mainInfoModel.InfoCode;
            parameters[3].Value     = mainInfoModel.publishT;
            parameters[4].Value     = mainInfoModel.Hit;

            parameters[5].Value  = mainInfoModel.IsCore;
            parameters[6].Value  = 0;
            parameters[7].Value  = 0;
            parameters[8].Value  = 0;
            parameters[9].Value  = 0;
            parameters[10].Value = 0;
            parameters[11].Value = 0;

            parameters[12].Value = mainInfoModel.LoginName;
            parameters[13].Value = mainInfoModel.InfoOriginRoleName;

            parameters[14].Value = "0";
            parameters[15].Value = "1";
            parameters[16].Value = 2; //付费 0付费,1未付费,2无需付费

            parameters[17].Value = AlterKeyWord(mainInfoModel.KeyWord);
            parameters[18].Value = mainInfoModel.Descript;
            parameters[19].Value = mainInfoModel.DisplayTitle;
            parameters[20].Value = mainInfoModel.FrontDisplayTime;
            parameters[21].Value = mainInfoModel.ValidateStartTime;
            parameters[22].Value = mainInfoModel.ValidateTerm;
            parameters[23].Value = mainInfoModel.TemplateID;
            parameters[24].Value = mainInfoModel.HtmlFile;

            //商机信息
            parameters[25].Value = opportunity.AdTitle;
            parameters[26].Value = opportunity.OpportunityType;

            parameters[27].Value = opportunity.CountryCode;

            if (opportunity.ProvinceID == "")
            {
                parameters[28].Value = System.DBNull.Value;
            }
            else
            {
                parameters[28].Value = opportunity.ProvinceID;
            }

            if (opportunity.CountyID == "")
            {
                parameters[29].Value = System.DBNull.Value;
            }
            else
            {
                parameters[29].Value = opportunity.CountyID;
            }

            parameters[30].Value = opportunity.IndustryOpportunityID;
            parameters[31].Value = opportunity.ValidateID;

            parameters[32].Value = opportunity.Pic1;
            parameters[33].Value = opportunity.Content;
            parameters[34].Value = opportunity.Analysis;
            parameters[35].Value = opportunity.Request;
            parameters[36].Value = opportunity.Flow;
            parameters[37].Value = opportunity.Remark;

            parameters[38].Value = opportunity.ComName;
            parameters[39].Value = opportunity.LinkMan;
            parameters[40].Value = opportunity.Tel;
            parameters[41].Value = opportunity.Fax;
            parameters[42].Value = opportunity.Mobile;
            parameters[43].Value = opportunity.Address;
            parameters[44].Value = opportunity.PostCode;
            parameters[45].Value = opportunity.Email;
            parameters[46].Value = opportunity.WebSite;


            parameters[47].Value = shortInfoModel.ShortInfoControlID;
            parameters[48].Value = shortInfoModel.ShortTitle;
            parameters[49].Value = shortInfoModel.ShortContent;
            parameters[50].Value = shortInfoModel.Remark;

            int  rowsAffected;
            long infoID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    //插入融资(项目)资源信息
                    DbHelperSQL.RunProcedure(sqlConn, sqlTran, "OpportunityInfoTabnewss_Insert", parameters, out rowsAffected);
                    infoID = (long)parameters[0].Value;
                    if (infoID < 0)
                    {
                        throw new Exception();
                    }

                    sqlTran.Commit();
                }
                catch (Exception ex)
                {
                    sqlTran.Rollback();
                    infoID = -1;
                    throw ex;
                }
                finally
                {
                    sqlConn.Close();
                }
            }
            return(infoID);
        }
Exemple #10
0
    /// <summary>
    /// 确认修改信息
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void BtnOk_Click(object sender, EventArgs e)
    {
        //判断电话与手机号
        if (txtTel.Value.Trim() == "" && txtMobile.Value.Trim() == "")
        {
            //Tz888.Common.MessageBox.Show(this.Page, "固定电话或手机至少填写一项,请检查!");
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('固定电话或手机至少填写一项,请检查!');", false);
            return;
        }

        Tz888.Model.Info.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();

        Tz888.BLL.Info.ProjectInfoBLL             projectObj         = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel            mainInfoModel      = new Tz888.Model.Info.MainInfoModel();            //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel         projectInfoModel   = new Tz888.Model.Info.ProjectInfoModel();         //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel           sortInfoModel      = new Tz888.Model.Info.ShortInfoModel();           //创建短信息实体
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>();         //融资行业实体列表

        model.ProjectInfoModel.CountryCode           = this.ZoneSelectControl1.CountryID;
        model.ProjectInfoModel.ProvinceID            = this.ZoneSelectControl1.ProvinceID;
        model.ProjectInfoModel.CityID                = this.ZoneSelectControl1.CityID;
        model.ProjectInfoModel.CountyID              = this.ZoneSelectControl1.CountyID;
        model.ProjectInfoModel.ProjectName           = this.txtProjectName.Value.Trim();
        model.ProjectInfoModel.RecTime               = DateTime.Now;
        model.ProjectInfoModel.CapitalCurrency       = "CNY";
        model.ProjectInfoModel.ProjectCurrency       = "CNY";
        model.ProjectInfoModel.CooperationDemandType = "10";
        //新属性



        //model.ProjectInfoModel.financingID = rbtnObj.SelectedValue;
        model.ProjectInfoModel.SellStockShare = Convert.ToInt32(txtSellStockShare.Text);
        string returnmodelid = "4";//退出方式



        for (int i = 0; i < chkReturn.Items.Count; i++)
        {
            if (chkReturn.Items[i].Selected)
            {
                returnmodelid += chkReturn.Items[i].Value + ",";
            }
        }
        model.ProjectInfoModel.ReturnModeID       = returnmodelid;
        model.ProjectInfoModel.ProjectAbout       = txtProjectAbout.Value.Trim();
        model.ProjectInfoModel.marketAbout        = txtMarketAbout.Value.Trim();
        model.ProjectInfoModel.competitioAbout    = txtCompetitioAbout.Value.Trim();
        model.ProjectInfoModel.BussinessModeAbout = txtBussinessModeAbout.Value.Trim();
        model.ProjectInfoModel.ManageTeamAbout    = txtManageTeamAbout.Value.Trim();

        //借款单位年营业收入

        //model.ProjectInfoModel.nDwlyysy = decimal.Parse(tbDwlyysy.Value);
        model.ProjectInfoModel.nDwlyysy = decimal.Parse(tbDwlyysy.Value);
        ////借款单位年净利润
        //model.ProjectInfoModel.nDwljly = decimal.Parse(tbDwljly.Value);
        model.ProjectInfoModel.nDwljly = decimal.Parse(tbDwljly.Value);
        ////借款单位总资产
        model.ProjectInfoModel.nDwzzc = decimal.Parse(tbDwzzc.Value);
        //model.ProjectInfoModel.CompanyTotalCapital = decimal.Parse(tbDwzzc.Value);
        ////借款单位总负债

        //model.ProjectInfoModel.CompanyTotalDebet = decimal.Parse(tbDwzfz.Value);
        model.ProjectInfoModel.nDwzfz = decimal.Parse(tbDwzfz.Value);

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            model.ProjectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }
        model.ProjectInfoModel.CapitalID = this.rbtnCapital.SelectedValue;

        model.ProjectInfoModel.ComAbout    = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtXmqxms.Value.Trim());
        model.ProjectInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;

        model.ProjectInfoModel.financingID = Tz888.Common.Text.GetCheckBoxList(cblTnObj);

        model.ProjectInfoModel.ProjectNameBrief = ViewState["ProjectNameBrief"].ToString();

        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        model.MainInfoModel.publishT  = Convert.ToDateTime(this.ViewState["PublishT"]);
        model.MainInfoModel.LoginName = Page.User.Identity.Name;
        //model.MainInfoModel.KeyWord = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        model.MainInfoModel.Descript          = "";
        model.MainInfoModel.DisplayTitle      = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;

        //model.MainInfoModel.ValidateTerm = Convert.ToInt32(this.rbtnValiDate.SelectedValue.Trim());
        model.MainInfoModel.TemplateID = "001";
        model.MainInfoModel.HtmlFile   = ViewState["HtmlFile"].ToString();

        model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]);
        model.ShortInfoModel.ShortTitle         = ViewState["ShortTitle"].ToString();
        model.ShortInfoModel.ShortContent       = ViewState["ShortContent"].ToString();
        model.ShortInfoModel.Remark             = "";



        //联系信息
        model.InfoContactModel.OrganizationName = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCompanyName.Value.Trim());
        model.InfoContactModel.Name             = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtLinkMan.Value.Trim());
        model.InfoContactModel.Career           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCareer.Value.Trim());
        model.InfoContactModel.TelStateCode     = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtTelStateCode.Value.Trim());
        model.InfoContactModel.TelNum           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtTel.Value.Trim());
        model.InfoContactModel.Mobile           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtMobile.Value.Trim());
        model.InfoContactModel.Email            = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtEmail.Value.Trim());
        model.InfoContactModel.Address          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtAddress.Value.Trim());
        model.InfoContactModel.WebSite          = txtWebSite.Value.Trim();

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        model.ProjectInfoModel.sXmlxqk = Tz888.Common.Text.GetCheckBoxList(cblXmlxqk);
        //企业发展阶段
        model.ProjectInfoModel.sQyfzjd = rblQyfzjd.SelectedValue.Trim();

        //要求资金到位情况
        model.ProjectInfoModel.iYqzjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());


        //--------------------------------------------------------------
        //*市场占有率(份额)
        model.ProjectInfoModel.iSczylfy = Tz888.Common.Text.FormatData(tbSczylfy.Value.Trim());
        //*行业市场增长率
        model.ProjectInfoModel.iHysczzl = Tz888.Common.Text.FormatData(tbYysczzl.Value.Trim());
        //*资产负债率
        model.ProjectInfoModel.iZcfzl = Tz888.Common.Text.FormatData(tbZcfzl.Value.Trim());
        //--------------------------------------------------------------
        //投资回报期
        model.ProjectInfoModel.iXmtzfbzq = Tz888.Common.Text.FormatData(rblXmtzfbzq.SelectedValue.Trim());


        //项目有效期限
        model.MainInfoModel.ValidateTerm = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        model.ProjectInfoModel.ComBrief = txtProIntro.Value.Trim();

        //项目关键字 textbox
        string strXmgjz = "";

        if (Xmgjz1.Value.Trim() != "")
        {
            strXmgjz = Xmgjz1.Value.Trim() + ",";
        }
        if (Xmgjz2.Value.Trim() != "")
        {
            strXmgjz += Xmgjz2.Value.Trim() + ",";
        }
        if (Xmgjz3.Value.Trim() != "")
        {
            strXmgjz += Xmgjz3.Value.Trim();
        }
        model.ProjectInfoModel.sXmgjz = strXmgjz;
        //产品概述
        model.ProjectInfoModel.ProjectAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtProjectAbout.Value.Trim());
        //市场前景
        model.ProjectInfoModel.marketAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtMarketAbout.Value.Trim());
        //竞争分析
        model.ProjectInfoModel.competitioAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtCompetitioAbout.Value.Trim());
        //商业模式
        model.ProjectInfoModel.BussinessModeAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtBussinessModeAbout.Value.Trim());
        //管理团队
        model.ProjectInfoModel.ManageTeamAbout = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(txtManageTeamAbout.Value.Trim());

        //信息完整度


        model.ProjectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------

        Tz888.BLL.Info.ProjectInfoBLL bll = new Tz888.BLL.Info.ProjectInfoBLL();

        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

        if (bll.ProjectInfoGQ_Update(model, infoResourceModels))
        {
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                if (string.IsNullOrEmpty(model.MainInfoModel.HtmlFile.Trim()))
                {
                    model.MainInfoModel.HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", model.MainInfoModel.InfoCode, model.MainInfoModel.InfoID);
                }
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(model.MainInfoModel.InfoID, model.MainInfoModel.HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                staticobj.CreateStaticPageProject(model.MainInfoModel.InfoID.ToString(), ref actionMsg);
            }
            Tz888.Common.MessageBox.ShowAndHref("修改信息成功!", Request.Url.ToString());
        }
        else
        {
            Tz888.Common.MessageBox.ShowAndHref("修改信息失败!", Request.Url.ToString());
        }
    }
Exemple #11
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        /// <param name="InfoID"></param>
        /// <returns></returns>
        public MainInfoModel GetModel(long InfoID)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@InfoID", SqlDbType.BigInt, 8)
            };
            parameters[0].Value = InfoID;
            Tz888.Model.Info.MainInfoModel model = new Tz888.Model.Info.MainInfoModel();
            DataSet ds = new DataSet();

            try
            {
                ds = DbHelperSQL.RunProcedure("MainInfoTab_GetModel", parameters, "ds");
            }
            catch (Exception ex)
            {
            }
            model.InfoID = InfoID;
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ID"].ToString() != "")
                {
                    model.ID = Convert.ToInt64(ds.Tables[0].Rows[0]["ID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["IsVip"].ToString() != "")
                {
                    model.IsVip = Convert.ToInt32(ds.Tables[0].Rows[0]["IsVip"].ToString());
                }
                model.Title    = ds.Tables[0].Rows[0]["Title"].ToString();
                model.InfoCode = ds.Tables[0].Rows[0]["InfoCode"].ToString();
                if (ds.Tables[0].Rows[0]["publishT"].ToString() != "")
                {
                    model.publishT = DateTime.Parse(ds.Tables[0].Rows[0]["publishT"].ToString());
                }
                if (ds.Tables[0].Rows[0]["Hit"].ToString() != "")
                {
                    model.Hit = int.Parse(ds.Tables[0].Rows[0]["Hit"].ToString());
                }
                model.InfoTypeID = ds.Tables[0].Rows[0]["InfoTypeID"].ToString();
                if (ds.Tables[0].Rows[0]["IsCore"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["IsCore"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsCore"].ToString().ToLower() == "true"))
                    {
                        model.IsCore = true;
                    }
                    else
                    {
                        model.IsCore = false;
                    }
                }

                if (ds.Tables[0].Rows[0]["IndexOrderNum"].ToString() != "")
                {
                    model.IndexOrderNum = int.Parse(ds.Tables[0].Rows[0]["IndexOrderNum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["IndexTopValidateDate"].ToString() != "")
                {
                    model.IndexTopValidateDate = int.Parse(ds.Tables[0].Rows[0]["IndexTopValidateDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["IndexPicInfoNum"].ToString() != "")
                {
                    model.IndexPicInfoNum = int.Parse(ds.Tables[0].Rows[0]["IndexPicInfoNum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["InfoTypeOrderNum"].ToString() != "")
                {
                    model.InfoTypeOrderNum = int.Parse(ds.Tables[0].Rows[0]["InfoTypeOrderNum"].ToString());
                }
                if (ds.Tables[0].Rows[0]["InfoTypeTopValidateDate"].ToString() != "")
                {
                    model.InfoTypeTopValidateDate = int.Parse(ds.Tables[0].Rows[0]["InfoTypeTopValidateDate"].ToString());
                }
                if (ds.Tables[0].Rows[0]["InfoTypePicInfoNum"].ToString() != "")
                {
                    model.InfoTypePicInfoNum = int.Parse(ds.Tables[0].Rows[0]["InfoTypePicInfoNum"].ToString());
                }
                model.LoginName          = ds.Tables[0].Rows[0]["LoginName"].ToString();
                model.InfoOriginRoleName = ds.Tables[0].Rows[0]["InfoOriginRoleName"].ToString();
                model.GradeID            = ds.Tables[0].Rows[0]["GradeID"].ToString();
                model.FixPriceID         = ds.Tables[0].Rows[0]["FixPriceID"].ToString();
                if (ds.Tables[0].Rows[0]["FeeStatus"].ToString() != "")
                {
                    model.FeeStatus = int.Parse(ds.Tables[0].Rows[0]["FeeStatus"].ToString());
                }
                if (ds.Tables[0].Rows[0]["AuditingStatus"].ToString() != "")
                {
                    model.AuditingStatus = int.Parse(ds.Tables[0].Rows[0]["AuditingStatus"].ToString());
                }
                if (ds.Tables[0].Rows[0]["DelStatus"].ToString() != "")
                {
                    model.DelStatus = int.Parse(ds.Tables[0].Rows[0]["DelStatus"].ToString());
                }
                model.ApproveBy = ds.Tables[0].Rows[0]["ApproveBy"].ToString();
                if (ds.Tables[0].Rows[0]["ApproveTime"].ToString() != "")
                {
                    model.ApproveTime = DateTime.Parse(ds.Tables[0].Rows[0]["ApproveTime"].ToString());
                }
                model.ContentKeyword = ds.Tables[0].Rows[0]["ContentKeyword"].ToString();
                model.KeyWord        = ds.Tables[0].Rows[0]["KeyWord"].ToString();
                model.Descript       = ds.Tables[0].Rows[0]["Descript"].ToString();
                model.DisplayTitle   = ds.Tables[0].Rows[0]["DisplayTitle"].ToString();
                if (ds.Tables[0].Rows[0]["FrontDisplayTime"].ToString() != "")
                {
                    model.FrontDisplayTime = DateTime.Parse(ds.Tables[0].Rows[0]["FrontDisplayTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ValidateStartTime"].ToString() != "")
                {
                    model.ValidateStartTime = DateTime.Parse(ds.Tables[0].Rows[0]["ValidateStartTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ValidateTerm"].ToString() != "")
                {
                    model.ValidateTerm = int.Parse(ds.Tables[0].Rows[0]["ValidateTerm"].ToString());
                }
                model.TemplateID = ds.Tables[0].Rows[0]["TemplateID"].ToString();
                model.HtmlFile   = ds.Tables[0].Rows[0]["HtmlFile"].ToString();
                model.HtmlFile1  = ds.Tables[0].Rows[0]["HtmlFile1"].ToString();
                if (ds.Tables[0].Rows[0]["UserEvaluation"].ToString() != "")
                {
                    model.UserEvaluation = int.Parse(ds.Tables[0].Rows[0]["UserEvaluation"].ToString());
                }
                if (ds.Tables[0].Rows[0]["IsIntegralInfo"].ToString() != "")
                {
                    model.IsIntegralInfo = int.Parse(ds.Tables[0].Rows[0]["IsIntegralInfo"].ToString());
                }
                if (ds.Tables[0].Rows[0]["MainPointCount"].ToString() != "")
                {
                    model.MainPointCount = decimal.Parse(ds.Tables[0].Rows[0]["MainPointCount"].ToString());
                }
                if (ds.Tables[0].Rows[0]["MainEvaluation"].ToString() != "")
                {
                    model.MainEvaluation = int.Parse(ds.Tables[0].Rows[0]["MainEvaluation"].ToString());
                }
                if (ds.Tables[0].Rows[0]["refreshtag"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["refreshtag"].ToString() == "1") || (ds.Tables[0].Rows[0]["refreshtag"].ToString().ToLower() == "true"))
                    {
                        model.refreshtag = true;
                    }
                    else
                    {
                        model.refreshtag = false;
                    }
                }

                if (ds.Tables[0].Rows[0]["IsVoucherInfo"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["IsVoucherInfo"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsVoucherInfo"].ToString().ToLower() == "true"))
                    {
                        model.IsVoucherInfo = true;
                    }
                    else
                    {
                        model.IsVoucherInfo = false;
                    }
                }


                return(model);
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// 添加招商资源信息
        /// </summary>
        /// <param name="mainInfoModel">资源信息主体</param>
        /// <param name="merchantInfoModel">招商资源个性信息</param>
        /// <param name="infoContactModel">资源联系信息</param>
        /// <param name="shortInfoModel">资源短信息</param>
        /// <param name="infoContactManModels">多联系人列表</param>
        /// <returns>招商资源ID</returns>
        public long Insert(
            Tz888.Model.Info.MainInfoModel mainInfoModel,
            Tz888.Model.Info.MerchantInfoModel merchantInfoModel,
            Tz888.Model.Info.InfoContactModel infoContactModel,
            Tz888.Model.Info.ShortInfoModel shortInfoModel,
            // List<Tz888.Model.Info.InfoContactManModel> infoContactManModels,
            List <Tz888.Model.Info.InfoResourceModel> infoResourceModels
            )
        {
            SqlParameter[] parameters =
            {
                //---------------------资源信息主体----------------------
                new SqlParameter("@InfoID",                  SqlDbType.BigInt,           8),
                new SqlParameter("@Title",                   SqlDbType.VarChar,        100),
                new SqlParameter("@InfoCode",                SqlDbType.Char,            30),
                new SqlParameter("@publishT",                SqlDbType.DateTime),
                new SqlParameter("@Hit",                     SqlDbType.BigInt,           8),

                new SqlParameter("@IsCore",                  SqlDbType.Bit,              1),
                new SqlParameter("@IndexOrderNum",           SqlDbType.BigInt,           8),
                new SqlParameter("@IndexTopValidateDate",    SqlDbType.Int,              4),
                new SqlParameter("@IndexPicInfoNum",         SqlDbType.BigInt,           8),
                new SqlParameter("@InfoTypeOrderNum",        SqlDbType.BigInt,           8),
                new SqlParameter("@InfoTypeTopValidateDate", SqlDbType.Int,              4),
                new SqlParameter("@InfoTypePicInfoNum",      SqlDbType.BigInt,           8),
                new SqlParameter("@LoginName",               SqlDbType.Char,            16),
                new SqlParameter("@InfoOriginRoleName",      SqlDbType.Char,            10),
                new SqlParameter("@GradeID",                 SqlDbType.Char,            10),
                new SqlParameter("@FixPriceID",              SqlDbType.Char,            10),

                new SqlParameter("@FeeStatus",               SqlDbType.TinyInt,          1),

                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),


                //---------------------------END---------------------------

                //--------------------招商资源个性信息---------------------

                new SqlParameter("@MerchantTypeID",          SqlDbType.Char,            10),
                new SqlParameter("@IndustryClassList",       SqlDbType.VarChar,        150),
                new SqlParameter("@CapitalCurrency",         SqlDbType.Char,            10),
                new SqlParameter("@CapitalTotal",            SqlDbType.Float,            8),
                new SqlParameter("@MerchantCurrency",        SqlDbType.Char,            10),
                new SqlParameter("@MerchantTotal",           SqlDbType.Char,            10),
                new SqlParameter("@CooperationDemandType",   SqlDbType.VarChar,         30),
                new SqlParameter("@CountryCode",             SqlDbType.Char,            10),
                new SqlParameter("@ProvinceID",              SqlDbType.Char,            10),
                new SqlParameter("@CityID",                  SqlDbType.Char,            10),
                new SqlParameter("@CountyID",                SqlDbType.Char,            10),
                new SqlParameter("@ZoneAbout",               SqlDbType.VarChar,         -1),
                new SqlParameter("@ZoneAboutBrief",          SqlDbType.VarChar,         -1),
                new SqlParameter("@ReceiveOrganization",     SqlDbType.VarChar,        100),
                new SqlParameter("@MerchantOrganization",    SqlDbType.Int,              4),


                //---------------------------END---------------------------

                //-----------------------资源联系信息--------------------------

                new SqlParameter("@Organization",            SqlDbType.VarChar,         40),
                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),

                //---------------------------END---------------------------

                //-------------------------短信息--------------------------

                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-01 添加政府招商的参数 有5个参数
                new SqlParameter("@EconomicIndicators",      SqlDbType.NVarChar,       100),
                new SqlParameter("@InvestmentEnvironment",   SqlDbType.NVarChar,       100),
                new SqlParameter("@ProjectStatus",           SqlDbType.NVarChar,       100),
                new SqlParameter("@Market",                  SqlDbType.NVarChar,       100),
                new SqlParameter("@Benefit",                 SqlDbType.NVarChar,       100),
                //新添加结束处
                //这里是2010-06-02添加政府招商联系信息的参数
                new SqlParameter("@Position",                SqlDbType.VarChar,         50),
                //这里是2010-06-08添加信息完整度
                new SqlParameter("@InformationIntegrity",    SqlDbType.Int,              8),
                new SqlParameter("@Merchanreturns",          SqlDbType.Int, 8)


                //---------------------------END---------------------------
            };

            //---------------------资源信息主体参数----------------------
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value     = mainInfoModel.Title;
            parameters[2].Value     = mainInfoModel.InfoCode;
            parameters[3].Value     = mainInfoModel.publishT;
            parameters[4].Value     = mainInfoModel.Hit;

            parameters[5].Value  = mainInfoModel.IsCore;
            parameters[6].Value  = mainInfoModel.IndexOrderNum;
            parameters[7].Value  = mainInfoModel.IndexTopValidateDate;
            parameters[8].Value  = mainInfoModel.IndexPicInfoNum;
            parameters[9].Value  = mainInfoModel.InfoTypeOrderNum;
            parameters[10].Value = mainInfoModel.InfoTypeTopValidateDate;
            parameters[11].Value = mainInfoModel.InfoTypePicInfoNum;
            parameters[12].Value = mainInfoModel.LoginName;
            parameters[13].Value = mainInfoModel.InfoOriginRoleName;
            parameters[14].Value = mainInfoModel.GradeID;
            parameters[15].Value = mainInfoModel.FixPriceID;
            parameters[16].Value = mainInfoModel.FeeStatus;

            parameters[17].Value = mainInfoModel.KeyWord;
            parameters[18].Value = mainInfoModel.Descript;
            parameters[19].Value = mainInfoModel.DisplayTitle;
            parameters[20].Value = mainInfoModel.FrontDisplayTime;
            parameters[21].Value = mainInfoModel.ValidateStartTime;
            parameters[22].Value = mainInfoModel.ValidateTerm;
            parameters[23].Value = mainInfoModel.TemplateID;
            parameters[24].Value = mainInfoModel.HtmlFile;



            //End
            parameters[25].Value = merchantInfoModel.MerchantTypeID;
            parameters[26].Value = merchantInfoModel.IndustryClassList;
            parameters[27].Value = merchantInfoModel.CapitalCurrency;
            parameters[28].Value = merchantInfoModel.CapitalTotal;
            parameters[29].Value = merchantInfoModel.MerchantCurrency;
            parameters[30].Value = merchantInfoModel.MerchantTotal;
            parameters[31].Value = merchantInfoModel.CooperationDemandType;
            parameters[32].Value = merchantInfoModel.CountryCode;
            parameters[33].Value = merchantInfoModel.ProvinceID;
            parameters[34].Value = merchantInfoModel.CityID;
            parameters[35].Value = merchantInfoModel.CountyID;
            parameters[36].Value = merchantInfoModel.ZoneAbout;
            parameters[37].Value = merchantInfoModel.ZoneAboutBrief;
            parameters[38].Value = merchantInfoModel.ReceiveOrganization;
            parameters[39].Value = merchantInfoModel.MerchantOrganization;
            //2010-06-01以下是根据需求添加的
            parameters[57].Value = merchantInfoModel.EconomicIndicators;
            parameters[58].Value = merchantInfoModel.InvestmentEnvironment;
            parameters[59].Value = merchantInfoModel.ProjectStatus;
            parameters[60].Value = merchantInfoModel.Market;
            parameters[61].Value = merchantInfoModel.Benefit;
            //添加信息完整度
            parameters[63].Value = merchantInfoModel.InformationIntegrity;
            //End



            parameters[40].Value = infoContactModel.OrganizationName;
            parameters[41].Value = infoContactModel.Name;
            parameters[42].Value = infoContactModel.TelCountryCode;
            parameters[43].Value = infoContactModel.TelStateCode;
            parameters[44].Value = infoContactModel.TelNum;
            parameters[45].Value = infoContactModel.FaxCountryCode;
            parameters[46].Value = infoContactModel.FaxStateCode;
            parameters[47].Value = infoContactModel.FaxNum;
            parameters[48].Value = infoContactModel.Mobile;
            parameters[49].Value = infoContactModel.Address;
            parameters[50].Value = infoContactModel.PostCode;
            parameters[51].Value = infoContactModel.Email;
            parameters[52].Value = infoContactModel.WebSite;
            //2010-06-02以下是招商联系人职位
            parameters[62].Value = infoContactModel.Position;
            //end

            parameters[53].Value = shortInfoModel.ShortInfoControlID;
            parameters[54].Value = shortInfoModel.ShortTitle;
            parameters[55].Value = shortInfoModel.ShortContent;
            parameters[56].Value = shortInfoModel.Remark;
            parameters[64].Value = merchantInfoModel.Merchanreturns;
            int  rowsAffected;
            long infoID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    //插入招商资源信息插如方法
                    DbHelperSQL.RunProcedure(sqlConn, sqlTran, SP_MarchantInfo_Insert, parameters, out rowsAffected);
                    infoID = (long)parameters[0].Value;
                    if (infoID < 0)
                    {
                        throw new Exception();
                    }

                    //注释掉多个联系人
                    //if (infoContactManModels != null)
                    //{
                    //    //为招商资源添加多个联系人
                    //    Tz888.SQLServerDAL.Info.InfoContactManDAL obj1 = new InfoContactManDAL();
                    //    foreach (Tz888.Model.Info.InfoContactManModel model in infoContactManModels)
                    //    {
                    //        model.InfoID = infoID;
                    //        obj1.InsertContactMan(sqlConn, sqlTran, model);
                    //    }
                    //}

                    if (infoResourceModels != null)
                    {
                        //为招商信息添加多个资源
                        Tz888.SQLServerDAL.Info.InfoResourceDAL obj2 = new InfoResourceDAL();
                        foreach (Tz888.Model.Info.InfoResourceModel model in infoResourceModels)
                        {
                            model.InfoID = infoID;
                            obj2.InsertInfoResource(sqlConn, sqlTran, model);
                        }
                    }

                    sqlTran.Commit();
                }
                catch
                {
                    sqlTran.Rollback();
                    infoID = -1;
                }
                finally
                {
                    sqlConn.Close();
                }
            }

            return(infoID);
        }
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        //20090811 判断权限
        Tz888.BLL.Login.LoginInfoBLL loginbll = new Tz888.BLL.Login.LoginInfoBLL();
        bool yanzheng = loginbll.yanzheng(fz_LoginName);

        if (!yanzheng)
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败,你没有发布信息的权限!\\n可能是你发布违规信息帐户被锁定了。\\n详情请联系客服。");
            return;
        }
        //-----end--



        //获取投资资源的信息
        Tz888.Model.Info.MainInfoModel         mainInfoModel    = new Tz888.Model.Info.MainInfoModel();                          //创建主体信息实体
        Tz888.Model.Info.V124.CapitalInfoModel capitalInfoModel = new Tz888.Model.Info.V124.CapitalInfoModel();                  //创建投资信息实体

        Tz888.Model.Info.InfoContactModel infoContactModel = new Tz888.Model.Info.InfoContactModel();                            //创建信息联系方式主体

        List <Tz888.Model.Info.CapitalInfoAreaModel> capitalInfoAreaModels = new List <Tz888.Model.Info.CapitalInfoAreaModel>(); //投资区域信息实体列表

        Tz888.Model.Info.ShortInfoModel shortInfoModel = new Tz888.Model.Info.ShortInfoModel();                                  //创建短信息实体
        //以下是文件上传的实体声明
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();

        DateTime time_now = DateTime.Now;

        //拟投向区域
        capitalInfoAreaModels = this.ZoneSelect1.CapitalInfoAreaModels;

        //主体信息实体付值
        //联系2010-06-29
        infoContactModel = this.CapitalAddressInfo1.InfoContact;

        #region 投资信息实体赋值

        //投资意向详细说明
        capitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim());
        //资本类型
        //capitalInfoModel.CapitalTypeID = this.rblfinancingTarget.SelectedValue;
        for (int i = 0; rblfinancingTarget.Items.Count > i; i++)
        {
            if (rblfinancingTarget.Items[i].Selected)
            {
                capitalInfoModel.CapitalTypeID += rblfinancingTarget.Items[i].Value + ",";
            }
        }
        //单项目可投资金额
        capitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
        //项目介绍提炼
        capitalInfoModel.ComBreif = "";

        capitalInfoModel.CooperationDemandType = "";

        //拟投资行业
        capitalInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;
        //投资项目阶段
        //2010-06-23

        capitalInfoModel.stageID = Convert.ToInt32(this.rblStage.SelectedValue);
        // 是否参与项目方管理
        //2010-06-23
        capitalInfoModel.joinManageID = Convert.ToInt32(this.rdlJoinManage.SelectedValue);

        //投资方式
        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                capitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }

        //以下是需要添加的参数
        //注册资金
        capitalInfoModel.RegisteredCapital = this.rblRegisterdollar.SelectedValue;
        //团队规模
        capitalInfoModel.TeamScale = this.rblTeam.SelectedValue;
        //机构年平均投资事件数
        capitalInfoModel.AverageInvestment = this.rblPinJ.SelectedValue;
        //机构成功投资事件总数
        capitalInfoModel.SuccessfulInvestment = this.rblSucess.SelectedValue;
        //投资需求摘要
        capitalInfoModel.InvestmentDemand = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtDemand.Value.Trim());

        //添加所属区域

        //capitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
        //capitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
        //capitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
        //capitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
        capitalInfoModel.SCountryID  = "001";
        capitalInfoModel.SProvinceID = "001";
        capitalInfoModel.SCityID     = "001";
        capitalInfoModel.SCountyID   = "001";



        //项目承办单位
        capitalInfoModel.Prorganizers = "no";
        //文件上传的
        infoResourceModels = FilesUploadControl1.InfoList;


        #endregion


        //这里是其他的实体值
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }

        string CountryCode;
        try
        {
            CountryCode = capitalInfoAreaModels[0].CountryCode;
        }
        catch
        {
            CountryCode = "ALL";
        }
        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Capital", capitalInfoModel.IndustryBID.Split(',')[0], CountryCode, time_now);
        mainInfoModel.publishT = time_now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore = true;
        //mainInfoModel.LoginName = "cxj";

        mainInfoModel.LoginName          = fz_LoginName; //用户名称
        mainInfoModel.InfoOriginRoleName = "0";          //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;

        string keyword = "";
        if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim()))
        {
            keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword1.Text.Trim()) + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim()))
        {
            keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword2.Text.Trim()) + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim()))
        {
            keyword += Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtKeyword3.Text.Trim()) + ",";
        }

        mainInfoModel.KeyWord  = keyword;
        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_now;
        mainInfoModel.ValidateStartTime = time_now;
        //意向有效期限
        //20100623
        mainInfoModel.ValidateTerm = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue.Trim());

        mainInfoModel.TemplateID = "001";
        mainInfoModel.HtmlFile   = "";

        shortInfoModel.ShortInfoControlID = "CapitalIndex1";
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        shortInfoModel.ShortContent = "";
        shortInfoModel.Remark       = "";

        Tz888.BLL.Info.V124.CapitalInfoBLL bll = new Tz888.BLL.Info.V124.CapitalInfoBLL();

        //这里是插入资源投资信息
        //long infoID = bll.Insert(mainInfoModel, capitalInfoModel, this.GetInfoContact(), shortInfoModel, capitalInfoAreaModels, null, infoResourceModels);
        long infoID = bll.Insert(mainInfoModel, capitalInfoModel, infoContactModel, shortInfoModel, capitalInfoAreaModels, infoResourceModels);
        //以下进行图片的插入


        if (infoID > 0)
        {
            // bool isTof = Page.User.IsInRole("GT1002");
            //if (isTof)
            // {
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Capital", mainInfoModel.InfoCode, infoID);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            Page.Response.Write(infoID.ToString() + HtmlFile.ToString());
            mainBll.HasHtmlFile(infoID, HtmlFile);
            string actionMsg = "";
            Tz888.BLL.PageStatic.CapitalPageStatic staticobj = new Tz888.BLL.PageStatic.CapitalPageStatic();
            staticobj.CreateStaticPageCapital(infoID.ToString(), ref actionMsg);
            // }
            // Response.Redirect("publishCapital_step2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Capital|" + this.txtCapitalName.Text.Trim() + "|" + txtGovName.Text.Trim()));
            Response.Redirect("publishCapital_step2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Capital|" + this.txtCapitalName.Text.Trim() + "|" + "no"));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Exemple #14
0
    protected void BtnOk_Click(object sender, ImageClickEventArgs e)
    {
        //20090811 判断权限
        Tz888.BLL.Login.LoginInfoBLL loginbll = new Tz888.BLL.Login.LoginInfoBLL();
        bool yanzheng = loginbll.yanzheng(Page.User.Identity.Name);

        if (!yanzheng)
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败,你没有发布信息的权限!\\n可能是你发布违规信息帐户被锁定了。\\n详情请联系客服。");
            return;
        }
        //-----end-


        ///--------------------------------------------------
        ///--验证提交的验证码并清空验证码
        ///--------------------------------------------------
        string vercode   = Request.Form["vercode"];
        string strRndNum = "";

        //SESSION丢失
        if (Session["valationNo"] == null)
        {
            Response.Write("<script>alert('操作超时!请刷新页面!');</script>");
            return;
        }
        else
        {
            if (vercode.Trim() == "")
            {
                Response.Write("<script>alert('验证码不能为空,请重新提交!');</script>");
                return;
            }
            else
            {
                strRndNum = Session["valationNo"].ToString();
                if (vercode.Trim() != "" && vercode.Trim().ToLower() == strRndNum.ToLower())
                {
                    Session["valationNo"] = "";
                }
                else
                {
                    Response.Write("<script>alert('验证码错误,请重新提交!');</script>");
                    return;
                }
            }
        }



        string IPAddress = String.Empty;

        IPAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
        }
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.UserHostAddress;
        }

        ipAddressForInfo.ipAddressForInfo obj = new ipAddressForInfo.ipAddressForInfo();

        DataSet ds = new DataSet();

        ds = obj.readIPAddress(Page.User.Identity.Name, IPAddress);

        if (ds.Tables["projectinfoIP"].Rows.Count != 0)
        {
            DateTime dtForDB     = Convert.ToDateTime(ds.Tables["projectinfoIP"].Rows[0]["postdate"].ToString());
            DateTime dtForClient = Convert.ToDateTime(DateTime.Now);

            TimeSpan ts = dtForClient - dtForDB;

            if ((int)ts.TotalMinutes <= 3)
            {
                Response.Write("三分钟内不允许重复发布信息!");
                Response.End();
            }

            //if (ds.Tables["projectinfoIP"].Rows.Count >= 5)
            //{
            //    Response.Write("当天只能发布5条记录");
            //    Response.End();
            //}
        }

        Tz888.BLL.Info.ProjectInfoBLL           projectObj       = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel          mainInfoModel    = new Tz888.Model.Info.MainInfoModel();          //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel       projectInfoModel = new Tz888.Model.Info.ProjectInfoModel();       //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel         sortInfoModel    = new Tz888.Model.Info.ShortInfoModel();         //创建短信息实体
        List <Tz888.Model.Common.IndustryModel> industryModels   = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY";
        projectInfoModel.ProjectCurrency = "CNY";

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim()); //投资总额
        }
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();                      //融资金额
        //项目说明
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtProIntro.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "9";//债券融资

        projectInfoModel.financingID = rbtnObj.SelectedValue;

        projectInfoModel.warrant = txtWarrant.Value.Trim();   //融资担保

        projectInfoModel.financingID = rbtnObj.SelectedValue; //融资对象

        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.ValidateTerm       = Convert.ToInt32(rbtnValiDate.SelectedValue);
        string keyword = "";

        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Convert.ToInt32(this.rbtnValiDate.SelectedValue.Trim());
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        string theURL = Request.CurrentExecutionFilePath;

        long infoID = projectObj.PublishProjectZQ1(mainInfoModel, projectInfoModel, sortInfoModel);

        obj.insertIPAddress(infoID, Page.User.Identity.Name, theURL, IPAddress, DateTime.Now); //将用户IP地址入库

        if (infoID > 0)
        {
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, infoID);
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(infoID, HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                staticobj.CreateStaticPageProject(infoID.ToString(), ref actionMsg);
            }
            Response.Redirect("zq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
    protected void btnStatus_Click(object sender, EventArgs e)
    {
        Tz888.Model.Info.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();
        Tz888.BLL.Info.ProjectInfoBLL projectObj = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();  //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel projectInfoModel = new Tz888.Model.Info.ProjectInfoModel(); //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel sortInfoModel = new Tz888.Model.Info.ShortInfoModel(); //创建短信息实体
        List<Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List<Tz888.Model.Info.InfoResourceModel>(); //上传文件


        List<Tz888.Model.Common.IndustryModel> industryModels = new List<Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        model.ProjectInfoModel.CountryCode = this.ZoneSelectControl1.CountryID;
        model.ProjectInfoModel.ProvinceID = this.ZoneSelectControl1.ProvinceID;
        model.ProjectInfoModel.CityID = this.ZoneSelectControl1.CityID;
        model.ProjectInfoModel.CountyID = this.ZoneSelectControl1.CountyID;
        model.ProjectInfoModel.ProjectName = this.txtProjectName.Value.Trim();
        model.ProjectInfoModel.RecTime = DateTime.Now;
        model.ProjectInfoModel.CapitalCurrency = "CNY";
        model.ProjectInfoModel.ProjectCurrency = "CNY";

        //投资总额
        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Value.Trim()))
            model.ProjectInfoModel.CapitalTotal = 0;

        //借钱金额
        model.ProjectInfoModel.CapitalID = "0";
        //项目详细描述
        model.ProjectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.tbXmqxms.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel models in industryModels)
        {
            model.ProjectInfoModel.IndustryBID += models.IndustryBID + ",";
        }
        model.ProjectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        model.ProjectInfoModel.financingID = "01,";
        //融资计划及还款能力
        model.ProjectInfoModel.warrant = "";

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        model.ProjectInfoModel.cZqXmlxqkb = "1,";
        //企业发展阶段
        model.ProjectInfoModel.cZqQyfzjd = "1";

        //要求资金到位情况
        model.ProjectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率        
        model.ProjectInfoModel.iZqCpsczzl = 1;

        //产品市场容量
        model.ProjectInfoModel.iZqCpscYl = 1;
        //资产负债率
        model.ProjectInfoModel.iZqZcfzl = 1;
        //流动比率
        model.ProjectInfoModel.iZqYdbl = 1;
        //投资收益率
        model.ProjectInfoModel.iZqTzsl = 1;
        //销售利润率
        model.ProjectInfoModel.iZqXslyl = 1;
        //投资回报期
        model.ProjectInfoModel.iZqTzfbq = 1;
        //项目有效期限
        model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        model.ProjectInfoModel.ComBrief = "";

        //项目关键字 textbox
        string strXmgjz = "";
        model.ProjectInfoModel.cZqXmgjz = strXmgjz;

        model.ProjectInfoModel.nDwlyysy = 1;//单位年营业收入
        model.ProjectInfoModel.nDwljly = 1; //单位年净利润
        model.ProjectInfoModel.nDwzzc = 1;//单位总资产
        model.ProjectInfoModel.nDwzfz = 1; //单位总负债
        //产品概述
        model.ProjectInfoModel.cZqCpks = "";
        //市场前景
        model.ProjectInfoModel.marketAbout = "";
        //竞争分析
        model.ProjectInfoModel.cZqJzfx = "";
        //商业模式
        model.ProjectInfoModel.cZqSyms = "";
        //管理团队
        model.ProjectInfoModel.cZqGltd = "";
        //信息完整度
        model.ProjectInfoModel.InformationIntegrity = 0;

        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);

        string str = industryModels[0].IndustryBID;
        model.MainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        string InfoCode = model.MainInfoModel.InfoCode;
        model.MainInfoModel.publishT = time_Now;
        string tb = this.tbHits.Text == "" ? "0" : this.tbHits.Text;
        model.MainInfoModel.Hit = Convert.ToInt32(tb);
        string fix = this.txtPointCount.Text == "" ? "0" : this.txtPointCount.Text;
        model.MainInfoModel.MainPointCount = Convert.ToDecimal(fix);
        model.MainInfoModel.FixPriceID = this.rblFixPrice.SelectedValue.ToString().Trim();
        //   model.MainInfoModel.InfoID = 2397088;
        model.MainInfoModel.InfoID = Convert.ToInt64(ViewState["infoID"].ToString());
        model.MainInfoModel.IsCore = true;

        model.MainInfoModel.KeyWord = txtKeord.Value;//网页关键字
        model.MainInfoModel.DisplayTitle = txtWtitle.Value;//网页标题
        model.MainInfoModel.Descript = txtDescript.Value;//网页描述

        BasePage bp = new BasePage();
        model.MainInfoModel.LoginName = bp.LoginName;
        //model.MainInfoModel.LoginName = "topfo001";
        model.MainInfoModel.InfoOriginRoleName = "0"; //用户角色
        model.MainInfoModel.GradeID = "0";
        model.MainInfoModel.FeeStatus = 0;
        model.MainInfoModel.AuditingStatus = Convert.ToInt32(this.rblAuditing.SelectedValue);

        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
            model.MainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        model.MainInfoModel.FrontDisplayTime = time_Now;
        model.MainInfoModel.ValidateStartTime = time_Now;
        model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        model.MainInfoModel.TemplateID = "001";

        //------------------------
        model.ShortInfoModel.ShortInfoControlID = "ProjectIndex1";
        model.ShortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());

        string theURL = Request.CurrentExecutionFilePath;

        ////联系信息
        model.InfoContactModel.OrganizationName = txtCompanyName.Value.Trim();
        model.InfoContactModel.Name = txtLinkMan.Value.Trim();
        model.InfoContactModel.TelStateCode = txtTelStateCode.Value.Trim();
        model.InfoContactModel.TelNum = txtTel.Value.Trim();
        model.InfoContactModel.Mobile = txtMobile.Value.Trim();
        model.InfoContactModel.Email = txtEmail.Value.Trim();
        model.InfoContactModel.Address = txtAddress.Value.Trim();
        model.InfoContactModel.WebSite = txtWebSite.Value.Trim();

        Tz888.BLL.Info.ProjectInfoBLL bll = new Tz888.BLL.Info.ProjectInfoBLL();

        byte AuditingOrigin = Convert.ToByte(ViewState["AuditingStaus"]);
        byte AuditingStatus = 0;

        AuditingStatus = Convert.ToByte(this.rblAuditing.SelectedValue.ToString());

        bool IsSuccess = false;
        string actionMsg = "";
        bool IsSendEmail = false;
        int FeedbackStatus = 0;
        string FeedBackNote = "";
        string AuditingRemark = "";
        long InfoID = Convert.ToInt64(ViewState["infoID"]);
        // BasePage bp = new BasePage();
        string LoginName = bp.LoginName;
        //string LoginName = "topfo001";


        bool AllHasDone = false;
        bool HasDone = false;
        //修改属性

        bool h = bll.ProjectInfoZQ_Update_Up(model, infoResourceModels);

        if (h)
        {
            AllHasDone = true;
        }

        int MainPointCount = 0;
        Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
        string strHtmlFile = ViewState["HtmlFile"].ToString();
        if (strHtmlFile == "")
        {
            strHtmlFile = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + Convert.ToInt64(this.ViewState["InfoID"]) + ".shtml";
        }

        #region 审核

        Tz888.Model.Info.InfoAuditModel auditModel = new Tz888.Model.Info.InfoAuditModel();

        try
        {
            MainPointCount = Convert.ToInt32(txtPointCount.Text.Trim());
            if (MainPointCount < 0)
                MainPointCount = 0;
        }
        catch
        {
            MainPointCount = 0;
        }

        switch (AuditingOrigin)
        {
            case 0:
                switch (AuditingStatus)
                {
                    case 0:
                        break;
                    case 1:
                        AuditingRemark = "未审核->审核通过";

                        #region 写入操作记录
                        //需要生成文件

                        if (string.IsNullOrEmpty(strHtmlFile.Trim()))
                            strHtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName(theInfoType, InfoCode, _infoid);
                        //更改审核状态,同时记录操作
                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录
                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;
                        auditModel.FeedbackStatus = 0; //0,可修改|1,即将删除
                        auditModel.FeedBackNote = "";
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);

                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 生成静态化文件
                        //Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                        //IsSuccess = staticobj.CreateStaticPageProject_New(InfoID.ToString(), ref actionMsg);

                        //if (!IsSuccess)
                        //{
                        //    AllHasDone = false;//修改失败
                        //}
                        #endregion

                        IsSendEmail = true;

                        break;
                    case 2:
                        AuditingRemark = "未审核->审核未通过";

                        #region 写入操作记录
                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, "", "", 0, MainPointCount);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录
                        if (rblFeedbackStatus.SelectedValue.Trim() != "")
                        {
                            FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                        }
                        FeedBackNote = this.tbAuditingRemark.Text.Trim();

                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;

                        auditModel.FeedbackStatus = FeedbackStatus;

                        auditModel.FeedBackNote = this.tbAuditingRemark.Text.Trim();
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);

                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        IsSendEmail = true;

                        break;
                    default:
                        break;
                }
                break;
            case 1:
                switch (AuditingStatus)
                {
                    case 0:
                        AuditingRemark = "审核通过->未审核";

                        #region 写入操作记录
                        //更改审核状态,同时记录操作
                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, "", "", 0, MainPointCount);

                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录
                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;
                        auditModel.FeedbackStatus = 0;
                        auditModel.FeedBackNote = "";
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);

                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 删除已生成的文件

                        //删除静态化文件

                        #endregion

                        break;
                    case 1:
                        #region 生成静态化文件
                        //需要生成文件

                        if (string.IsNullOrEmpty(strHtmlFile.Trim()))
                            strHtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName(theInfoType, InfoCode, _infoid);
                        //记录操作
                        HasDone = mainBll.HasAuditing(InfoID, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, strHtmlFile, "", 0, MainPointCount);

                        //Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                        //IsSuccess = staticobj.CreateStaticPageProject_New(InfoID.ToString(), ref actionMsg);

                        //if (!IsSuccess)
                        //{
                        //    AllHasDone = false;//修改失败
                        //}
                        #endregion
                        break;
                    case 2:
                        AuditingRemark = "审核通过->审核未通过";

                        #region 写入操作记录
                        //更改审核状态,同时记录操作
                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, "", "", 0, MainPointCount);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录

                        FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                        FeedBackNote = this.tbAuditingRemark.Text.Trim();

                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;
                        auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                        auditModel.FeedBackNote = this.tbAuditingRemark.Text.Trim();
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 删除已生成的文件

                        //删除静态化文件

                        #endregion

                        IsSendEmail = true;

                        break;
                    default:
                        break;
                }
                break;
            case 2:
                switch (AuditingStatus)
                {
                    case 0:
                        AuditingRemark = "审核未通过->未审核";

                        #region 写入操作记录
                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, "", "", 0, MainPointCount);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录
                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;
                        auditModel.FeedbackStatus = 0;
                        auditModel.FeedBackNote = "";
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        break;
                    case 1:
                        AuditingRemark = "审核未通过->审核通过";

                        #region 写入操作记录
                        if (string.IsNullOrEmpty(strHtmlFile.Trim()))
                            strHtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName(theInfoType, InfoCode, _infoid);

                        HasDone = mainBll.HasAuditing(_infoid, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                            AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 写入信息审核记录
                        auditModel = new Tz888.Model.Info.InfoAuditModel();
                        auditModel.InfoID = model.MainInfoModel.InfoID;
                        auditModel.InfoTypeID = theInfoType;
                        auditModel.LoginName = model.MainInfoModel.LoginName;
                        auditModel.PostDate = System.DateTime.Now;
                        auditModel.Title = model.MainInfoModel.Title;
                        auditModel.FeedbackStatus = 0;
                        auditModel.FeedBackNote = "";
                        auditModel.AuditStatus = AuditingStatus;
                        auditModel.AuditingDate = System.DateTime.Now;
                        auditModel.AuditingBy = bp.LoginName;
                        auditModel.AuditingRemark = AuditingRemark;
                        auditModel.Memo = "";
                        HasDone = mainBll.InfoAuditNote(auditModel);
                        if (!HasDone)
                        {
                            AllHasDone = false;//修改失败
                        }
                        #endregion

                        #region 生成静态化文件
                        //Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                        //IsSuccess = staticobj.CreateStaticPageProject_New(InfoID.ToString(), ref actionMsg);
                        #endregion

                        IsSendEmail = true;

                        break;
                    case 2:
                        break;
                    default:
                        break;
                }
                break;
            default:
                break;
        }
        #endregion

        #region 邮件通知
        if (IsSendEmail)
        {
            //try
            //{
            //    Tz888.BLL.Info.InfoAuditMailBLL MailBll = new Tz888.BLL.Info.InfoAuditMailBLL();
            //    if (AuditingStatus == 1)
            //        MailBll.SendPassMail(LoginName, Title, strHtmlFile, Server.MapPath(MailBll.GetEmailPassTmpPath()));
            //    else
            //        MailBll.SendNoPassEmail(_infoid, LoginName, Title, FeedbackStatus, FeedBackNote, "Capital", Server.MapPath(MailBll.GetEmailNoPassTmpPath()));
            //}
            //catch (Exception ex)
            //{
            //}
        }
        #endregion

        #region 修改成功并且状态为1就生成静态页面
        if (AllHasDone)
        {
            if (AuditingStatus == 1)
            {
                string cc = "";
                state = page.SelProjectM(Convert.ToString(_infoid));
                string CountryCode = "中国";// visit.SelCountry(ht[3].ToString().Trim());//国家
                string Province = visit.SelProvince(state.ProvinceID.ToString().Trim());//省名
                string City = visit.SelCityID(state.CityID.ToString().Trim());//地区所对应城市
                string County = visit.SelCounty(state.CountyID.ToString().Trim());//地区
                string[] Bid = state.IndustryBID.ToString().Trim().Split(',');
                string Industry = "";
                if (Bid.Length >= 0)
                {
                    for (int j = 0; j < Bid.Length - 1; j++)
                    {
                        Industry += page.SelIndustryName(Bid[j].ToString()) + "、";//行业名称
                    }
                }
                if (Bid.Length == 1)
                {

                    Industry = page.SelIndustryName(Bid[0].ToString());

                }

                // string Industry =page.SelIndustryName(Bid[0].ToString());//行业名称
                string lated = page.SelIndustryLated(state.IndustryBID.ToString().Trim());
                string sdt = "";//还款保证
                if (state.IZqYqjjdwqk == "" || state.IZqYqjjdwqk == null || state.IZqYqjjdwqk == "0")
                {
                    sdt = "暂无";
                }
                else if (state.IZqYqjjdwqk == "1")
                {
                    sdt = "担保";
                }
                else if (state.IZqYqjjdwqk == "2")
                {
                    sdt = "抵押";
                }
                else if (state.IZqYqjjdwqk == "3")
                {
                    sdt = "信用";
                }
                string iZqXmyxqs = page.SelDictName(state.IZqXmyxqs.ToString());//有效期
                DateTime dt = Convert.ToDateTime(state.PublishT.ToString());
                string publishT = Convert.ToString(dt.ToString("yyyy-MM-dd"));//发布时间
                string mainPoint = page.SelMainPoint();//资源收费查询
                string Fix = "";//收费状态
                if (state.FixPriceID == "1" || state.FixPriceID == "0")
                {
                    Fix = "免费";
                }
                else if (state.FixPriceID == "2")
                {
                    Fix = "<span style='color:Red'>" + state.MainPointCount.ToString() + "</span>元";
                }
                string str1 = Convert.ToString(state.CooperationDemandType).Trim(",".ToCharArray());
                if (str1 == "9")//为债权融资
                {
                    page.ProjectZqHtml(state.Id.ToString(), state.ProjectName.ToString(), state.ComAbout.ToString(), CountryCode, Province, City, County.Trim(), Industry,
                        state.CapitalTotal.ToString(), sdt, iZqXmyxqs, publishT, "", "", state.DisplayTitle.ToString(), state.KeyWord.ToString(),
                        state.Descript.ToString(), 1, lated, mainPoint, Fix);
                }
                else if (str1 == "10")//股权融资
                {
                    page.ProjectZqHtml(state.Id.ToString(), state.ProjectName.ToString(), state.ComAbout.ToString(), CountryCode, Province, City, County.Trim(), Industry,
                       state.CapitalTotal.ToString(), sdt, iZqXmyxqs, publishT, state.ComBrief.ToString(), state.ManageTeamAbout.ToString(), state.DisplayTitle.ToString(), state.KeyWord.ToString(),
                       state.Descript.ToString(), 2, lated, mainPoint, Fix);
                }
                else
                {

                    page.ProjectZqHtml(state.Id.ToString(), state.ProjectName.ToString(), state.ComAbout.ToString(), CountryCode, Province, City, County.Trim(), Industry,
                   state.CapitalTotal.ToString(), sdt, iZqXmyxqs, publishT, state.ComBrief.ToString(), state.ManageTeamAbout.ToString(), state.DisplayTitle.ToString(), state.KeyWord.ToString(),
                     state.Descript.ToString(), 2, lated, mainPoint, Fix);
                }

                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息成功!');location.href='ProjectManage.aspx'", true);

            }

            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息失败!');location.href='ProjectManage.aspx'", true);
            }

        }
        #endregion
    } 
    protected void btnPublish_Click(object sender, EventArgs e)
    {
        string LogingName   = bp.LoginName;
        long   infoid       = Convert.ToInt64(Request["infoID"].ToString());
        string ResearchSpot = "";

        Tz888.BLL.CasesInfoTabBLL       state         = new Tz888.BLL.CasesInfoTabBLL();
        Tz888.Model.Info.MainInfoModel  main          = new Tz888.Model.Info.MainInfoModel();  //主表
        Tz888.Model.zx.NewsTabModel     NewsModel     = new Tz888.Model.zx.NewsTabModel();     //新闻表
        Tz888.Model.Info.ShortInfoModel shortInfoRule = new Tz888.Model.Info.ShortInfoModel(); //短消息表

        //int Hit = 0;
        //Random rnd = new Random();
        //Hit = rnd.Next(25) + 5;
        string NewsLblStatus = "";

        main.publishT           = Convert.ToDateTime(DateTime.Now);
        main.Hit                = Convert.ToInt32(txtHit.Text.ToString().Trim());
        main.InfoID             = infoid;
        main.LoginName          = LogingName;
        main.InfoOriginRoleName = "0";
        //ddlNewsType = ddlNewsType.SelectedValue.Trim();//新闻类型
        main.Title             = txtTitle.Text.ToString().Trim();                                  //标题
        main.KeyWord           = txtKeyword.Text.ToString().Trim();                                //关键字
        main.Descript          = txtDescript.Text.ToString().Trim();                               //网页描述
        main.DisplayTitle      = txtDisplayTitle.Text.ToString().Trim();                           //显示标题
        main.ValidateStartTime = Convert.ToDateTime(txtValidateStartTime.Text.ToString().Trim());  //开始日期
        main.TemplateID        = txtTemplate.Text.ToString().Trim();                               //模版号
        main.ValidateTerm      = Convert.ToInt32(ddlValiditeTerm.SelectedValue.ToString().Trim()); //有效期
        main.publishT          = Convert.ToDateTime(txtPublishT.Text.ToString().Trim());           //发布时间
        main.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now);                                 //前台显示日期
        int Auditting = 0;

        Auditting           = Convert.ToByte(this.rblAuditing.SelectedValue.Trim());//审核状态
        main.AuditingStatus = Auditting;

        if (Auditting == 1)
        {
            main.HtmlFile = "News/" + DateTime.Now.ToString("yyyyMM") + "/News" + DateTime.Now.ToString("yyyyMMdd") + "_" + infoid + ".shtml";
        }
        else
        {
            main.HtmlFile = "";
        }
        main.GradeID    = ddlSetGrade.SelectedValue.Trim();
        main.FixPriceID = ddlFix.SelectedValue.Trim();

        NewsModel.Summary    = txtSummary.ToString().Trim();      //摘要
        NewsModel.subTitle   = txtKeyword.Text.ToString().Trim(); //短标题
        NewsModel.NewsTypeID = ddlNewsType.SelectedValue.Trim();  //新闻类型

        if (rdArea.Checked)                                       //新闻标签 0区域,1行业
        {
            if (ddlArea.SelectedValue.Trim() != "请选择地域性标签")
            {
                NewsLblStatus            = rdArea.Value;
                NewsModel.AreaID         = ddlArea.SelectedValue.Trim();
                NewsModel.NewsIndustryID = ddlIndustry.Items[1].Value.ToString().Trim();
            }
            else
            {
                Response.Write("<script>alert('请选择地域性标签');</script>"); return;
            }
        }
        if (rdIndustry.Checked)
        {
            if (ddlIndustry.SelectedValue.Trim() != "请选择行业性标签")
            {
                NewsLblStatus            = rdIndustry.Value;
                NewsModel.NewsIndustryID = ddlIndustry.SelectedValue.Trim();
                NewsModel.AreaID         = ddlArea.Items[1].Value.ToString().Trim();
            }
            else
            {
                Response.Write("<script>alert('请选择行业性标签');</script>"); return;
            }
        }
        NewsModel.NewsLblStatus = NewsLblStatus;
        NewsModel.Origin        = txtOrigin.Text.ToString().Trim();      //资讯来源
        NewsModel.Author        = txtAuthor.Text.ToString().Trim();      //作者
        NewsModel.Keyword       = txtKeyword.ToString().Trim();          //关键字
        NewsModel.RedirectUrl   = txtRedirectUrl.Text.ToString().Trim(); //转向连接
        NewsModel.IsRedirect    = chkIsRedirect.Checked;                 //是否使用转向连接
        NewsModel.Summary       = txtSummary.Text.ToString().Trim();     //摘要
        NewsModel.Content       = FCKeditor.Value;
        NewsModel.Pic1          = Convert.ToString(ViewState["strSavePath"]);
        NewsModel.PicAbout      = txtPicAbout.Value.ToString().Trim();
        NewsModel.PageStatus    = Convert.ToInt32(rblPageStatus.SelectedValue);                         //分页方法 0 不分页 1 手动分页 2 自动分页
        NewsModel.PageCharCount = Convert.ToInt64(txtPageCharCount.Value.ToString().Trim());            //自动分页字符数
        if (rbyjcg.Checked)                                                                             //加入中国招商投资研究会
        {
            ResearchSpot = "0";
        }                                                                                                                       //0:研究成果 1:行业聚焦 2:风云人物
        else if (rbhyjj.Checked)
        {
            ResearchSpot = "1";
        }
        else if (rbfyrw.Checked)
        {
            ResearchSpot = "2";
        }
        else
        {
            ResearchSpot = "";
        }
        NewsModel.ResearchSpot = ResearchSpot;

        #region 短信息表
        shortInfoRule.ShortTitle         = txtShortTitle.Text.ToString().Trim();   //短标题
        shortInfoRule.ShortContent       = txtShortContent.Text.ToString().Trim(); //短内容
        shortInfoRule.ShortInfoControlID = "NewsIndex1";                           //信息容量
        shortInfoRule.Remark             = "";
        shortInfoRule.ChangeTime         = Convert.ToDateTime(DateTime.Now);       //时间
        shortInfoRule.ChangeBy           = LogingName;                             //创建人

        #endregion
        //插入数据
        Tz888.BLL.zx.NewsTabManager bll = new Tz888.BLL.zx.NewsTabManager();
        long InfoID = bll.Update(main, NewsModel, shortInfoRule);


        if (InfoID >= 0)
        {
            int num = serivice.ModifyHtmlFile(Convert.ToInt32(InfoID));
            if (num >= 0)
            {
                cc = cc.NewsIdAll(Convert.ToInt32(InfoID));
                serivice.CreateHtml(Convert.ToInt32(InfoID), cc.Title, cc.PublishT.ToString(), cc.Content, cc.Hit, "tz888Admin", "mtvc2909");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "审核失败");
            }

            Tz888.Common.MessageBox.Show(this.Page, "审核成功");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
        if (InfoID <= 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
    }
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        string infoid = Request["infoID"].ToString();   //获取ID
        //List<Tz888.Model.Common.IndustryModel> industryModels = new List<Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        string Indus = this.ddlIndustry.SelectedValue.ToString().Trim();

        Tz888.Model.Info.MainInfoModel            main          = new Tz888.Model.Info.MainInfoModel();            //主表
        Tz888.Model.Carveout.CarveOutInfoTabModel CarveModel    = new Tz888.Model.Carveout.CarveOutInfoTabModel(); //创业信息表
        Tz888.Model.Info.ShortInfoModel           shortInfoRule = new Tz888.Model.Info.ShortInfoModel();           //短消息表
        #region 主表
        main.InfoID   = Convert.ToInt32(infoid);
        main.Title    = txtTitle.Text.Trim();
        main.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Carve", Indus, this.ZoneSelectControl2.CountryID, DateTime.Now);
        //main.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Carve", industryModels[0].IndustryBID, this.ZoneSelectControl2.CountryID, DateTime.Now);
        main.publishT  = Convert.ToDateTime(DateTime.Now);
        main.Hit       = Convert.ToInt32(txtHit.Text.ToString().Trim());
        main.LoginName = txtLoginName.Text.ToString().Trim();
        //main.LoginName = Page.User.Identity.Name;
        main.InfoOriginRoleName = "0";

        main.KeyWord           = txtKeyWord.Text.Trim();
        main.Descript          = txtDescript.Text.Trim();
        main.DisplayTitle      = txtDisplayTitle.Text.Trim();
        main.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now);
        main.ValidateStartTime = Convert.ToDateTime(DateTime.Now);
        main.ValidateTerm      = Convert.ToInt32(this.rdbtXM.SelectedValue.Trim());
        int GradeID = Int32.Parse(ddlSetGrade.SelectedValue.ToString().Trim());
        main.GradeID = GradeID.ToString().Trim();

        main.TemplateID = "001";

        int Auditting = 0;
        Auditting           = Convert.ToByte(this.rblAuditing.SelectedValue.Trim());//审核状态
        main.AuditingStatus = Auditting;

        if (Auditting == 1)
        {
            main.HtmlFile = "CarveOut/" + DateTime.Now.ToString("yyyyMM") + "/CarveOut" + DateTime.Now.ToString("yyyyMMdd") + "_" + infoid + ".shtml";
        }
        else
        {
            main.HtmlFile = "";
        }
        #endregion


        #region 创业信息表
        CarveModel.AdTitle            = txtAdTitle.Text.Trim();
        CarveModel.CarveOutInfoType   = Convert.ToString(this.rdoType.SelectedValue.Trim()); //1代表是资金找项目
        CarveModel.CountryCode        = ZoneSelectControl2.CountryID.ToString().Trim();
        CarveModel.ProvinceID         = ZoneSelectControl2.ProvinceID.ToString().Trim();
        CarveModel.CountyID           = ZoneSelectControl2.CountyID.ToString().Trim();
        CarveModel.CityID             = ZoneSelectControl2.CityID.ToString().Trim();
        CarveModel.CapitalID          = ddlMerchantTotal.SelectedValue.ToString().Trim(); //投资金额
        CarveModel.IndustryCarveOutID = ddlIndustry.SelectedValue.ToString().Trim();      //行页

        CarveModel.ValidateID = this.rdbtXM.SelectedValue.Trim();                         //有效期
        //CarveModel.ValidateID = this.rdbtXM.SelectedValue.Trim(); //有效期
        CarveModel.InvestObject = rblInvestObject.SelectedIndex.ToString().Trim();        //合作对象
        CarveModel.Pic1         = Convert.ToString(ViewState["strSavePath"]);             // FilesUploadControl2.UploadImageURL;

        // pOpportunity.Pic1 = "";                   //图片
        CarveModel.Content      = txtContent.Text;                                                                           //创业内容
        CarveModel.InvestReturn = txtInvestReturn.Text.Trim();
        CarveModel.Remark       = txtRemark.Text;                                                                            //备注

        CarveModel.ComName  = txtComName.Text.Trim();                                                                        //公司名称
        CarveModel.LinkMan  = txtLinkMan.Text.Trim();                                                                        //联系人
        CarveModel.Tel      = txtTelCountry.Text.Trim() + "-" + txtTelZoneCode.Text.Trim() + "-" + txtTelNumber.Text.Trim(); //电话
        CarveModel.Fax      = "";
        CarveModel.Mobile   = txtMobile.Text.Trim();                                                                         //手机
        CarveModel.Address  = txtAddress.Text.Trim();                                                                        //地址
        CarveModel.PostCode = txtPostCode.Text.Trim();                                                                       //邮编
        CarveModel.Email    = txtEmail.Text.Trim();                                                                          //邮箱
        CarveModel.WebSite  = txtWebSite.Text.Trim();                                                                        //网站
        #endregion

        #region  短内容信息表

        shortInfoRule.ShortInfoControlID = "CarveOutIndex1";
        shortInfoRule.ShortTitle         = txtShortTitle.Text.Trim();
        shortInfoRule.ShortContent       = txtShortContent.Text.Trim();
        shortInfoRule.Remark             = "";
        #endregion
        //插入数据
        Tz888.BLL.CarveOut.CarveOutInfoManager bll = new Tz888.BLL.CarveOut.CarveOutInfoManager();
        long InfoID = bll.Update(main, CarveModel, shortInfoRule);

        if (InfoID >= 0)
        {
            int num = service.ModifyHtmlFile(Convert.ToInt32(InfoID));
            if (num >= 0)
            {
                page = page.NewsIdAll(Convert.ToInt32(InfoID));
                service.CreateHtml(Convert.ToInt32(InfoID), page.Title, page.PublishT.ToString(), page.Content, page.Hit, page.Address, page.CapitalID, page.ComName, page.Email, page.IndustryCarveOutID, page.InvestObject, page.InvestReturn, page.LinkMan, page.PostCode, page.ProvinceID, page.Tel, page.ValidateID, page.WebSite, page.KeyWord, page.CarveOutInfoType, "tz888Admin", "mtvc2909");
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "审核失败");
            }

            Tz888.Common.MessageBox.Show(this.Page, "审核成功");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
        if (InfoID <= 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
    }
    protected void BtnOk_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.ProjectInfoBLL     projectObj       = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel    mainInfoModel    = new Tz888.Model.Info.MainInfoModel();              //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel projectInfoModel = new Tz888.Model.Info.ProjectInfoModel();           //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel   sortInfoModel    = new Tz888.Model.Info.ShortInfoModel();             //创建短信息实体

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY";
        projectInfoModel.ProjectCurrency = "CNY";

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim()); //投资总额
        }
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();                      //融资金额
        //项目说明
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtProIntro.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "10";//股权融资

        projectInfoModel.financingID    = rbtnObj.SelectedValue;
        projectInfoModel.SellStockShare = Convert.ToInt32(txtSellStockShare.Text.Trim()); //出让股份
        string returnmodelid = "";                                                        //退出方式

        for (int i = 0; i < chkReturn.Items.Count; i++)
        {
            if (chkReturn.Items[i].Selected)
            {
                returnmodelid += chkReturn.Items[i].Value + ",";
            }
        }
        projectInfoModel.ReturnModeID = returnmodelid;
        if (rbtnObj.SelectedValue != "")
        {
            projectInfoModel.financingID = rbtnObj.SelectedValue.Trim();//融资对象
        }
        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = fz_LoginName;
        mainInfoModel.InfoOriginRoleName = "1"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;

        string keyword = "";

        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Convert.ToInt32(this.rbtnValiDate.SelectedValue.Trim());
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        long infoID = projectObj.PublishProjectGQ1(mainInfoModel, projectInfoModel, sortInfoModel);

        if (infoID > 0)
        {
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, infoID);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(infoID, HtmlFile);

            //补充信息

            projectInfoModel.ProjectAbout       = txtProjectAbout.Value.Trim();
            projectInfoModel.marketAbout        = txtMarketAbout.Value.Trim();
            projectInfoModel.competitioAbout    = txtCompetitioAbout.Value.Trim();
            projectInfoModel.BussinessModeAbout = txtBussinessModeAbout.Value.Trim();
            projectInfoModel.ManageTeamAbout    = txtManageTeamAbout.Value.Trim();
            projectInfoModel.InfoID             = infoID;
            projectObj.PublishProjectGQ2(projectInfoModel);


            //添加附件
            List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();
            infoResourceModels = this.ImageUploadControl1.InfoList;
            if (infoResourceModels != null)
            {
                Tz888.SQLServerDAL.Info.InfoResourceDAL obj2 = new Tz888.SQLServerDAL.Info.InfoResourceDAL();
                foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
                {
                    ResModel.InfoID = infoID;
                    obj2.Insert(ResModel);
                }
            }

            //联系信息
            Tz888.BLL.Info.InfoContact        dal   = new Tz888.BLL.Info.InfoContact();
            Tz888.Model.Info.InfoContactModel model = new Tz888.Model.Info.InfoContactModel();

            model.InfoID           = infoID;
            model.OrganizationName = txtCompanyName.Value.Trim();
            model.Name             = txtLinkMan.Value.Trim();
            model.Career           = txtCareer.Value.Trim();
            model.TelStateCode     = txtTelStateCode.Value.Trim();
            model.TelNum           = txtTel.Value.Trim();
            model.Mobile           = txtMobile.Value.Trim();
            model.Address          = txtAddress.Value.Trim();
            model.WebSite          = txtWebSite.Value.Trim();
            model.Email            = txtEmail.Value.Trim();
            bool b = dal.Add(model);
            {
                Tz888.Common.MessageBox.Show(this.Page, "发布成功!");
            }
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Exemple #19
0
    protected void btnIssueOK_Click(object sender, EventArgs e)
    {
        //if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
        //{
        //    //Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
        //    //Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('验证码错误!');", false);

        //    Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "ValidErr();", true);
        //    return;
        //}


        #region [暂不用]
        //string IPAddress = String.Empty;
        //IPAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        //if (null == IPAddress || IPAddress == String.Empty)
        //{
        //    IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
        //}
        //if (null == IPAddress || IPAddress == String.Empty)
        //{
        //    IPAddress = HttpContext.Current.Request.UserHostAddress;
        //}

        //ipAddressForInfo.ipAddressForInfo obj = new ipAddressForInfo.ipAddressForInfo();

        //DataSet ds = new DataSet();

        //ds = obj.readIPAddress(Page.User.Identity.Name, IPAddress);

        //if (ds.Tables["projectinfoIP"].Rows.Count != 0)
        //{
        //    DateTime dtForDB = Convert.ToDateTime(ds.Tables["projectinfoIP"].Rows[0]["postdate"].ToString());
        //    DateTime dtForClient = Convert.ToDateTime(DateTime.Now);

        //    TimeSpan ts = dtForClient - dtForDB;

        //    if ((int)ts.TotalMinutes <= 3)
        //    {
        //        Response.Write("三分钟内不允许重复发布信息!");
        //        Response.End();
        //    }

        //    //if (ds.Tables["projectinfoIP"].Rows.Count >= 5)
        //    //{
        //    //    Response.Write("当天只能发布5条记录");
        //    //    Response.End();
        //    //}
        //}
        #endregion

        Tz888.BLL.Info.ProjectInfoBLL     projectObj       = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel    mainInfoModel    = new Tz888.Model.Info.MainInfoModel();                      //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel projectInfoModel = new Tz888.Model.Info.ProjectInfoModel();                   //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel   sortInfoModel    = new Tz888.Model.Info.ShortInfoModel();                     //创建短信息实体

        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>();         //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY";
        projectInfoModel.ProjectCurrency = "CNY";


        //投资总额
        //if (!string.IsNullOrEmpty(txtCapitalTotal.Value.Trim()))
        //    projectInfoModel.CapitalTotal = 20;


        projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        //借钱金额
        projectInfoModel.CapitalID = "0";
        //项目详细描述
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.tbXmqxms.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        projectInfoModel.financingID = "01,";
        //融资计划及还款能力
        projectInfoModel.warrant = "";

        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        projectInfoModel.cZqXmlxqkb = "1,";
        //企业发展阶段
        projectInfoModel.cZqQyfzjd = "1";
        //要求资金到位情况
        projectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率
        projectInfoModel.iZqCpsczzl = 1;
        //产品市场容量
        projectInfoModel.iZqCpscYl = 1;
        //资产负债率
        projectInfoModel.iZqZcfzl = 1;
        //流动比率
        projectInfoModel.iZqYdbl = 1;
        //投资收益率
        projectInfoModel.iZqTzsl = 1;
        //销售利润率
        projectInfoModel.iZqXslyl = 1;
        //投资回报期
        projectInfoModel.iZqTzfbq = 1;
        //项目有效期限
        projectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        projectInfoModel.ComBrief = "";
        //项目关键字 textbox
        string strXmgjz = "";
        projectInfoModel.cZqXmgjz = strXmgjz;


        //##项目详细资料
        //*借款单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*借款单位年净利润
        projectInfoModel.nDwljly = 1;
        //*借款单位总资产
        projectInfoModel.nDwzzc = 1;
        //*借款单位总负债
        projectInfoModel.nDwzfz = 1;


        //产品概述
        projectInfoModel.cZqCpks = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.cZqJzfx = "";
        //商业模式
        projectInfoModel.cZqSyms = "";
        //管理团队
        projectInfoModel.cZqGltd = "";

        //信息完整度
        projectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------



        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        string str = industryModels[0].IndustryBID;
        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore = true;
        //  mainInfoModel.LoginName = "topfo001";
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.ValidateTerm       = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        string theURL = Request.CurrentExecutionFilePath;


        //上传文件
        // infoResourceModels = FilesUploadControl1.InfoList;


        //包括上传文件
        long infoID = projectObj.PublishProjectZQ1(mainInfoModel, projectInfoModel, sortInfoModel, infoResourceModels);
        _infoID = infoID;

        //暂不用
        //obj.insertIPAddress(infoID, Page.User.Identity.Name, theURL, IPAddress, DateTime.Now); //将用户IP地址入库

        if (infoID > 0)
        {
            //如果是会员,则生成静态页
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                string HtmlFile = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(infoID, HtmlFile);
                string actionMsg = "";
                //Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                //staticobj.CreateStaticPageProject_V3(infoID.ToString(), ref actionMsg);
            }
            //Response.Redirect("zq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));

            //第二步,确认联络方式
            ConfirmContact();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Exemple #20
0
    protected void btnIssueOK_Click(object sender, EventArgs e)
    {
        //判断电话与手机号
        if (txtTel.Value.Trim() == "" && txtMobile.Value.Trim() == "")
        {
            //Tz888.Common.MessageBox.Show(this.Page, "固定电话或手机至少填写一项,请检查!");
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "alert('固定电话或手机至少填写一项,请检查!');", false);
            return;
        }
        Tz888.BLL.Info.ProjectInfoBLL             projectObj         = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel            mainInfoModel      = new Tz888.Model.Info.MainInfoModel();            //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel         projectInfoModel   = new Tz888.Model.Info.ProjectInfoModel();         //创建融资信息实体
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        Tz888.BLL.Info.InfoContact              dal            = new Tz888.BLL.Info.InfoContact();
        Tz888.Model.Info.InfoContactModel       model          = new Tz888.Model.Info.InfoContactModel();
        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode = this.ZoneSelectControl1.CountryID;  //*国家代码
        projectInfoModel.ProvinceID  = this.ZoneSelectControl1.ProvinceID; //*省
        projectInfoModel.CityID      = this.ZoneSelectControl1.CityID;     //*州或城市
        projectInfoModel.CountyID    = this.ZoneSelectControl1.CountyID;   //*县

        //*项目名称
        projectInfoModel.ProjectName = this.txtProjectName.Value.Trim();

        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY"; //*资本金币种
        projectInfoModel.ProjectCurrency = "CNY"; //*资本金币种

        //*项目投资总额
        if (!string.IsNullOrEmpty(txtCapitalTotal.Value.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        }

        //*融资金额
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();

        //项目说明
        projectInfoModel.ComBrief = Tz888.Common.Utility.PageValidate.TxtToHtml(txtProIntro.Value.Trim());

        //行业
        foreach (Tz888.Model.Common.IndustryModel models in industryModels)
        {
            projectInfoModel.IndustryBID += models.IndustryBID + ",";
        }

        //股权融资
        projectInfoModel.CooperationDemandType = "10";

        //*融资对像

        projectInfoModel.financingID = "";

        //*融资额占股份比重
        projectInfoModel.SellStockShare = 1;


        //##20100603新加入字段
        //*项目立项情况 checkboxlist
        projectInfoModel.sXmlxqk = "";
        //*项目关键字 textbox
        //string strXmgjz = "";
        //if (Xmgjz1.Value.Trim() != "")
        //{
        //    strXmgjz = Xmgjz1.Value.Trim() + ",";
        //}
        //if (Xmgjz2.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz2.Value.Trim() + ",";
        //}
        //if (Xmgjz3.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz3.Value.Trim();
        //}
        projectInfoModel.sXmgjz = "融资";
        //*退出方式
        projectInfoModel.ReturnModeID = "";
        //*企业发展阶段
        projectInfoModel.sQyfzjd = "";
        //*要求资金到位情况
        projectInfoModel.iYqzjdwqk = 1;
        //*市场占有率(份额)
        projectInfoModel.iSczylfy = 1;
        //*行业市场增长率
        projectInfoModel.iHysczzl = 1;
        //*资产负债率
        projectInfoModel.iZcfzl = 1;
        //*项目投资回报周期
        projectInfoModel.iXmtzfbzq = 1;
        //*项目详细描术
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtXmqxms.Value.Trim());


        //##项目详细资料
        //*单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*单位年净利润
        projectInfoModel.nDwljly = 1;
        //*单位总资产
        projectInfoModel.nDwzzc = 1;
        //*单位总负债
        projectInfoModel.nDwzfz = 1;

        //产品概述
        projectInfoModel.ProjectAbout = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.competitioAbout = "";
        //商业模式
        projectInfoModel.BussinessModeAbout = "";
        //管理团队
        projectInfoModel.ManageTeamAbout = txtManageTeamAbout.Value.Trim();


        //-----------------------------------主表信息-------------
        //项目标题
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.Descript           = "";

        //项目标题
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }

        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";
        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;


        model.OrganizationName = txtCompanyName.Value.Trim();
        model.Name             = txtLinkMan.Value.Trim();
        model.Career           = txtCareer.Value.Trim();
        model.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

        if (telFg.Value.Trim() != "")                          //如果分机号不为空
        {
            model.TelNum = txtTel.Value.Trim() + "-" + telFg.Value.Trim();
        }
        else
        {
            model.TelNum = txtTel.Value.Trim(); //电话号加分机号
        }
        model.Mobile  = txtMobile.Value.Trim();
        model.Address = txtAddress.Value.Trim();
        model.WebSite = txtWebSite.Value.Trim();
        model.Email   = txtEmail.Value.Trim();

        long num = projectObj.InsertNew(mainInfoModel, projectInfoModel, model, infoResourceModels);
        {
            if (num > 0)
            {
                Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + txtProjectName.Value.Trim()));
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
            }
        }
    }
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        string infoid = Request.QueryString["id"].ToString();
        //List<Tz888.Model.Common.IndustryModel> industryModels = new List<Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        string Indus = this.ddlIndustry.SelectedValue.ToString().Trim();
        int    Hit   = 0;
        Random rnd   = new Random();

        Hit = rnd.Next(25) + 5;
        Tz888.Model.Info.MainInfoModel        main          = new Tz888.Model.Info.MainInfoModel();        //主表
        Tz888.Model.Info.CarveOutInfoTabModel CarveModel    = new Tz888.Model.Info.CarveOutInfoTabModel(); //创业信息表
        Tz888.Model.Info.ShortInfoModel       shortInfoRule = new Tz888.Model.Info.ShortInfoModel();       //短消息表
        #region 主表
        main.InfoID   = Convert.ToInt32(infoid);
        main.Title    = txtTitle.Text.Trim();
        main.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Carve", Indus, this.ZoneSelectControl2.CountryID, DateTime.Now);
        //main.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Carve", industryModels[0].IndustryBID, this.ZoneSelectControl2.CountryID, DateTime.Now);
        main.publishT  = Convert.ToDateTime(DateTime.Now);
        main.Hit       = Hit;
        main.LoginName = "262734254";
        //main.LoginName = Page.User.Identity.Name;
        main.InfoOriginRoleName = "0";

        main.KeyWord           = txtKeyWord.Text.Trim();
        main.Descript          = txtDescript.Text.Trim();
        main.DisplayTitle      = txtDisplayTitle.Text.Trim();
        main.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now);
        main.ValidateStartTime = Convert.ToDateTime(DateTime.Now);
        main.ValidateTerm      = Convert.ToInt32(this.rdbtXM.SelectedValue.Trim());
        main.TemplateID        = "001";
        main.HtmlFile          = "";
        #endregion


        #region 创业信息表
        CarveModel.AdTitle            = txtAdTitle.Text.Trim();
        CarveModel.CarveOutInfoType   = "1"; //1代表是资金找项目
        CarveModel.CountryCode        = ZoneSelectControl2.CountryID.ToString().Trim();
        CarveModel.ProvinceID         = ZoneSelectControl2.ProvinceID.ToString().Trim();
        CarveModel.CountyID           = ZoneSelectControl2.CountyID.ToString().Trim();
        CarveModel.CityID             = ZoneSelectControl2.CityID.ToString().Trim();
        CarveModel.CapitalID          = ddlMerchantTotal.SelectedValue.ToString().Trim(); //投资金额
        CarveModel.IndustryCarveOutID = ddlIndustry.SelectedValue;                        //行页
        CarveModel.ValidateID         = this.rdbtXM.SelectedValue.Trim();

        //CarveModel.ValidateID = this.rdbtXM.SelectedValue.Trim(); //有效期
        CarveModel.InvestObject = rblInvestObject.SelectedIndex.ToString().Trim();                                           //合作对象
        CarveModel.Pic1         = Convert.ToString(ViewState["strSavePath"]);                                                // FilesUploadControl2.UploadImageURL;
        // pOpportunity.Pic1 = "";                   //图片
        CarveModel.Content      = txtContent.Text;                                                                           //创业内容
        CarveModel.InvestReturn = txtInvestReturn.Text.Trim();
        CarveModel.Remark       = txtRemark.Text;                                                                            //备注

        CarveModel.ComName  = txtComName.Text.Trim();                                                                        //公司名称
        CarveModel.LinkMan  = txtLinkMan.Text.Trim();                                                                        //联系人
        CarveModel.Tel      = txtTelCountry.Text.Trim() + "-" + txtTelZoneCode.Text.Trim() + "-" + txtTelNumber.Text.Trim(); //电话
        CarveModel.Fax      = "";
        CarveModel.Mobile   = txtMobile.Text.Trim();                                                                         //手机
        CarveModel.Address  = txtAddress.Text.Trim();                                                                        //地址
        CarveModel.PostCode = txtPostCode.Text.Trim();                                                                       //邮编
        CarveModel.Email    = txtEmail.Text.Trim();                                                                          //邮箱
        CarveModel.WebSite  = txtWebSite.Text.Trim();                                                                        //网站
        #endregion

        #region  短内容信息表

        shortInfoRule.ShortInfoControlID = "CarveOutIndex1";
        shortInfoRule.ShortTitle         = txtShortTitle.Text.Trim();
        shortInfoRule.ShortContent       = txtShortContent.Text.Trim();
        shortInfoRule.Remark             = "";
        #endregion
        //插入数据
        Tz888.BLL.Info.CarveOutInformationBLL bll = new Tz888.BLL.Info.CarveOutInformationBLL();
        long InfoID = bll.Update(main, CarveModel, shortInfoRule);

        if (InfoID != 0)
        {
            Response.Write("<script>alert('修改成功')</script>");
        }
        else
        {
            Response.Write("<script language=\"javascript\">alert('修改失败');window.location.href='/PublishCarveOutFindProject.aspx';</script>");
        }
    }
    //第一步,写入数据库中
    private void InsertData()
    {
        Tz888.BLL.Info.ProjectInfoBLL             projectObj         = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel            mainInfoModel      = new Tz888.Model.Info.MainInfoModel();            //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel         projectInfoModel   = new Tz888.Model.Info.ProjectInfoModel();         //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel           sortInfoModel      = new Tz888.Model.Info.ShortInfoModel();           //创建短信息实体
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>();         //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        projectInfoModel.CountryCode = this.ZoneSelectControl1.CountryID;  //*国家代码
        projectInfoModel.ProvinceID  = this.ZoneSelectControl1.ProvinceID; //*省
        projectInfoModel.CityID      = this.ZoneSelectControl1.CityID;     //*州或城市
        projectInfoModel.CountyID    = this.ZoneSelectControl1.CountyID;   //*县

        //*项目名称
        projectInfoModel.ProjectName = this.txtProjectName.Value.Trim();

        projectInfoModel.RecTime         = DateTime.Now;
        projectInfoModel.CapitalCurrency = "CNY"; //*资本金币种
        projectInfoModel.ProjectCurrency = "CNY"; //*资本金币种

        //*项目投资总额
        if (!string.IsNullOrEmpty(txtCapitalTotal.Value.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Value.Trim());
        }

        //*融资金额
        projectInfoModel.CapitalID = this.rbtnCapital.SelectedValue.Trim();

        //项目说明
        projectInfoModel.ComBrief = Tz888.Common.Utility.PageValidate.TxtToHtml(txtProIntro.Value.Trim());

        //行业
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }

        //股权融资
        projectInfoModel.CooperationDemandType = "10";

        //*融资对像

        projectInfoModel.financingID = "";

        //*融资额占股份比重
        projectInfoModel.SellStockShare = 1;


        //##20100603新加入字段
        //*项目立项情况 checkboxlist
        projectInfoModel.sXmlxqk = "";
        //*项目关键字 textbox
        //string strXmgjz = "";
        //if (Xmgjz1.Value.Trim() != "")
        //{
        //    strXmgjz = Xmgjz1.Value.Trim() + ",";
        //}
        //if (Xmgjz2.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz2.Value.Trim() + ",";
        //}
        //if (Xmgjz3.Value.Trim() != "")
        //{
        //    strXmgjz += Xmgjz3.Value.Trim();
        //}
        projectInfoModel.sXmgjz = "融资";
        //*退出方式
        projectInfoModel.ReturnModeID = "";
        //*企业发展阶段
        projectInfoModel.sQyfzjd = "";
        //*要求资金到位情况
        projectInfoModel.iYqzjdwqk = 1;
        //*市场占有率(份额)
        projectInfoModel.iSczylfy = 1;
        //*行业市场增长率
        projectInfoModel.iHysczzl = 1;
        //*资产负债率
        projectInfoModel.iZcfzl = 1;
        //*项目投资回报周期
        projectInfoModel.iXmtzfbzq = 1;
        //*项目详细描术
        projectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtXmqxms.Value.Trim());


        //##项目详细资料
        //*单位年营业收入
        projectInfoModel.nDwlyysy = 1;
        //*单位年净利润
        projectInfoModel.nDwljly = 1;
        //*单位总资产
        projectInfoModel.nDwzzc = 1;
        //*单位总负债
        projectInfoModel.nDwzfz = 1;

        //产品概述
        projectInfoModel.ProjectAbout = "";
        //市场前景
        projectInfoModel.marketAbout = "";
        //竞争分析
        projectInfoModel.competitioAbout = "";
        //商业模式
        projectInfoModel.BussinessModeAbout = "";
        //管理团队
        projectInfoModel.ManageTeamAbout = txtManageTeamAbout.Value.Trim();
        //信息完整度得分
        projectInfoModel.InformationIntegrity = GetInformationIntegrity();

        //-----------------------------------主表信息-------------
        //项目标题
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.Descript           = "";

        //项目标题
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }

        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        //------------------------
        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

        long infoID = projectObj.PublishProjectGQ1(mainInfoModel, projectInfoModel, sortInfoModel, infoResourceModels);

        _infoID = infoID;

        if (infoID > 0)
        {
            //bool isTof = Page.User.IsInRole("GT1002");
            //if (isTof)
            //{
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, infoID);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(infoID, HtmlFile);
            //}
            //Response.Redirect("gq2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Value.Trim() + "|" + projectInfoModel.CooperationDemandType));

            //第二步,确认联络方式
            ConfirmContact();
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
    protected void BtnOk_Click(object sender, EventArgs e)
    {
        ////20090811 判断权限
        //Tz888.BLL.Login.LoginInfoBLL loginbll = new Tz888.BLL.Login.LoginInfoBLL();
        //bool yanzheng = loginbll.yanzheng(Page.User.Identity.Name);
        //if (!yanzheng)
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "发布失败,你没有发布信息的权限!\\n可能是你发布违规信息帐户被锁定了。\\n详情请联系客服。");
        //    return;
        //}
        ////-----end-

        Tz888.Model.Info.ProjectSetModel model = new Tz888.Model.Info.ProjectSetModel();
        //判断电话与手机号
        if (txtTel.Value.Trim() == "" && txtMobile.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "固定电话或手机至少填写一项,请检查!");
            return;
        }

        string IPAddress = String.Empty;

        IPAddress = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
        }
        if (null == IPAddress || IPAddress == String.Empty)
        {
            IPAddress = HttpContext.Current.Request.UserHostAddress;
        }

        ipAddressForInfo.ipAddressForInfo obj = new ipAddressForInfo.ipAddressForInfo();

        DataSet ds = new DataSet();

        //## ds = obj.readIPAddress(Page.User.Identity.Name, IPAddress);
        //ds = obj.readIPAddress(strLoginName, IPAddress);

        //if (ds.Tables["projectinfoIP"].Rows.Count != 0)
        //{
        //    DateTime dtForDB = Convert.ToDateTime(ds.Tables["projectinfoIP"].Rows[0]["postdate"].ToString());
        //    DateTime dtForClient = Convert.ToDateTime(DateTime.Now);

        //    TimeSpan ts = dtForClient - dtForDB;

        //    if ((int)ts.TotalMinutes <= 3)
        //    {
        //        Response.Write("三分钟内不允许重复发布信息!");
        //        Response.End();
        //    }

        //    //if (ds.Tables["projectinfoIP"].Rows.Count >= 5)
        //    //{
        //    //    Response.Write("当天只能发布5条记录");
        //    //    Response.End();
        //    //}
        //}

        Tz888.BLL.Info.ProjectInfoBLL             projectObj         = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.MainInfoModel            mainInfoModel      = new Tz888.Model.Info.MainInfoModel();            //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel         projectInfoModel   = new Tz888.Model.Info.ProjectInfoModel();         //创建融资信息实体
        Tz888.Model.Info.ShortInfoModel           sortInfoModel      = new Tz888.Model.Info.ShortInfoModel();           //创建短信息实体
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //上传文件


        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        DateTime time_Now = DateTime.Now;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        model.ProjectInfoModel.CountryCode     = this.ZoneSelectControl1.CountryID;
        model.ProjectInfoModel.ProvinceID      = this.ZoneSelectControl1.ProvinceID;
        model.ProjectInfoModel.CityID          = this.ZoneSelectControl1.CityID;
        model.ProjectInfoModel.CountyID        = this.ZoneSelectControl1.CountyID;
        model.ProjectInfoModel.ProjectName     = this.txtProjectName.Value.Trim();
        model.ProjectInfoModel.RecTime         = DateTime.Now;
        model.ProjectInfoModel.CapitalCurrency = "CNY";
        model.ProjectInfoModel.ProjectCurrency = "CNY";

        //投资总额
        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            model.ProjectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }

        //借钱金额
        model.ProjectInfoModel.CapitalID = rblJqjy.SelectedValue.Trim();
        //项目详细描述
        model.ProjectInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.tbXmqxms.Value.Trim());
        //行业
        foreach (Tz888.Model.Common.IndustryModel models in industryModels)
        {
            model.ProjectInfoModel.IndustryBID += models.IndustryBID + ",";
        }
        model.ProjectInfoModel.CooperationDemandType = "9";//债券融资

        //融资对象
        model.ProjectInfoModel.financingID = Tz888.Common.Text.GetCheckBoxList(cblTnObj);
        //融资计划及还款能力


        model.ProjectInfoModel.warrant = txtWarrant.Value.Trim();



        //-----------------201006资源超市第二次改版,----------------------//
        //项目立项情况
        model.ProjectInfoModel.cZqXmlxqkb = Tz888.Common.Text.GetCheckBoxList(cblXmlxqk);
        //企业发展阶段
        model.ProjectInfoModel.cZqQyfzjd = rblQyfzjd.SelectedValue.Trim();

        //要求资金到位情况
        model.ProjectInfoModel.iZqYqjjdwqk = Tz888.Common.Text.FormatData(rblYqzjdwqk.SelectedValue.Trim());
        //产品市场增长率
        model.ProjectInfoModel.iZqCpsczzl = Tz888.Common.Text.FormatData(tbCpsczzl.Value.Trim());

        //产品市场容量
        model.ProjectInfoModel.iZqCpscYl = Tz888.Common.Text.FormatData(tbCpscyl.Value.Trim());
        //资产负债率
        model.ProjectInfoModel.iZqZcfzl = Tz888.Common.Text.FormatData(tbZcfzl.Value.Trim());
        //流动比率
        model.ProjectInfoModel.iZqYdbl = Tz888.Common.Text.FormatData(tbLdbl.Value.Trim());
        //投资收益率


        model.ProjectInfoModel.iZqTzsl = Tz888.Common.Text.FormatData(tbTzsyl.Value.Trim());
        //销售利润率
        model.ProjectInfoModel.iZqXslyl = Tz888.Common.Text.FormatData(tbXslyl.Value.Trim());
        //投资回报期


        model.ProjectInfoModel.iZqTzfbq = Tz888.Common.Text.FormatData(rblXmtzfbzq.SelectedValue.Trim());
        //项目有效期限
        //model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim());
        //项目摘要
        model.ProjectInfoModel.ComBrief = tbXmzy.Value.Trim();

        //项目关键字 textbox
        string strXmgjz = "";

        if (tbXmgjz1.Value.Trim() != "")
        {
            strXmgjz = tbXmgjz1.Value.Trim() + ",";
        }
        if (tbXmgjz2.Value.Trim() != "")
        {
            strXmgjz += tbXmgjz2.Value.Trim() + ",";
        }
        if (tbXmgjz3.Value.Trim() != "")
        {
            strXmgjz += tbXmgjz3.Value.Trim();
        }
        model.ProjectInfoModel.cZqXmgjz = strXmgjz;

        model.ProjectInfoModel.nDwlyysy = Convert.ToDecimal(this.tbJkdwlyysy.Value);      //单位年营业收入
        model.ProjectInfoModel.nDwljly  = Convert.ToDecimal(this.tbJkdwljly.Value);       //单位年净利润
        model.ProjectInfoModel.nDwzzc   = Convert.ToDecimal(this.tbJkdwzzc.Value.Trim()); //单位总资产
        model.ProjectInfoModel.nDwzfz   = Convert.ToDecimal(this.tbJkdwzfz.Value.Trim()); //单位总负债
        //产品概述
        model.ProjectInfoModel.cZqCpks = tbCpks.Value.Trim();
        //市场前景
        model.ProjectInfoModel.marketAbout = tbScqj.Value.Trim();
        //竞争分析
        model.ProjectInfoModel.cZqJzfx = tbJjfs.Value.Trim();
        //商业模式
        model.ProjectInfoModel.cZqSyms = tbSyms.Value.Trim();
        //管理团队
        model.ProjectInfoModel.cZqGltd = tbGltd.Value.Trim();

        //信息完整度


        model.ProjectInfoModel.InformationIntegrity = GetInformationIntegrity();
        //-----------------END--------------------------------------------



        //-----------------------------------主表信息-------------
        if (!string.IsNullOrEmpty(this.txtProjectName.Value))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value);
        }

        string str = industryModels[0].IndustryBID;

        model.MainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        model.MainInfoModel.publishT = time_Now;
        model.MainInfoModel.Hit      = 0;
        model.MainInfoModel.InfoID   = _infoID2;
        model.MainInfoModel.IsCore   = true;
        //##mainInfoModel.LoginName = Page.User.Identity.Name;
        model.MainInfoModel.LoginName          = strLoginName;
        model.MainInfoModel.InfoOriginRoleName = "0"; //用户角色
        model.MainInfoModel.GradeID            = "0";
        model.MainInfoModel.FixPriceID         = "1";
        model.MainInfoModel.FeeStatus          = 0;
        //model.ProjectInfoModel.iZqXmyxqs = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        model.MainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtProjectName.Value.Trim()))
        {
            model.MainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        }
        model.MainInfoModel.FrontDisplayTime  = time_Now;
        model.MainInfoModel.ValidateStartTime = time_Now;
        model.ProjectInfoModel.iZqXmyxqs      = Tz888.Common.Text.FormatData(rblXmyxqxx.SelectedValue.Trim()); //*项目有效期限

        model.MainInfoModel.TemplateID = "001";
        model.MainInfoModel.HtmlFile   = "";

        //------------------------
        model.ShortInfoModel.ShortInfoControlID = "ProjectIndex1";
        model.ShortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProjectName.Value.Trim());
        model.ShortInfoModel.ShortContent       = "";
        model.ShortInfoModel.Remark             = "";

        string theURL = Request.CurrentExecutionFilePath;

        ////联系信息
        model.InfoContactModel.OrganizationName = txtCompanyName.Value.Trim();
        model.InfoContactModel.Name             = txtLinkMan.Value.Trim();
        model.InfoContactModel.Career           = txtCareer.Value.Trim();
        model.InfoContactModel.TelStateCode     = txtTelStateCode.Value.Trim();
        model.InfoContactModel.TelNum           = txtTel.Value.Trim();
        model.InfoContactModel.Mobile           = txtMobile.Value.Trim();
        model.InfoContactModel.Email            = txtEmail.Value.Trim();
        model.InfoContactModel.Address          = txtAddress.Value.Trim();
        model.InfoContactModel.WebSite          = txtWebSite.Value.Trim();



        //上传文件
        infoResourceModels = FilesUploadControl1.InfoList;

        Tz888.BLL.Info.ProjectInfoBLL bll = new Tz888.BLL.Info.ProjectInfoBLL();

        int returnValue = ConfirmContact();      //确认联络方式

        if (returnValue == 1)
        {
            if (bll.ProjectInfoZQ_Update(model, infoResourceModels))
            {
                bool isTof = Page.User.IsInRole("GT1002");
                if (isTof)
                {
                    if (string.IsNullOrEmpty(model.MainInfoModel.HtmlFile.Trim()))
                    {
                        model.MainInfoModel.HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", model.MainInfoModel.InfoCode, model.MainInfoModel.InfoID);
                    }
                    Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                    mainBll.HasHtmlFile(model.MainInfoModel.InfoID, model.MainInfoModel.HtmlFile);
                    string actionMsg = "";
                    Tz888.BLL.PageStatic.ProjectPageStatic staticobj = new Tz888.BLL.PageStatic.ProjectPageStatic();
                    staticobj.CreateStaticPageProject(model.MainInfoModel.InfoID.ToString(), ref actionMsg);
                }
                Tz888.Common.MessageBox.ShowAndHref("修改信息成功!", Request.Url.ToString());
            }
            else
            {
                Tz888.Common.MessageBox.ShowAndHref("修改信息失败!", Request.Url.ToString());
            }
        }
    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        Tz888.Model.Info.MainInfoModel  mainInfoModel = new Tz888.Model.Info.MainInfoModel();  //创建主体信息实体
        Tz888.Model.Info.ShortInfoModel sortInfoModel = new Tz888.Model.Info.ShortInfoModel(); //创建短信息实体
        Tz888.Model.UserInfoZ           model         = new Tz888.Model.UserInfoZ();           //申请提供专业服务实体
        Tz888.BLL.UserInfoH             dal           = new Tz888.BLL.UserInfoH();



        if (chkPost() != "")
        {
            MessageBox.Show(this.Page, chkPost());
            return;
        }

        //-----------------------------------申请提供专业服务信息-------------

        string userName = Page.User.Identity.Name; //获得用户名

        model.UserName      = userName;
        model.CompanyName   = this.txtCompanyName.Value.Trim();
        model.CountryCode   = this.ZoneSelectControl1.CountryID;
        model.ProvinceID    = this.ZoneSelectControl1.ProvinceID;
        model.CityID        = this.ZoneSelectControl1.CityID;
        model.CountyID      = this.ZoneSelectControl1.CountyID;
        model.Structid      = this.DropIndustry.SelectedValue;
        model.ServiesBID    = this.ServiesMoreControl1.ServicesBID;
        model.ServiesMID    = this.ServiesMoreControl1.ServicesMID;
        model.EmployeeCount = 0;
        if (this.txtEmployeeCount.Value.Trim() != "")
        {
            model.EmployeeCount = Convert.ToInt32(this.txtEmployeeCount.Value.Trim());
        }
        model.RegistMoeny = 0;
        if (this.txtRegistMoeny.Value.Trim() != "")
        {
            model.RegistMoeny = Convert.ToDecimal(this.txtRegistMoeny.Value.Trim());
        }
        model.RegistYear = 0;
        if (this.txtRegistYear.Value.Trim() != "")
        {
            model.RegistYear = Convert.ToDecimal(this.txtRegistYear.Value.Trim());
        }
        model.Turnover = 0;
        if (this.txtTurnover.Value.Trim() != "")
        {
            model.Turnover = Convert.ToDecimal(this.txtTurnover.Value.Trim());
        }
        model.BusinesDetails = this.txtBusinesDetails.Text.Trim();
        model.WebSite        = this.txtWebSite.Value.Trim();
        model.LinkMan        = this.txtLinkMan.Value.Trim();
        model.LinkTel        = this.txtLinkTel.Value.Trim();
        model.LinkFax        = this.txtLinkFax.Value.Trim();
        model.Email          = this.txtEmail.Value.Trim();

        //-----------------------------------主表信息-------------

        mainInfoModel.Title = this.txtCompanyName.Value;
        DateTime time_Now = DateTime.Now;

        mainInfoModel.InfoCode           = Tz888.BLL.Info.Common.CreateInfoCode("Offer", this.ServiesMoreControl1.ServicesBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT           = time_Now;
        mainInfoModel.Hit                = 0;
        mainInfoModel.IsCore             = true;
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;
        string keyword = "";

        mainInfoModel.Descript = this.txtBusinesDetails.Text.Trim();
        if (!string.IsNullOrEmpty(this.txtCompanyName.Value.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCompanyName.Value.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = 3;
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";


        //------------------------
        sortInfoModel.ShortInfoControlID = "OfferIndex1";
        sortInfoModel.ShortTitle         = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCompanyName.Value);
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";



        long infoID = dal.OfferInsert(mainInfoModel, model, sortInfoModel);

        if (infoID > 0)
        {
            MessageBox.ShowAndHref("申请提交成功!", "../PayManage/StructManage.aspx");
        }
    }
        public long Insert(
            Tz888.Model.Info.MainInfoModel mainInfoModel,
            Tz888.Model.Info.V124.CapitalInfoModel capitalInfoModel,
            Tz888.Model.Info.InfoContactModel infoContactModel,
            Tz888.Model.Info.ShortInfoModel shortInfoModel,
            List <Tz888.Model.Info.CapitalInfoAreaModel> capitalInfoAreaModels,
            // List<Tz888.Model.Info.InfoContactManModel> infoContactManModels,
            List <Tz888.Model.Info.InfoResourceModel> infoResourceModels
            )
        //以下是启用上传文件实体
        {
            SqlParameter[] parameters =
            {
                //---------------------资源信息主体----------------------
                new SqlParameter("@InfoID",                      SqlDbType.BigInt,           8),
                new SqlParameter("@Title",                       SqlDbType.VarChar,        100),
                new SqlParameter("@InfoCode",                    SqlDbType.Char,            30),
                new SqlParameter("@publishT",                    SqlDbType.DateTime),
                new SqlParameter("@Hit",                         SqlDbType.BigInt,           8),

                new SqlParameter("@IsCore",                      SqlDbType.Bit,              1),
                new SqlParameter("@IndexOrderNum",               SqlDbType.BigInt,           8),
                new SqlParameter("@IndexTopValidateDate",        SqlDbType.Int,              4),
                new SqlParameter("@IndexPicInfoNum",             SqlDbType.BigInt,           8),
                new SqlParameter("@InfoTypeOrderNum",            SqlDbType.BigInt,           8),
                new SqlParameter("@InfoTypeTopValidateDate",     SqlDbType.Int,              4),
                new SqlParameter("@InfoTypePicInfoNum",          SqlDbType.BigInt,           8),
                new SqlParameter("@LoginName",                   SqlDbType.Char,            16),
                new SqlParameter("@InfoOriginRoleName",          SqlDbType.Char,            10),
                new SqlParameter("@GradeID",                     SqlDbType.Char,            10),
                new SqlParameter("@FixPriceID",                  SqlDbType.Char,            10),

                new SqlParameter("@FeeStatus",                   SqlDbType.TinyInt,          1),

                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),

                //---------------------------END---------------------------

                //--------------------投资资源个性信息---------------------

                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),

                //---------------------------END---------------------------

                //-----------------------资源联系信息--------------------------

                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),

                //---------------------------END---------------------------

                //-------------------------短信息--------------------------

                new SqlParameter("@ShortInfoControlID",          SqlDbType.Char,            20),
                new SqlParameter("@ShortTitle",                  SqlDbType.VarChar,        100),
                new SqlParameter("@ShortContent",                SqlDbType.VarChar,        100),
                new SqlParameter("@strRemark",                   SqlDbType.VarChar,         50),

                //---------------------------END---------------------------

                //添加资本资源的其他参数
                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)
            };

            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value     = mainInfoModel.Title;
            parameters[2].Value     = mainInfoModel.InfoCode;
            parameters[3].Value     = mainInfoModel.publishT;
            parameters[4].Value     = mainInfoModel.Hit;

            parameters[5].Value  = mainInfoModel.IsCore;
            parameters[6].Value  = mainInfoModel.IndexOrderNum;
            parameters[7].Value  = mainInfoModel.IndexTopValidateDate;
            parameters[8].Value  = mainInfoModel.IndexPicInfoNum;
            parameters[9].Value  = mainInfoModel.InfoTypeOrderNum;
            parameters[10].Value = mainInfoModel.InfoTypeTopValidateDate;
            parameters[11].Value = mainInfoModel.InfoTypePicInfoNum;
            parameters[12].Value = mainInfoModel.LoginName;
            parameters[13].Value = mainInfoModel.InfoOriginRoleName;
            parameters[14].Value = mainInfoModel.GradeID;
            parameters[15].Value = mainInfoModel.FixPriceID;
            parameters[16].Value = mainInfoModel.FeeStatus;

            parameters[17].Value = mainInfoModel.KeyWord;
            parameters[18].Value = mainInfoModel.Descript;
            parameters[19].Value = mainInfoModel.DisplayTitle;
            parameters[20].Value = mainInfoModel.FrontDisplayTime;
            parameters[21].Value = mainInfoModel.ValidateStartTime;
            parameters[22].Value = mainInfoModel.ValidateTerm;
            parameters[23].Value = mainInfoModel.TemplateID;
            parameters[24].Value = mainInfoModel.HtmlFile;

            parameters[25].Value = capitalInfoModel.IndustryBID;
            parameters[26].Value = capitalInfoModel.CooperationDemandType;
            parameters[27].Value = capitalInfoModel.currency;
            parameters[28].Value = capitalInfoModel.CapitalID;
            parameters[29].Value = capitalInfoModel.CapitalTypeID;
            parameters[30].Value = capitalInfoModel.ComAbout;
            parameters[31].Value = capitalInfoModel.ComBreif;
            parameters[32].Value = capitalInfoModel.Remrk;
            parameters[33].Value = capitalInfoModel.isVIP;
            parameters[34].Value = capitalInfoModel.stageID;
            parameters[35].Value = capitalInfoModel.joinManageID;
            parameters[36].Value = capitalInfoModel.CooperationDemandTypeRemark;
            //新加的资本资源的 参数
            parameters[55].Value = capitalInfoModel.RegisteredCapital;
            parameters[56].Value = capitalInfoModel.TeamScale;
            parameters[57].Value = capitalInfoModel.AverageInvestment;
            parameters[58].Value = capitalInfoModel.SuccessfulInvestment;
            parameters[59].Value = capitalInfoModel.InvestmentDemand;
            parameters[60].Value = capitalInfoModel.SCountryID;
            parameters[61].Value = capitalInfoModel.SProvinceID;
            parameters[62].Value = capitalInfoModel.SCityID;
            parameters[63].Value = capitalInfoModel.SCountyID;
            parameters[64].Value = capitalInfoModel.Prorganizers;
            //结束处

            parameters[37].Value = infoContactModel.OrganizationName;
            parameters[38].Value = infoContactModel.OrgIntro;
            parameters[39].Value = infoContactModel.Name;
            parameters[40].Value = infoContactModel.TelCountryCode;
            parameters[41].Value = infoContactModel.TelStateCode;
            parameters[42].Value = infoContactModel.TelNum;
            parameters[43].Value = infoContactModel.FaxCountryCode;
            parameters[44].Value = infoContactModel.FaxStateCode;
            parameters[45].Value = infoContactModel.FaxNum;
            parameters[46].Value = infoContactModel.Mobile;
            parameters[47].Value = infoContactModel.Address;
            parameters[48].Value = infoContactModel.PostCode;
            parameters[49].Value = infoContactModel.Email;
            parameters[50].Value = infoContactModel.WebSite;

            parameters[51].Value = shortInfoModel.ShortInfoControlID;
            parameters[52].Value = shortInfoModel.ShortTitle;
            parameters[53].Value = shortInfoModel.ShortContent;
            parameters[54].Value = shortInfoModel.Remark;
            int  rowsAffected;
            long infoID;

            using (SqlConnection sqlConn = DbHelperSQL.GetSqlConnection())
            {
                sqlConn.Open();
                SqlTransaction sqlTran = sqlConn.BeginTransaction();
                try
                {
                    //插入投资资源信息
                    try
                    {
                        DbHelperSQL.RunProcedure(sqlConn, sqlTran, SP_CapitalInfoInfo_Insert, parameters, out rowsAffected);
                    }
                    catch (Exception ex2)
                    {
                        throw ex2;
                    }
                    infoID = (long)parameters[0].Value;
                    if (infoID < 0)
                    {
                        throw new Exception();
                    }

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

                    if (capitalInfoAreaModels != null)
                    {
                        //为投资信息添加多个投资区域
                        Tz888.SQLServerDAL.Info.CapitalInfoAreaDAL obj1 = new CapitalInfoAreaDAL();
                        foreach (Tz888.Model.Info.CapitalInfoAreaModel model in capitalInfoAreaModels)
                        {
                            model.InfoID = infoID;
                            obj1.Insert(sqlConn, sqlTran, model);

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

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

                    //if (infoContactManModels != null)
                    //{
                    //    //为投资资源添加多个联系人
                    //    Tz888.SQLServerDAL.Info.InfoContactManDAL obj2 = new InfoContactManDAL();
                    //    foreach (Tz888.Model.Info.InfoContactManModel model in infoContactManModels)
                    //    {
                    //        model.InfoID = infoID;
                    //        obj2.InsertContactMan(sqlConn, sqlTran, model);
                    //    }
                    //}

                    if (infoResourceModels != null)
                    {
                        //为投资信息添加多个资源
                        Tz888.SQLServerDAL.Info.InfoResourceDAL obj3 = new InfoResourceDAL();
                        foreach (Tz888.Model.Info.InfoResourceModel model in infoResourceModels)
                        {
                            model.InfoID = infoID;
                            obj3.InsertInfoResource(sqlConn, sqlTran, model, 1);
                        }
                    }


                    sqlTran.Commit();
                }
                catch
                {
                    sqlTran.Rollback();
                    infoID = -1;
                }
                finally
                {
                    sqlConn.Close();
                }
            }

            return(infoID);
        }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        Tz888.Model.Info.MainInfoModel  mainInfoModel = new Tz888.Model.Info.MainInfoModel();  //创建主体信息实体
        Tz888.Model.Info.ShortInfoModel sortInfoModel = new Tz888.Model.Info.ShortInfoModel(); //创建短信息实体
        Tz888.Model.UserInfoZ           model         = new Tz888.Model.UserInfoZ();
        Tz888.BLL.UserInfoH             dal           = new Tz888.BLL.UserInfoH();
        if (chkPost() != "")
        {
            MessageBox.Show(this.Page, chkPost());
            return;
        }
        model.InfoID      = int.Parse(Request.QueryString["InfoID"]);
        model.CompanyName = this.txtCompanyName.Value.Trim();
        model.CountryCode = this.ZoneSelectControl1.CountryID;
        model.ProvinceID  = this.ZoneSelectControl1.ProvinceID;
        model.CityID      = this.ZoneSelectControl1.CityID;
        model.CountyID    = this.ZoneSelectControl1.CountyID;
        model.Structid    = this.DropIndustry.SelectedValue;


        model.ServiesBID = this.ServiesMoreControl1.ServicesBID;
        model.ServiesMID = this.ServiesMoreControl1.ServicesMID;

        model.EmployeeCount = 0;
        if (this.txtEmployeeCount.Value.Trim() != "")
        {
            model.EmployeeCount = Convert.ToInt32(this.txtEmployeeCount.Value.Trim());
        }
        model.RegistMoeny = 0;
        if (this.txtRegistMoeny.Value.Trim() != "")
        {
            model.RegistMoeny = Convert.ToDecimal(this.txtRegistMoeny.Value.Trim());
        }
        model.RegistYear = 0;
        if (this.txtRegistYear.Value.Trim() != "")
        {
            model.RegistYear = Convert.ToDecimal(this.txtRegistYear.Value.Trim());
        }
        model.Turnover = 0;
        if (this.txtTurnover.Value.Trim() != "")
        {
            model.Turnover = Convert.ToDecimal(this.txtTurnover.Value.Trim());
        }
        model.BusinesDetails = this.txtBusinesDetails.Text.Trim();
        model.WebSite        = this.txtWebSite.Value.Trim();
        model.LinkMan        = this.txtLinkMan.Value.Trim();
        model.LinkTel        = this.txtLinkTel.Value.Trim();
        model.LinkFax        = this.txtLinkFax.Value.Trim();
        model.Email          = this.txtEmail.Value.Trim();
        //-----------------------------------主表信息-------------
        DateTime time_Now = DateTime.Now;

        mainInfoModel.Title    = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCompanyName.Value);
        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Offer", this.ServiesMoreControl1.ServicesBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.Descript = this.txtBusinesDetails.Text.Trim();

        //------------------------
        sortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCompanyName.Value);


        bool b = dal.update(mainInfoModel, model, sortInfoModel);

        if (b)
        {
            MessageBox.ShowAndHref("更新成功!", "../PayManage/StructManage.aspx");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "更改失败!");
        }
    }
Exemple #27
0
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //这里是判断验证码
        try//验证验证码
        {
            if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
            {
                Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
                return;
            }
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "未知错误!");
        }
        #region 参数

        List <Tz888.Model.Common.IndustryModel> industryModels = new List <Tz888.Model.Common.IndustryModel>(); //融资行业实体列表

        industryModels = this.SelectIndustryControl1.IndustryModels;

        #endregion
        int    Hit = 0;
        Random rnd = new Random();
        Hit = rnd.Next(25) + 5;
        #region 创建实例,将数据传入系统
        #region 插入数据
        //OpportunityInformation pOpportunity = new OpportunityInformation();
        Tz888.Model.Info.MainInfoModel        main          = new Tz888.Model.Info.MainInfoModel();        //主表
        Tz888.Model.Info.OpportunityInfoModel pOpportunity  = new Tz888.Model.Info.OpportunityInfoModel(); //商机信息表
        Tz888.Model.Info.ShortInfoModel       shortInfoRule = new Tz888.Model.Info.ShortInfoModel();       //短消息表
        #region 主表

        main.Title              = txtTitle.Text.Trim();
        main.InfoCode           = Tz888.BLL.Info.Common.CreateInfoCode("Oppor", industryModels[0].IndustryBID, this.ZoneSelectControl2.CountryID, DateTime.Now);
        main.publishT           = Convert.ToDateTime(DateTime.Now);
        main.Hit                = Hit;
        main.LoginName          = "8ming";
        main.InfoOriginRoleName = "0";

        main.KeyWord           = txtKeyWord.Text.Trim();
        main.Descript          = txtDescript.Text.Trim();
        main.DisplayTitle      = txtDisplayTitle.Text.Trim();
        main.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now);
        main.ValidateStartTime = Convert.ToDateTime(DateTime.Now);
        main.ValidateTerm      = Convert.ToInt32(this.rdbtXM.SelectedValue.Trim());;
        main.TemplateID        = "001";
        main.HtmlFile          = "";
        #endregion

        #region 商机信息表
        pOpportunity.AdTitle         = txtAdTitle.Text.Trim();
        pOpportunity.OpportunityType = ddlOpportunityType.SelectedValue.ToString().Trim();
        pOpportunity.CountryCode     = ZoneSelectControl2.CountryID;
        pOpportunity.ProvinceID      = ZoneSelectControl2.ProvinceID;
        pOpportunity.CountyID        = ZoneSelectControl2.CountyID;

        pOpportunity.IndustryOpportunityID = this.SelectIndustryControl1.IndustryString;
        pOpportunity.ValidateID            = this.rdbtXM.SelectedValue.Trim();

        // pOpportunity.Pic1 = FilesUploadControl2.UploadImageURL;
        // pOpportunity.Pic1 = "";                   //图片
        pOpportunity.Pic1 = Convert.ToString(ViewState["strSavePath"]);

        pOpportunity.Content  = txtContent.Text;                                                                               //商机内容
        pOpportunity.Analysis = txtAnalysis.Text;                                                                              //商机分析
        pOpportunity.Request  = txtRequest.Text;                                                                               //商机需求
        pOpportunity.Flow     = txtFlow.Text;                                                                                  //商机流程
        pOpportunity.Remark   = txtRemark.Text;                                                                                //备注

        pOpportunity.ComName  = txtComName.Text.Trim();                                                                        //公司名称
        pOpportunity.LinkMan  = txtLinkMan.Text.Trim();                                                                        //联系人
        pOpportunity.Tel      = txtTelCountry.Text.Trim() + "-" + txtTelZoneCode.Text.Trim() + "-" + txtTelNumber.Text.Trim(); //电话
        pOpportunity.Fax      = "";
        pOpportunity.Mobile   = txtMobile.Text.Trim();                                                                         //手机
        pOpportunity.Address  = txtAddress.Text.Trim();                                                                        //地址
        pOpportunity.PostCode = txtPostCode.Text.Trim();                                                                       //
        pOpportunity.Email    = txtEmail.Text.Trim();                                                                          //邮箱
        pOpportunity.WebSite  = txtWebSite.Text.Trim();                                                                        //
        #endregion

        #region  短内容信息表

        shortInfoRule.ShortInfoControlID = "OpporIndex1";
        shortInfoRule.ShortTitle         = txtShortTitle.Text.Trim();
        shortInfoRule.ShortContent       = txtShortContent.Text.Trim();
        shortInfoRule.Remark             = "";
        #endregion

        //插入数据
        Tz888.BLL.Info.OpportunityInfoBLL opportun = new Tz888.BLL.Info.OpportunityInfoBLL();
        long InfoID = opportun.Insert(main, pOpportunity, shortInfoRule);
        #endregion
        #endregion

        if (InfoID != 0)
        {
            Response.Write("<script>alert('添加成功')</script>");
        }
        else
        {
            Response.Write("<script language=\"javascript\">alert('添加失败');window.location.href='/PublishOppor.aspx';</script>");
        }
    }
Exemple #28
0
    protected void imgbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.ProjectInfoBLL projectObj = new Tz888.BLL.Info.ProjectInfoBLL();


        Tz888.Model.Info.MainInfoModel              mainInfoModel        = new Tz888.Model.Info.MainInfoModel();              //创建主体信息实体
        Tz888.Model.Info.ProjectInfoModel           projectInfoModel     = new Tz888.Model.Info.ProjectInfoModel();           //创建融资信息实体
        Tz888.Model.Info.InfoContactModel           infoContactModel     = new Tz888.Model.Info.InfoContactModel();           //创建信息联系方式主体
        Tz888.Model.Info.ShortInfoModel             sortInfoModel        = new Tz888.Model.Info.ShortInfoModel();             //创建短信息实体
        List <Tz888.Model.Common.IndustryModel>     industryModels       = new List <Tz888.Model.Common.IndustryModel>();     //融资行业实体列表
        List <Tz888.Model.Info.InfoContactManModel> infoContactManModels = new List <Tz888.Model.Info.InfoContactManModel>(); //联系人实体列表
        List <Tz888.Model.Info.InfoResourceModel>   infoResourceModels   = new List <Tz888.Model.Info.InfoResourceModel>();

        DateTime time_Now = DateTime.Now;

        infoContactModel     = this.ProjectAddressInfo1.InfoContact;
        industryModels       = this.SelectIndustryControl1.IndustryModels;
        infoContactManModels = this.ProjectAddressInfo1.InfoContactMans;

        projectInfoModel.CountryCode = this.ZoneSelectControl1.CountryID;
        projectInfoModel.ProvinceID  = this.ZoneSelectControl1.ProvinceID;
        projectInfoModel.CityID      = this.ZoneSelectControl1.CityID;
        projectInfoModel.CountyID    = this.ZoneSelectControl1.CountyID;
        projectInfoModel.ProjectName = this.txtProjectName.Text.Trim();
        projectInfoModel.RecTime     = time_Now;
        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                projectInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }
        projectInfoModel.CapitalCurrency = Convert.ToString(this.ddlCurrencyTotal.SelectedValue);

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }

        projectInfoModel.ProjectCurrency = Convert.ToString(this.ddlCurrency.SelectedValue);

        projectInfoModel.CapitalID = this.ddlCapital.SelectedValue.Trim();

        projectInfoModel.ComAbout = this.txtProIntro.Value.Trim();
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            projectInfoModel.IndustryBID += model.IndustryBID + ",";
        }
        projectInfoModel.ProjectNameBrief = "";


        mainInfoModel.Title = this.txtProjectName.Text;

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Project", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, time_Now);
        mainInfoModel.publishT = time_Now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore = true;
        //mainInfoModel.LoginName = ""; //用户名称
        mainInfoModel.LoginName          = fz_LoginName;
        mainInfoModel.InfoOriginRoleName = "1"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;

        string keyword = "";

        if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim()))
        {
            keyword += this.txtKeyword1.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim()))
        {
            keyword += this.txtKeyword2.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim()))
        {
            keyword += this.txtKeyword3.Text.Trim() + ",";
        }

        mainInfoModel.KeyWord           = keyword;
        mainInfoModel.Descript          = "";
        mainInfoModel.DisplayTitle      = this.txtProjectName.Text.Trim();
        mainInfoModel.FrontDisplayTime  = time_Now;
        mainInfoModel.ValidateStartTime = time_Now;
        mainInfoModel.ValidateTerm      = Convert.ToInt32(this.ddlValiditeTerm.SelectedValue.Trim());
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        sortInfoModel.ShortInfoControlID = "ProjectIndex1";
        sortInfoModel.ShortTitle         = this.txtProjectName.Text.Trim();
        sortInfoModel.ShortContent       = "";
        sortInfoModel.Remark             = "";

        //将已上传的图片从临时目录迁移到正式目录
        infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Project", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, ImageUploadControl1.InfoList);

        //将融资信息写入数据库,返回InfoID
        long infoID = projectObj.Insert(mainInfoModel, projectInfoModel, infoContactModel, sortInfoModel, infoContactManModels, infoResourceModels);

        if (infoID > 0)
        {
            Response.Redirect("Publishproject2.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Project|" + this.txtProjectName.Text.Trim() + "|" + projectInfoModel.CooperationDemandType));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
    protected void IbtnSubmit_Click(object sender, ImageClickEventArgs e)
    {
        //这里是判断验证码
        try//验证验证码
        {
            if (Session["valationNo"] == null || ImageCode.Text.ToUpper().Trim() != Session["valationNo"].ToString().ToUpper().Trim() || Session["valationNo"].ToString().Trim() == "")
            {
                Tz888.Common.MessageBox.Show(this.Page, "验证码错误!");
                //this.imgLoding.Visible = false;
                return;
            }
        }
        catch
        {
            Tz888.Common.MessageBox.Show(this.Page, "未知错误!");
        }

        //结束部分
        //实体部分
        this.imgLoding.Visible = true;
        Tz888.Model.Info.MainInfoModel          mainInfoModel     = new Tz888.Model.Info.MainInfoModel();               //创建主体信息实体
        Tz888.Model.Info.MerchantInfoModel      merchantInfoModel = new Tz888.Model.Info.MerchantInfoModel();           //创建招商信息实体
        Tz888.Model.Info.InfoContactModel       infoContactModel  = new Tz888.Model.Info.InfoContactModel();            //创建信息联系方式主体
        Tz888.Model.Info.ShortInfoModel         shortInfoModel    = new Tz888.Model.Info.ShortInfoModel();              //创建短信息实体
        List <Tz888.Model.Common.IndustryModel> industryModels    = new List <Tz888.Model.Common.IndustryModel>();      //融资行业实体列表
        // List<Tz888.Model.Info.InfoContactManModel> infoContactManModels = new List<Tz888.Model.Info.InfoContactManModel>(); //联系人实体列表
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>(); //招商信息资源信息实体

        DateTime time_now = DateTime.Now;

        //注意这里是联系方式的重新添加
        //infoContactModel = this.MerchantInfoAddressInfo1.InfoContact;

        industryModels = this.SelectIndustryControl1.IndustryModels;

        #region 招商信息实体赋值
        merchantInfoModel.MerchantTypeID = rblMerchantType.SelectedValue;
        merchantInfoModel.CountryCode    = ZoneSelectControl1.CountryID;
        merchantInfoModel.ProvinceID     = ZoneSelectControl1.ProvinceID;
        merchantInfoModel.CityID         = ZoneSelectControl1.CityID;
        merchantInfoModel.CountyID       = ZoneSelectControl1.CountyID;
        //if (!string.IsNullOrEmpty(MerchantInfoAddressInfo1.Undertaker))
        //    merchantInfoModel.ReceiveOrganization = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(MerchantInfoAddressInfo1.Undertaker);

        for (int i = 0; cblCooperationDemandType.Items.Count > i; i++)
        {
            if (cblCooperationDemandType.Items[i].Selected)
            {
                merchantInfoModel.CooperationDemandType += cblCooperationDemandType.Items[i].Value + ",";
            }
        }

        merchantInfoModel.CapitalCurrency = this.ddlCapitalCurrency.SelectedValue;

        if (!string.IsNullOrEmpty(this.txtCapitalTotal.Text.Trim()))
        {
            merchantInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }

        merchantInfoModel.MerchantCurrency = this.ddlMerchantCurrency.SelectedValue;
        merchantInfoModel.MerchantTotal    = this.ddlMerchantTotal.SelectedValue;

        if (!string.IsNullOrEmpty(this.txtZoneAbout.Value.Trim()))
        {
            merchantInfoModel.ZoneAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAbout.Value.Trim());
        }

        //这里是2010-06-01新加的招商信息
        if (!string.IsNullOrEmpty(this.txtZoneAboutBrief.Value.Trim()))
        {
            merchantInfoModel.ZoneAboutBrief = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAboutBrief.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtBenefit.Value.Trim()))
        {
            merchantInfoModel.Benefit = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtBenefit.Value.Trim());
        }

        if (!string.IsNullOrEmpty(this.txtEconomicIndicators.Value.Trim()))
        {
            merchantInfoModel.EconomicIndicators = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtEconomicIndicators.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtInvestmentEnvironment.Value.Trim()))
        {
            merchantInfoModel.InvestmentEnvironment = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtInvestmentEnvironment.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtProjectStatus.Value.Trim()))
        {
            merchantInfoModel.ProjectStatus = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtProjectStatus.Value.Trim());
        }
        if (!string.IsNullOrEmpty(this.txtMarket.Value.Trim()))
        {
            merchantInfoModel.Market = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtMarket.Value.Trim());
        }

        //结束处
        foreach (Tz888.Model.Common.IndustryModel model in industryModels)
        {
            merchantInfoModel.IndustryClassList += model.IndustryBID + ",";
        }

        //2010-06-08以下是对信息完整度的统计
        merchantInfoModel.InformationIntegrity = Tz888.BLL.Info.MarchantInfoBLL.CountInfoInte(merchantInfoModel, infoContactModel);

        #endregion

        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            mainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }

        mainInfoModel.InfoCode = Tz888.BLL.Info.Common.CreateInfoCode("Merchant", industryModels[0].IndustryBID, this.ZoneSelectControl1.CountryID, DateTime.Now);
        mainInfoModel.publishT = time_now;
        mainInfoModel.Hit      = 0;

        mainInfoModel.IsCore = true;
        //注意这里是添加主信息表与用户登陆表的通过用户名相联系
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = "1";
        mainInfoModel.FeeStatus          = 0;

        string keyword = "";
        if (!string.IsNullOrEmpty(this.txtKeyword1.Text.Trim()))
        {
            keyword += this.txtKeyword1.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword2.Text.Trim()))
        {
            keyword += this.txtKeyword2.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(this.txtKeyword3.Text.Trim()))
        {
            keyword += this.txtKeyword3.Text.Trim() + ",";
        }
        if (!string.IsNullOrEmpty(keyword))
        {
            mainInfoModel.KeyWord = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        }
        mainInfoModel.Descript = "";
        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            mainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }
        mainInfoModel.FrontDisplayTime  = time_now;
        mainInfoModel.ValidateStartTime = time_now;
        mainInfoModel.ValidateTerm      = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue.Trim());
        mainInfoModel.TemplateID        = "001";
        mainInfoModel.HtmlFile          = "";

        shortInfoModel.ShortInfoControlID = "MerchantIndex1";
        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            shortInfoModel.ShortTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }
        shortInfoModel.ShortContent = "";
        shortInfoModel.Remark       = "";

        //将已上传的图片从临时目录迁移到正式目录
        //infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Merchant", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, FilesUploadControl1.InfoList);
        infoResourceModels = FilesUploadControl1.InfoList;

        //联系方式赋值
        infoContactModel.OrganizationName = this.txtCompanyName.Text;
        infoContactModel.Name             = this.txtName.Text;
        infoContactModel.Position         = this.txtPosition.Text;
        infoContactModel.TelCountryCode   = this.txtTelCountry.Text;
        infoContactModel.TelStateCode     = this.txtTelZoneCode.Text;
        infoContactModel.TelNum           = this.txtTelNumber.Text;
        infoContactModel.Mobile           = this.txtMobile.Text;
        infoContactModel.Email            = this.txtEmail.Text;
        infoContactModel.Address          = this.txtAddress.Text;

        Tz888.BLL.Info.MarchantInfoBLL marchantObj = new Tz888.BLL.Info.MarchantInfoBLL();
        //插入数据
        long infoID = marchantObj.Insert(mainInfoModel, merchantInfoModel, infoContactModel, shortInfoModel, infoResourceModels);

        if (infoID > 0)
        {
            bool isTof = Page.User.IsInRole("GT1002");
            if (isTof)
            {
                string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Merchant", mainInfoModel.InfoCode, infoID);
                Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
                mainBll.HasHtmlFile(infoID, HtmlFile);
                string actionMsg = "";
                Tz888.BLL.PageStatic.MerchantPageStatic staticobj = new Tz888.BLL.PageStatic.MerchantPageStatic();
                staticobj.CreateStaticPageMerchant(infoID.ToString(), ref actionMsg);
            }
            Session["valationNo"] = null;
            Response.Redirect("PublishMerchant3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(infoID.ToString() + "|Merchant|" + this.txtMerchantTopic.Text.Trim()));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Exemple #30
0
 /// <summary>
 /// 修改商机信息
 /// </summary>
 public long HasModify(Tz888.Model.Info.MainInfoModel mainInfoModel,
                       Tz888.Model.Info.OpportunityInfoModel opportunity,
                       Tz888.Model.Info.ShortInfoModel shortInfoModel, int infodd)
 {
     return(dal.HasModify(mainInfoModel, opportunity, shortInfoModel, infodd));
 }