Example #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.ProjectInfoBLL     dal   = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.ProjectInfoModel model = new Tz888.Model.Info.ProjectInfoModel();

        model.ProjectAbout       = txtProjectAbout.Value.Trim();
        model.marketAbout        = txtMarketAbout.Value.Trim();
        model.competitioAbout    = txtCompetitioAbout.Value.Trim();
        model.BussinessModeAbout = txtBussinessModeAbout.Value.Trim();
        model.ManageTeamAbout    = txtManageTeamAbout.Value.Trim();
        model.InfoID             = _infoID;
        bool b = dal.PublishProjectGQ2(model);

        if (b)
        {
            Response.Redirect("ContactInfo.aspx?code=" + this.Page.Request.QueryString["code"].ToString());
        }
    }
    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 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());
            }
        }
    }
Example #4
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());
        }
    }
Example #5
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, "发布失败!");
        }
    }
Example #6
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, "发布失败!");
        }
    }
    //第一步,写入数据库中
    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, "发布失败!");
        }
    }
Example #8
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, "发布失败!");
            }
        }
    }
Example #9
0
    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, "发布失败!");
        }
    }
Example #10
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, "发布失败!");
        }
    }
Example #11
0
    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 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.Text.Trim()))
        {
            projectInfoModel.CapitalTotal = Convert.ToDecimal(txtCapitalTotal.Text.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 = "";

        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          = bp.LoginName;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        mainInfoModel.GradeID            = "0";
        mainInfoModel.FixPriceID         = this.rblFixPrice.SelectedValue.ToString().Trim();
        mainInfoModel.MainPointCount     = Convert.ToDecimal(txtPointCount.Text.ToString().Trim());
        mainInfoModel.AuditingStatus     = Convert.ToByte(this.rblAuditing.SelectedValue.ToString());
        mainInfoModel.FeeStatus          = 0;
        mainInfoModel.Descript           = this.txtProjectName.Value.ToString().Trim();

        //项目标题
        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.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)
            {
                string auditing = this.rblAuditing.SelectedValue.ToString();
                if (auditing == "1")
                {
                    string url = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + num + ".shtml";
                    merstatic.UpdateUrl(url, num);
                    #region 生成静态页面
                    state = page.SelProjectM(Convert.ToString(num));
                    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>元";
                    }
                    else
                    {
                        Fix = "免费";
                    }
                    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);
                    }
                    #endregion
                }
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('发布成功!');location.href='ProjectManage.aspx'", true);
            }
            else
            {
                Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
            }
        }
    }
Example #13
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Tz888.BLL.Info.ProjectInfoBLL     dal   = new Tz888.BLL.Info.ProjectInfoBLL();
        Tz888.Model.Info.ProjectInfoModel model = new Tz888.Model.Info.ProjectInfoModel();
        model.marketAbout = txtMarketAbout.Value.Trim();
        decimal CompanyNG = 0;

        if (Tz888.Common.Utility.PageValidate.IsNumber(txtCompanyNG.Value.Trim()))
        {
            CompanyNG = Convert.ToDecimal(txtCompanyNG.Value.Trim());
        }
        model.CompanyNG = CompanyNG;
        decimal CompanyTotalDebet = 0;

        if (Tz888.Common.Utility.PageValidate.IsNumber(txtCompanyTotalDebet.Value.Trim()))
        {
            CompanyTotalDebet = Convert.ToDecimal(txtCompanyTotalDebet.Value.Trim());
        }
        model.CompanyTotalDebet = CompanyTotalDebet;


        decimal CompanyYearIncome = 0;

        if (Tz888.Common.Utility.PageValidate.IsNumber(txtCompanyYearIncome.Value.Trim()))
        {
            CompanyYearIncome = Convert.ToDecimal(txtCompanyYearIncome.Value.Trim());
        }
        model.CompanyYearIncome = CompanyYearIncome;

        decimal CompanyTotalCapital = 0;

        if (Tz888.Common.Utility.PageValidate.IsNumber(txtCompanyTotalCapital.Value.Trim()))
        {
            CompanyYearIncome = Convert.ToDecimal(txtCompanyTotalCapital.Value.Trim());
        }
        model.CompanyTotalCapital = CompanyTotalCapital;

        model.InfoID = _infoID;
        bool b = dal.PublishProjectZQ2(model);

        //Response.Write(b.ToString());
        if (b)
        {
            //为信息添加多个资源
            List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();//资源信息实体
            infoResourceModels = FilesUploadControl1.InfoList;
            if (infoResourceModels != null)
            {
                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);
                    }
                }
            }

            Response.Redirect("ContactInfo.aspx?code=" + this.Page.Request.QueryString["code"].ToString());
        }
    }
Example #14
0
    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;

        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 = ""; //用户名称
        mainInfoModel.LoginName          = Page.User.Identity.Name;
        mainInfoModel.InfoOriginRoleName = "0"; //用户角色
        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)
        {
            //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));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }