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

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

        if (b)
        {
            Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            Tz888.BLL.Info.MainInfoBLL     mainDAL       = new Tz888.BLL.Info.MainInfoBLL();
            mainInfoModel = mainDAL.GetModel(_infoID);
            string HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Project", mainInfoModel.InfoCode, _infoID);
            Tz888.BLL.Info.MainInfoBLL mainBll = new Tz888.BLL.Info.MainInfoBLL();
            mainBll.HasHtmlFile(_infoID, HtmlFile);
            string actionMsg = "";
            Tz888.BLL.PageStatic.ProjectPageStatic dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            dalPage.CreateStaticPageProject_New(_infoID.ToString(), ref actionMsg);
            Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + title));
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败..");
        }
    }
Exemple #2
0
    //第二步,确认联络方式
    private void ConfirmContact()
    {
        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.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

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

        if (b)
        {
            //    //用于生成静态页,暂不用
            //    Tz888.Model.Info.MainInfoModel mainInfoModel = new Tz888.Model.Info.MainInfoModel();
            //    Tz888.BLL.Info.MainInfoBLL mainDAL = new Tz888.BLL.Info.MainInfoBLL();
            //    mainInfoModel = mainDAL.GetModel(_infoID);
            string HtmlFile = "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 dalPage = new Tz888.BLL.PageStatic.ProjectPageStatic();
            //    //dalPage.CreateStaticPageProject_New(_infoID.ToString(), ref actionMsg);

            Response.Redirect("/Publish/Publishproject3.aspx?code=" + Tz888.Common.DEncrypt.DESEncrypt.Encrypt(_infoID.ToString() + "|Project|" + txtProjectName.Value.Trim()));
            Tz888.Common.MessageBox.Show(this.Page, "发布资源成功!");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系信息添加失败,请检查!");
        }
    }
    //第二步,确认联络方式
    private void ConfirmContact()
    {
        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.TelCountryCode   = telArea1.Value.Trim();        //新加的国际号
        model.TelStateCode     = txtTelStateCode.Value.Trim(); //区号

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

        if (b)
        {
            string auditing = this.rblAuditing.SelectedValue.ToString();
            if (auditing == "1")
            {
                string PointCount = txtPointCount.Text.ToString().Trim();
                string url        = "Project/" + DateTime.Now.ToString("yyyyMM") + "/Project" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
                merstatic.UpdateUrlPrice(url, _infoID, PointCount);
                #region 生成静态页面
                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>元";
                }
                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, "联系信息添加失败,请检查!");
        }
    }
    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, "发布失败!");
        }
    }