public bool DeleteRes(long id)
    {
        Tz888.BLL.Info.InfoResourceBLL dal = new Tz888.BLL.Info.InfoResourceBLL();
        bool b = dal.Delete(id);

        return(b);
    }
Example #2
0
    public void AddRes(string filename, string filetype)
    {
        Tz888.Model.Info.InfoResourceModel model = new Tz888.Model.Info.InfoResourceModel();
        Tz888.BLL.Info.InfoResourceBLL     dal   = new Tz888.BLL.Info.InfoResourceBLL();
        model.InfoID        = _infoid;
        model.ResourceAddr  = filename;
        model.ResourceName  = infotype.Trim();
        model.ResourceTitle = txtFileName.Value.Trim();
        model.ResourceType  = Convert.ToInt32(filetype);
        model.UpDate        = DateTime.Now;
        model.IsDel         = false;
        long i = dal.Insert(model);

        if (i > 0)
        {
            Tz888.Common.MessageBox.ResponseScript(this.Page, "alert('上传成功..');parent.init();parent.Lock_CheckForm();");
        }
        else
        {
            Tz888.Common.MessageBox.ResponseScript(this.Page, "alert('上传失败..')");
        }
    }
    protected void btnUpdate_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.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();

        //model.InfoContactModel = this.CapitalAddressInfo1.InfoContact;
        model.CapitalInfoAreaModels = ZoneMoreSelectControl1.CapitalInfoAreaModels;

        //model.InfoContactModel.OrganizationName = this.txtGovName.Text;


        #region 投资信息实体赋值
        model.CapitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtCapitalIntent.Value.Trim());
        //if (!string.IsNullOrEmpty(this.rblfinancingTarget.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.CapitalTypeID = this.rblfinancingTarget.SelectedValue;
        //}
        if (!string.IsNullOrEmpty(this.rblCurreny.SelectedValue.ToString()))
        {
            model.CapitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
        }
        model.CapitalInfoModel.CooperationDemandType = "";
        model.CapitalInfoModel.IndustryBID           = this.SelectIndustryControl1.IndustryString;
        //if (!string.IsNullOrEmpty(rdlStage.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.stageID = Convert.ToInt32(this.rdlStage.SelectedValue.Trim());
        //}
        //if (!string.IsNullOrEmpty(this.rdlJoinManage.SelectedValue.ToString()))
        //{
        //    model.CapitalInfoModel.joinManageID = Convert.ToInt32(this.rdlJoinManage.SelectedValue.Trim());
        //}
        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                model.CapitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }
        //以下是需要添加的参数
        //注册资金
        model.CapitalInfoModel.RegisteredCapital = "";// this.rblRegisterdollar.SelectedValue;
        model.CapitalInfoModel.ComBreif          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(Tz888.Common.Utility.PageValidate.HtmlToTxt(""));
        //团队规模
        model.CapitalInfoModel.TeamScale = "";            //;this.rblTeam.SelectedValue;
        //机构年平均投资事件数
        model.CapitalInfoModel.AverageInvestment = "";    //this.rblPinJ.SelectedValue;
        //机构成功投资事件总数
        model.CapitalInfoModel.SuccessfulInvestment = ""; //this.rblSucess.SelectedValue;
        //投资需求摘要
        model.CapitalInfoModel.InvestmentDemand = "";     // this.txtDemand.Value;
        //添加所属区域

        //model.CapitalInfoModel.SCountryID = this.ZoneSelectControl1.CountryID;
        //model.CapitalInfoModel.SProvinceID = this.ZoneSelectControl1.ProvinceID;
        //model.CapitalInfoModel.SCityID = this.ZoneSelectControl1.CityID;
        //model.CapitalInfoModel.SCountyID = this.ZoneSelectControl1.CountyID;
        #endregion
        //2010-08-04

        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        model.MainInfoModel.publishT = Convert.ToDateTime(this.ViewState["PublishT"]);

        model.MainInfoModel.LoginName = ""; //用户名称

        //这里是换为投资机构名称
        model.InfoContactModel.OrganizationName = this.txtGovName.Text;
        model.InfoContactModel.OrgIntro         = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        model.InfoContactModel.Name             = this.txtLinkMan.Text;
        model.InfoContactModel.TelCountryCode   = this.txtTelCountry.Text;
        model.InfoContactModel.TelStateCode     = this.txtTelZoneCode.Text;
        model.InfoContactModel.TelNum           = this.txtTelNumber.Text;

        //model.InfoContactModel.FaxCountryCode =this.txtFaxCountry.Text;
        //model.InfoContactModel.FaxStateCode = txtFaxZoneCode.Text;
        //model.InfoContactModel.FaxNum = this.txtFaxNumber.Text;

        model.InfoContactModel.Mobile  = this.txtMobile.Text;
        model.InfoContactModel.Address = this.txtAddress.Text;
        //model.InfoContactModel.PostCode = this.txtPostCode.Text;
        model.InfoContactModel.Email = this.txtEmail.Text;

        model.InfoContactModel.WebSite = this.txtWebSite.Text;



        //以下是职位
        //model.InfoContactModel.Position = this.txtPosition.Text;


        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() + ",";

        model.MainInfoModel.KeyWord           = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(keyword);
        model.MainInfoModel.Descript          = "";
        model.MainInfoModel.DisplayTitle      = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;
        //意向有效期限
        model.MainInfoModel.ValidateTerm        = int.Parse(this.rdlValiditeTerm.SelectedValue.Trim());
        model.MainInfoModel.TemplateID          = "001";
        model.MainInfoModel.HtmlFile            = ViewState["HtmlFile"].ToString();
        model.MainInfoModel.AuditingStatus      = Convert.ToInt32(ViewState["AuditingStatus"].ToString());
        model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]);
        model.ShortInfoModel.ShortTitle         = ViewState["ShortTitle"].ToString();
        model.ShortInfoModel.ShortContent       = ViewState["ShortContent"].ToString();
        model.ShortInfoModel.Remark             = "";


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

        string navUrl = "";
        bool   isTof  = Page.User.IsInRole("GT1002");
        if (isTof)
        {
            navUrl = "http://member.topfo.com/indexTof.aspx";
        }
        else
        {
            navUrl = "http://member.topfo.com/index.aspx";
        }

        bool b = bll.Update(model);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(long.Parse(this.ViewState["InfoID"].ToString()));
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();
        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = long.Parse(this.ViewState["InfoID"].ToString());
                obj2.Insert(ResModel);
            }
        }
        if (b)
        {
            if (isTof)
            {
                if (string.IsNullOrEmpty(model.MainInfoModel.HtmlFile.Trim()))
                {
                    model.MainInfoModel.HtmlFile = Tz888.BLL.Info.Common.createStaticPageFileName("Capital", 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.V124.CapitalPageStatic staticobj = new Tz888.BLL.PageStatic.V124.CapitalPageStatic();
                staticobj.CreateStaticPageCapital(model.MainInfoModel.InfoID.ToString(), ref actionMsg);
            }
            Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改投资资源成功!", navUrl);
        }
        else
        {
            Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "修改投资资源失败!", navUrl);
        }
    }
Example #4
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-


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


        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();

        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(Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtProIntro.Value.Trim()));
        model.ProjectInfoModel.IndustryBID = this.SelectIndustryControl1.IndustryString;



        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 = 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();

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

        // bool b = bll.ProjectInfoGQ_Update(model);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(_infoid);
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();

        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = _infoid;
                obj2.Insert(ResModel);
            }
        }


        //if (b)
        //{
        //    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 btnUpdate_Click(object sender, EventArgs e)
    {
        long _infoID = Convert.ToInt32(Request["infoID"].ToString());

        Tz888.Model.Info.V124.CapitalSetModel model = new Tz888.Model.Info.V124.CapitalSetModel();
        model.CapitalInfoAreaModels = ZoneMoreSelectControl1.CapitalInfoAreaModels;


        #region 投资信息实体赋值

        model.CapitalInfoModel.ComAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalIntent.Value.ToString()));

        if (!string.IsNullOrEmpty(this.rblCurreny.SelectedValue.ToString()))
        {
            model.CapitalInfoModel.CapitalID = this.rblCurreny.SelectedValue;
        }
        model.CapitalInfoModel.CooperationDemandType = "";
        model.CapitalInfoModel.IndustryBID           = this.SelectIndustryControl1.IndustryString;

        for (int i = 0; chkLstCooperationDemand.Items.Count > i; i++)
        {
            if (chkLstCooperationDemand.Items[i].Selected)
            {
                model.CapitalInfoModel.CooperationDemandType += chkLstCooperationDemand.Items[i].Value + ",";
            }
        }
        //以下是需要添加的参数
        //注册资金
        model.CapitalInfoModel.RegisteredCapital = this.txtHBao.Text.ToString().Trim();// this.rblRegisterdollar.SelectedValue;
        model.CapitalInfoModel.ComBreif          = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(Tz888.Common.Utility.PageValidate.HtmlToTxt(""));
        //团队规模
        model.CapitalInfoModel.TeamScale = "";            //;this.rblTeam.SelectedValue;
        //机构年平均投资事件数
        model.CapitalInfoModel.AverageInvestment = "";    //this.rblPinJ.SelectedValue;
        //机构成功投资事件总数
        model.CapitalInfoModel.SuccessfulInvestment = ""; //this.rblSucess.SelectedValue;
        //投资需求摘要
        model.CapitalInfoModel.InvestmentDemand = "";     // this.txtDemand.Value;
        //添加所属区域


        #endregion
        //2010-08-04

        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtCapitalName.Text.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtCapitalName.Text.Trim());
        }
        model.MainInfoModel.publishT = Convert.ToDateTime(this.ViewState["PublishT"]);

        model.MainInfoModel.LoginName = ViewState["LoginName"].ToString(); //用户名称

        //这里是换为投资机构名称
        model.InfoContactModel.OrganizationName = this.txtGovName.Text;
        model.InfoContactModel.OrgIntro         = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        model.InfoContactModel.Name             = this.txtLinkMan.Text;
        model.InfoContactModel.TelCountryCode   = this.txtTelCountry.Text;
        model.InfoContactModel.TelStateCode     = this.txtTelZoneCode.Text;
        model.InfoContactModel.TelNum           = this.txtTelNumber.Text;
        model.MainInfoModel.MainPointCount      = Convert.ToInt32(this.txtPointCount.Text.ToString().Trim());


        model.InfoContactModel.Mobile  = this.txtMobile.Text;
        model.InfoContactModel.Address = this.txtAddress.Text;

        model.InfoContactModel.Email = this.txtEmail.Text;
        string KeyWord      = this.txtKeord.Text.ToString().Trim();    //关键字
        string DisplayTitle = this.txtWtitle.Text.Trim();              //网页标题
        string Descript     = this.txtDescript.Text.ToString().Trim(); //网页描述
        model.InfoContactModel.WebSite = this.txtWebSite.Text;
        string keyword = "";
        model.MainInfoModel.KeyWord           = KeyWord;
        model.MainInfoModel.Descript          = Descript;
        model.MainInfoModel.DisplayTitle      = DisplayTitle;
        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;

        //意向有效期限
        model.MainInfoModel.ValidateTerm = int.Parse(this.rdlValiditeTerm.SelectedValue.Trim());
        model.MainInfoModel.TemplateID   = "001";
        byte AuditingOrigin = Convert.ToByte(ViewState["AuditingStatus"]);
        byte AuditingStatus = 0;
        if (rdAudit.Checked == true)
        {
            AuditingStatus = 0;


            model.MainInfoModel.HtmlFile = "";
        }
        if (rdPass.Checked == true)
        {
            AuditingStatus = 1;

            model.MainInfoModel.HtmlFile = "Capital/" + DateTime.Now.ToString("yyyyMM") + "/Capital" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
        }
        if (rdNopass.Checked == true)
        {
            AuditingStatus = 2;


            model.MainInfoModel.HtmlFile = "";
        }
        model.MainInfoModel.AuditingStatus = AuditingStatus;
        //重点资源设置
        model.CapitalInfoModel.isVIP = Convert.ToInt32(this.ddlIsVip.SelectedValue.ToString());



        model.MainInfoModel.Hit = Convert.ToInt32(tbHits.Text.Trim());

        model.ShortInfoModel.ShortInfoControlID = "";
        model.ShortInfoModel.ShortTitle         = "";
        model.ShortInfoModel.ShortContent       = "";
        model.ShortInfoModel.Remark             = "";


        int FixPriceID = Convert.ToInt32(this.ViewState["FixPriceID"]);


        if (FixPriceID > 1)
        {
            chkIsPoint.Checked = true;

            spShowPoint.Attributes.Add("style", "display:''");
        }
        else
        {
            rbFree.Checked = true;

            spShowPoint.Attributes.Add("style", "display:none");
        }

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



        bool b = bll.Update(model);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(long.Parse(this.ViewState["InfoID"].ToString()));
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();
        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = long.Parse(this.ViewState["InfoID"].ToString());
                obj2.Insert(ResModel);
            }
        }
        if (b)
        {
            #region 定价
            string price = "";


            #endregion
            int MainPointCount;

            if (chkIsPoint.Checked == true)
            {
                MainPointCount = Convert.ToInt32(txtPointCount.Text.Trim());
                price          = "2";
            }
            else
            {
                MainPointCount = 0;
                price          = "1";
            }



            bool pric = mainBll.HasFixPrice(_infoID, price, bp.LoginName.ToString().Trim());

            string AuditingRemark = "";
            Tz888.Model.Info.InfoAuditModel auditModel = new Tz888.Model.Info.InfoAuditModel();
            #region 写入信息审核记录
            auditModel = new Tz888.Model.Info.InfoAuditModel();

            auditModel.InfoID       = model.MainInfoModel.InfoID;
            auditModel.InfoTypeID   = theInfoType;
            auditModel.LoginName    = ViewState["LoginName"].ToString();
            auditModel.PostDate     = System.DateTime.Now;
            auditModel.Title        = model.MainInfoModel.Title;
            auditModel.AuditingDate = System.DateTime.Now;
            auditModel.AuditingBy   = Page.User.Identity.Name;
            auditModel.Memo         = "";
            switch (AuditingOrigin)
            {
            case 0:
                switch (AuditingStatus)
                {
                case 0:
                    break;

                case 1:
                    AuditingRemark            = "未审核->审核通过";
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;

                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    break;

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

                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = tbAuditingRemark.Text.ToString().Trim();


                    break;

                default:
                    break;
                }
                break;

            case 1:
                switch (AuditingStatus)
                {
                case 0:
                    AuditingRemark            = "审核通过->未审核";
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = 0;
                    break;

                case 1:
                    AuditingRemark = "审核通过->审核通过(修改)";
                    b = mainBll.HasAuditing(_infoID, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                                            AuditingRemark, model.MainInfoModel.HtmlFile, "", 0, MainPointCount);
                    break;

                case 2:
                    AuditingRemark            = "审核通过->审核未通过";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());

                    break;

                default:
                    break;
                }
                break;

            case 2:
                switch (AuditingOrigin)
                {
                case 0:
                    AuditingRemark            = "审核未通过->未审核";
                    auditModel.FeedbackStatus = 0;
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    break;

                case 1:
                    AuditingRemark            = "审核未通过->审核通过";
                    auditModel.FeedbackStatus = 0;
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    break;

                case 2:
                    AuditingRemark            = "审核通过->审核未通过";
                    auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                    break;

                default:
                    break;
                }
                break;

            default:
                break;
            }
            b = mainBll.InfoAuditNote(auditModel);
            if (b)
            {
                if (model.MainInfoModel.AuditingStatus == 1)
                {
                    page = page.objGetMerchantInfoByInfoID(_infoID);                       //根ID获取信息
                    string IsVip   = Mercahrstatic.SelCapitalInfoVip();                    //查询为重点推荐资源
                    string Idstuny = page.SelectLndus(model.CapitalInfoModel.IndustryBID); //根据区域查询信息
                    int    sum     = page.StaticHtml(Convert.ToInt32(_infoID), page.Title, page.PublishT, page.AreaName, page.Content, page.IndustryCarveOutID, page.CooperationTypeName, page.Money, page.ValidateID, page.MerchantNameTotal, Idstuny, page.Pic, IsVip, KeyWord, DisplayTitle, Descript, page.Register);
                    if (sum == 0)
                    {
                        this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息失败!');location.href='CapitalManage.aspx'", true);
                    }
                }
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息成功!');location.href='CapitalManage.aspx'", true);
            }
            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息失败!');location.href='CapitalManage.aspx'", true);
            }

            #endregion
        }
        else
        {
            this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息失败!');location.href='CapitalManage.aspx'", true);
        }
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        long _infoID = Convert.ToInt32(Request["infoID"].ToString());

        Tz888.Model.Info.MerchantSetModel model = new Tz888.Model.Info.MerchantSetModel();
        #region 招商信息实体
        model.MerchantInfoModel.MerchantTypeID    = "";// this.rblMerchantType.SelectedValue;
        model.MerchantInfoModel.CountryCode       = this.ZoneSelectControl1.CountryID;
        model.MerchantInfoModel.ProvinceID        = this.ZoneSelectControl1.ProvinceID;
        model.MerchantInfoModel.CityID            = this.ZoneSelectControl1.CityID;
        model.MerchantInfoModel.CountyID          = this.ZoneSelectControl1.CountyID;
        model.MerchantInfoModel.IndustryClassList = this.SelectIndustryControl1.IndustryString;
        model.MerchantInfoModel.CapitalCurrency   = this.ddlCapitalCurrency.SelectedValue;
        model.MerchantInfoModel.CapitalTotal      = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        model.MerchantInfoModel.MerchantCurrency  = ""; //this.ddlMerchantCurrency.SelectedValue;
        model.MerchantInfoModel.MerchantTotal     = ""; //this.ddlMerchantTotal.SelectedValue;
        model.MerchantInfoModel.Merchanreturns    = Convert.ToInt32(this.txtHuiBao.Text.Trim());
        //项目现状及规划
        model.MerchantInfoModel.ProjectStatus = "";// txtProjectStatus.Text;
        //项目优势及市场分析
        model.MerchantInfoModel.Market = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        //地方经济指标描述
        model.MerchantInfoModel.EconomicIndicators = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        //投资环境描述
        model.MerchantInfoModel.InvestmentEnvironment = Tz888.Common.Utility.PageValidate.TxtToHtml("");
        //经济效益分析
        model.MerchantInfoModel.Benefit = Tz888.Common.Utility.PageValidate.TxtToHtml("");

        model.MerchantInfoModel.ZoneAbout = Tz888.Common.Utility.PageValidate.TxtToHtml(Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtZoneAbout.Value.ToString()));
        if (ViewState["ZoneAboutBrief"] != null)
        {
            model.MerchantInfoModel.ZoneAboutBrief = ViewState["ZoneAboutBrief"].ToString();
        }

        ViewState["ZoneAboutBrief"] = model.MerchantInfoModel.ZoneAboutBrief;

        model.MerchantInfoModel.CooperationDemandType = "";


        #endregion
        model.MainInfoModel.InfoID = Convert.ToInt64(this.ViewState["InfoID"]);
        if (!string.IsNullOrEmpty(this.txtMerchantTopic.Text.Trim()))
        {
            model.MainInfoModel.Title = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(this.txtMerchantTopic.Text.Trim());
        }
        model.MainInfoModel.publishT = Convert.ToDateTime(this.ViewState["PublishT"]);

        model.MainInfoModel.LoginName = ViewState["UserName"].ToString();//用户名称
        if (chkIsPoint.Checked == true)
        {
            model.MainInfoModel.FixPriceID     = "2";
            model.MainInfoModel.MainPointCount = Convert.ToInt32(txtPointCount.Text.Trim());
        }
        else
        {
            model.MainInfoModel.MainPointCount = 0;
            model.MainInfoModel.FixPriceID     = "1";
        }

        string keyword = "";

        byte AuditingOrigin = Convert.ToByte(ViewState["AuditingStatus"]);
        byte AuditingStatus = 0;
        if (rdAudit.Checked == true)
        {
            AuditingStatus = 0;

            model.MainInfoModel.HtmlFile = "";
        }
        if (rdPass.Checked == true)
        {
            AuditingStatus = 1;

            model.MainInfoModel.HtmlFile = "Merchant/" + DateTime.Now.ToString("yyyyMM") + "/Merchant" + DateTime.Now.ToString("yyyyMMdd") + "_" + _infoID + ".shtml";
        }
        if (rdNopass.Checked == true)
        {
            AuditingStatus = 2;

            model.MainInfoModel.HtmlFile = "";
        }
        model.MainInfoModel.AuditingStatus = AuditingStatus;
        //招商重大投资商机设置
        Tz888.BLL.MerchantOppor objOppor = new Tz888.BLL.MerchantOppor();
        if (chkIsVip.Checked)
        {
            objOppor.IsVip(_infoID, 1, txtIsVipAbout.Text.Trim());
        }
        else
        {
            objOppor.IsVip(_infoID, 0, "");
        }
        model.MainInfoModel.Hit = Convert.ToInt32(tbHits.Text.ToString().Trim());
        string KeyWord      = this.txtKeord.Text.ToString().Trim();    //关键字
        string DisplayTitle = this.txtWtitle.Text.Trim();              //网页标题
        string Descript     = this.txtDescript.Text.ToString().Trim(); //网页描述
        model.MainInfoModel.KeyWord      = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(KeyWord);
        model.MainInfoModel.DisplayTitle = Tz888.Common.Utility.PageValidate.FiltrateHTMLTag(DisplayTitle);
        model.MainInfoModel.Descript     = txtDescript.Text.ToString().Trim();

        model.MainInfoModel.FrontDisplayTime  = System.DateTime.Now;
        model.MainInfoModel.ValidateStartTime = System.DateTime.Now;

        //项目有效期限
        model.MainInfoModel.ValidateTerm = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue.Trim());
        model.MainInfoModel.InfoTypeID   = "Merchant";
        model.MainInfoModel.TemplateID   = "001";


        model.ShortInfoModel.ShortInfoControlID = "";// Convert.ToString(ViewState["ShortInfoControlID"]);
        //if (ViewState["ShortTitle"] != null)
        //{
        //    model.ShortInfoModel.ShortTitle = ViewState["ShortTitle"].ToString();
        //}
        //if (ViewState["ShortContent"] != null)
        //{
        model.ShortInfoModel.ShortContent = ""; //ViewState["ShortContent"].ToString();
        //}


        model.InfoContactModel.Address          = txtAddress.Text.ToString().Trim();
        model.InfoContactModel.Email            = txtEmail.Text.ToString().Trim();
        model.InfoContactModel.Mobile           = txtMobile.Text.ToString().Trim();
        model.InfoContactModel.OrganizationName = txtCompanyName.Text.ToString().Trim();
        model.InfoContactModel.Name             = txtName.Text.ToString().Trim();
        model.InfoContactModel.TelCountryCode   = txtTelCountry.Text.ToString().Trim();
        model.InfoContactModel.TelStateCode     = txtTelZoneCode.Text.ToString().Trim();
        model.InfoContactModel.TelNum           = txtTelNumber.Text.ToString().Trim();


        //List<Tz888.Model.Info.InfoResourceModel> infoResourceModels;
        //infoResourceModels = FilesUploadControl1.InfoList;
        ////List<Tz888.Model.Info.InfoResourceModel> infoResourceModels = Tz888.Common.InfoResourceManage.ImageTransfer("Image", "Merchant", Tz888.Common.ResourceType.Image, Tz888.Common.ResourceProperty.InfoImage, FilesUploadControl1.InfoList);
        //if (infoResourceModels != null)
        //    model.InfoResourceModels.AddRange(infoResourceModels);

        //修改附件
        Tz888.BLL.Info.InfoResourceBLL obj2 = new Tz888.BLL.Info.InfoResourceBLL();
        obj2.DeleteByInfoID(long.Parse(this.ViewState["InfoID"].ToString()));
        List <Tz888.Model.Info.InfoResourceModel> infoResourceModels = new List <Tz888.Model.Info.InfoResourceModel>();
        infoResourceModels = this.FilesUploadControl1.InfoList;
        if (infoResourceModels != null)
        {
            model.InfoResourceModels.AddRange(infoResourceModels);
        }
        if (infoResourceModels != null)
        {
            foreach (Tz888.Model.Info.InfoResourceModel ResModel in infoResourceModels)
            {
                ResModel.InfoID = long.Parse(this.ViewState["InfoID"].ToString());
                obj2.Insert(ResModel);
            }
        }
        Tz888.BLL.Info.InfoAuditMailBLL MailBll = new Tz888.BLL.Info.InfoAuditMailBLL();
        Tz888.BLL.Info.MarchantInfoBLL  bll     = new Tz888.BLL.Info.MarchantInfoBLL();
        if (bll.UpdateMerchantSet(model))
        {
            string AuditingRemark = "";
            Tz888.Model.Info.InfoAuditModel auditModel = new Tz888.Model.Info.InfoAuditModel();
            #region 写入信息审核记录
            auditModel = new Tz888.Model.Info.InfoAuditModel();

            auditModel.InfoID       = model.MainInfoModel.InfoID;
            auditModel.InfoTypeID   = theInfoType;
            auditModel.LoginName    = ViewState["UserName"].ToString();
            auditModel.PostDate     = System.DateTime.Now;
            auditModel.Title        = model.MainInfoModel.Title;
            auditModel.AuditingDate = System.DateTime.Now;
            auditModel.AuditingBy   = Page.User.Identity.Name;
            auditModel.Memo         = "";
            switch (AuditingOrigin)
            {
            case 0:
                switch (AuditingStatus)
                {
                case 0:
                    break;

                case 1:
                    AuditingRemark            = "未审核->审核通过";
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;

                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    break;

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

                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = tbAuditingRemark.Text.ToString().Trim();


                    break;

                default:
                    break;
                }
                break;

            case 1:
                switch (AuditingStatus)
                {
                case 0:
                    AuditingRemark            = "审核通过->未审核";
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = 0;
                    break;

                case 1:
                    AuditingRemark = "审核通过->审核通过(修改)";
                    bool c = mainBll.HasAuditing(_infoID, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                                                 AuditingRemark, model.MainInfoModel.HtmlFile, "", 0, 0);
                    break;

                case 2:
                    AuditingRemark            = "审核通过->审核未通过";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());

                    break;

                default:
                    break;
                }
                break;

            case 2:
                switch (AuditingOrigin)
                {
                case 0:
                    AuditingRemark            = "审核未通过->未审核";
                    auditModel.FeedbackStatus = 0;
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    break;

                case 1:
                    AuditingRemark            = "审核未通过->审核通过";
                    auditModel.FeedbackStatus = 0;
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    break;

                case 2:
                    AuditingRemark            = "审核通过->审核未通过";
                    auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                    auditModel.AuditStatus    = AuditingStatus;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.FeedbackStatus = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                    break;

                default:
                    break;
                }
                break;

            default:
                break;
            }
            bool b = mainBll.InfoAuditNote(auditModel);
            if (b)
            {
                if (model.MainInfoModel.AuditingStatus == 1)
                {
                    int num = page.ModifyHtmlFile(Convert.ToInt32(_infoID));
                    if (num >= 0)
                    {
                        page = page.objGetMerchantInfoByInfoID(_infoID);                       //根ID获取信息
                        string IsVip   = Mercahrstatic.SelIsVip();                             //查询为重大商机的信息
                        string Idstuny = page.SelectLndus(model.MerchantInfoModel.ProvinceID); //根据区域查询信息
                        int    sum     = page.StaticHtml(Convert.ToInt32(_infoID), page.Title, page.PublishT, page.AreaName, page.Content, page.IndustryCarveOutID, page.MerchantNameTotal, page.ValidateID, Idstuny, IsVip, KeyWord, DisplayTitle, Descript, page.Merchanreturns);
                    }
                    else
                    {
                        this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('生成静态页面失败!');location.href='MerchantManage.aspx'", true);
                    }
                }
                Response.Redirect("MerchantManage.aspx");
            }
            else
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('审核信息失败!');location.href='MerchantManage.aspx'", true);
            }

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