Ejemplo n.º 1
0
        /// <summary>
        /// 信息审核状态记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool InfoAuditNote(Tz888.Model.Info.InfoAuditModel model)
        {
            int rowsAffected;

            SqlParameter[] parameters =
            {
                new SqlParameter("@InfoID",         SqlDbType.BigInt,      8),
                new SqlParameter("@Title",          SqlDbType.VarChar,   100),
                new SqlParameter("@LoginName",      SqlDbType.Char,       16),
                new SqlParameter("@InfoTypeID",     SqlDbType.Char,       10),
                new SqlParameter("@PostDate",       SqlDbType.DateTime),
                new SqlParameter("@AuditStatus",    SqlDbType.TinyInt,     1),
                new SqlParameter("@AuditingRemark", SqlDbType.VarChar,   100),
                new SqlParameter("@AuditingBy",     SqlDbType.VarChar,    20),
                new SqlParameter("@AuditingDate",   SqlDbType.DateTime),
                new SqlParameter("@FeedbackStatus", SqlDbType.TinyInt,     1),
                new SqlParameter("@FeedBackNote",   SqlDbType.VarChar,   300),
                new SqlParameter("@Memo",           SqlDbType.VarChar, 200)
            };
            parameters[0].Value  = model.InfoID;
            parameters[1].Value  = model.Title;
            parameters[2].Value  = model.LoginName;
            parameters[3].Value  = model.InfoTypeID;
            parameters[4].Value  = model.PostDate;
            parameters[5].Value  = model.AuditStatus;
            parameters[6].Value  = model.AuditingRemark;
            parameters[7].Value  = model.AuditingBy;
            parameters[8].Value  = model.AuditingDate;
            parameters[9].Value  = model.FeedbackStatus;
            parameters[10].Value = model.FeedBackNote;
            parameters[11].Value = model.Memo;

            DbHelperSQL.RunProcedure("InfoAuditTab_LOG", parameters, out rowsAffected);
            if (rowsAffected > 0)
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        Tz888.Model.Info.MerchantSetModel model = new Tz888.Model.Info.MerchantSetModel();

        model.InfoContactModel     = this.MerchantInfoAddressInfo1.InfoContact;
        model.InfoContactManModels = this.MerchantInfoAddressInfo1.InfoContactMans;

        #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;
        try
        {
            model.MerchantInfoModel.CapitalTotal = Convert.ToDecimal(this.txtCapitalTotal.Text.Trim());
        }
        catch
        {
            model.MerchantInfoModel.CapitalTotal = 0;
        }
        model.MerchantInfoModel.MerchantCurrency = this.ddlMerchantCurrency.SelectedValue;
        model.MerchantInfoModel.MerchantTotal    = this.ddlMerchantTotal.SelectedValue;
        model.MerchantInfoModel.ZoneAbout        = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAbout.Value.ToString());
        model.MerchantInfoModel.ZoneAboutBrief   = Tz888.Common.Utility.PageValidate.TxtToHtml(this.txtZoneAboutBrf.Value.Trim());
        try
        {
            model.MerchantInfoModel.ReceiveOrganization = this.MerchantInfoAddressInfo1.Undertaker.Trim();
        }
        catch {}

        model.MerchantInfoModel.CooperationDemandType = "";

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

        #endregion

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

        model.MainInfoModel.LoginName = ViewState["UserName"].ToString();

        model.MainInfoModel.ApproveTime = DateTime.Now;
        model.MainInfoModel.ApproveBy   = Session["loginName"].ToString();

        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           = keyword;
        model.MainInfoModel.Descript          = this.txtDescript.Text.Trim();
        model.MainInfoModel.DisplayTitle      = this.txtDisplayTitle.Text.Trim();
        model.MainInfoModel.FrontDisplayTime  = Convert.ToDateTime(ViewState["FrontDisplayTime"]);
        model.MainInfoModel.ValidateStartTime = Convert.ToDateTime(ViewState["ValidateStartTime"]);
        model.MainInfoModel.ValidateTerm      = Convert.ToInt32(this.ddlValiditeTerm.SelectedValue.Trim());
        model.MainInfoModel.TemplateID        = "001";
        model.MainInfoModel.HtmlFile          = ViewState["HtmlFile"].ToString();

        model.ShortInfoModel.ShortInfoControlID = Convert.ToString(ViewState["ShortInfoControlID"]);
        model.ShortInfoModel.ShortTitle         = this.txtShortTitle.Text.Trim();

        model.ShortInfoModel.ShortContent = this.txtShortContent.Text.Trim();
        model.ShortInfoModel.Remark       = "";

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

        if (this.rdAudit.Checked)
        {
            AuditingStatus = 0;
        }
        if (this.rdPass.Checked)
        {
            AuditingStatus = 1;
        }
        if (this.rdNopass.Checked)
        {
            AuditingStatus = 2;
        }

        model.MainInfoModel.AuditingStatus = AuditingStatus;

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

        string actionMsg   = "";
        string InfoCode    = ViewState["InfoCode"].ToString();
        string strHtmlFile = ViewState["HtmlFile"].ToString();
        bool   IsSuccess;
        long   InfoID  = Convert.ToInt64(ViewState["InfoID"]);
        bool   HasDone = false;
        bool   AllHasDone;

        Tz888.BLL.Info.MarchantInfoBLL merchantBll = new Tz888.BLL.Info.MarchantInfoBLL();
        Tz888.BLL.Info.MainInfoBLL     mainBll     = new Tz888.BLL.Info.MainInfoBLL();

        AllHasDone = merchantBll.Update(model);

        #region 定价
        HasDone = mainBll.HasFixPrice(InfoID, "1", Session["loginName"].ToString());
        if (!HasDone)
        {
            AllHasDone = false;//修改失败
        }
        #endregion

        #region 审核

        string AuditingRemark = "";


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

        switch (AuditingOrigin)
        {
        case 0:
            switch (AuditingStatus)
            {
            case 0:
                break;

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

                #region 写入操作记录
                //需要生成文件
                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, 0);

                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     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);
                #endregion

                #region 生成静态化文件
                Tz888.BLL.PageStatic.MerchantPageStatic staticobj = new Tz888.BLL.PageStatic.MerchantPageStatic();
                IsSuccess = staticobj.CreateStaticPageMerchant(model.MainInfoModel.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, 0);

                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 = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                auditModel.AuditStatus    = AuditingStatus;
                auditModel.AuditingDate   = System.DateTime.Now;
                auditModel.AuditingBy     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);

                if (!HasDone)
                {
                    AllHasDone = false;
                }
                #endregion

                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, 0);
                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     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);

                if (!HasDone)
                {
                    AllHasDone = false;
                }
                #endregion

                #region  除已生成的文件

                //删除静态化文件

                #endregion

                break;

            case 1:
                #region 生成静态化文件
                Tz888.BLL.PageStatic.MerchantPageStatic staticobj = new Tz888.BLL.PageStatic.MerchantPageStatic();
                IsSuccess = staticobj.CreateStaticPageMerchant(model.MainInfoModel.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, 0);
                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 = Convert.ToInt32(this.rblFeedbackStatus.SelectedValue.Trim());
                auditModel.FeedBackNote   = this.tbAuditingRemark.Text.Trim();
                auditModel.AuditStatus    = AuditingStatus;
                auditModel.AuditingDate   = System.DateTime.Now;
                auditModel.AuditingBy     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);

                if (!HasDone)
                {
                    AllHasDone = false;
                }
                #endregion

                #region  除已生成的文件

                //删除静态化文件

                #endregion

                break;

            default:
                break;
            }
            break;

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

                #region 写入操作记录
                HasDone = mainBll.HasAuditing(InfoID, AuditingStatus, true, Convert.ToInt32(this.tbHits.Text.Trim()), model.MainInfoModel.LoginName,
                                              AuditingRemark, "", "", 0, 0);

                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     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);

                if (!HasDone)
                {
                    AllHasDone = false;
                }
                #endregion

                break;

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

                #region 写入操作记录
                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, 0);

                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     = Session["LoginName"].ToString();
                auditModel.AuditingRemark = AuditingRemark;
                auditModel.Memo           = "";
                HasDone = mainBll.InfoAuditNote(auditModel);

                if (!HasDone)
                {
                    AllHasDone = false;
                }
                #endregion

                #region 生成静态化文件
                Tz888.BLL.PageStatic.MerchantPageStatic staticobj = new Tz888.BLL.PageStatic.MerchantPageStatic();
                IsSuccess = staticobj.CreateStaticPageMerchant(model.MainInfoModel.InfoID.ToString(), ref actionMsg);

                //if (!IsSuccess)
                //    AllHasDone = false;
                #endregion

                break;

            case 2:
                break;

            default:
                break;
            }
            break;

        default:
            break;
        }

        #endregion

        #region 邮件通知

        #endregion

        if (AllHasDone)
        {
            string theUrlReferrer = ViewState["strPrePage"].ToString();
            Response.Redirect("ModifyStatus.aspx?InfoID=" + InfoID.ToString() + "&Type=" + theInfoType + "&PrePage=" + theUrlReferrer + "&msg=" + actionMsg);
        }
        else
        {
            Response.Write("<script>alert('变更失败!');history.back(-1);</script>");
        }
    }
Ejemplo n.º 3
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
    } 
Ejemplo n.º 4
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);
        }
    }
Ejemplo n.º 5
0
    protected void btnPublish_Click(object sender, EventArgs e)
    {
        int Hit = 0;

        #region
        mainInfo.Title     = this.txtTitle.Text.Trim();
        ViewState["Title"] = mainInfo.Title;
        Random ran = new Random();
        mainInfo.InfoCode     = "CS" + "-" + "0000" + DateTime.Now.ToString("yyyyMMdd") + ran.Next(15);
        ViewState["InfoCode"] = mainInfo.InfoCode;
        mainInfo.publishT     = Convert.ToDateTime(DateTime.Now.ToString());
        BasePage tb = new BasePage();
        mainInfo.LoginName = tb.LoginName;
        // mainInfo.LoginName=Page.User.Identity.Name;
        //  mainInfo.LoginName ="tz888Admin ";
        mainInfo.InfoOriginRoleName = "2";
        mainInfo.FixPriceID         = "0";
        mainInfo.FeeStatus          = 2;//付费 0付费,1未付费,2无需付费
        mainInfo.GradeID            = "0";

        mainInfo.KeyWord      = this.txtKeyWord.Text;
        mainInfo.Descript     = this.txtDescript.Text;
        mainInfo.DisplayTitle = this.txtDisplayTitle.Text;
        if (this.txtDisplayTitle.Text == "")
        {
            mainInfo.DisplayTitle = this.txtTitle.Text.Trim();
        }
        mainInfo.FrontDisplayTime  = Convert.ToDateTime(DateTime.Now.ToString());
        mainInfo.ValidateStartTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
        mainInfo.ValidateTerm      = Convert.ToInt32(this.rdlValiditeTerm.SelectedValue);
        mainInfo.TemplateID        = "001";
        //mainInfo.HtmlFile = strHtmlFile;
        #endregion

        casesInfo.CasesTypeID = this.ddlCasesTypeID.SelectedValue.Trim();
        //casesInfo.Content = this.txtContent.Text;
        StringBuilder builder = new StringBuilder();
        casesInfo.Content = Convert.ToString(builder.Append(this.FreeTextBox1.Text.ToString()));
        casesInfo.Pic1    = "";
        casesInfo.Pic2    = "";

        #region  短内容信息表

        shortInfo.ShortInfoControlID = "CaseIndex1";
        shortInfo.ShortTitle         = this.txtShortTitle.Text;
        shortInfo.ShortContent       = this.txtShortContent.Text;
        shortInfo.Remark             = "";

        //infoResource = FilesUploadControl1.InfoList;

        #endregion
        if (ViewState["url"].ToString() == "insert")
        {
            //Random rnd = new Random();
            //Hit = rnd.Next(25) + 5;
            mainInfo.Hit = 1;
            long infodd = cases.insert(mainInfo, casesInfo, shortInfo, infoResource);
            if (infodd > 0)
            {
                if (cbAuditing.Checked)
                {
                    mainInfo.HtmlFile       = "Caseshtml/" + DateTime.Now.ToString("yyyyMM") + "/Cases" + DateTime.Now.ToString("yyyyMMdd") + "_" + infodd + ".shtml";
                    mainInfo.AuditingStatus = 1;
                }
                else
                {
                    mainInfo.HtmlFile       = "";
                    mainInfo.AuditingStatus = 0;
                }
                long statu = cases.UpdateStatus(Convert.ToInt32(infodd), mainInfo.HtmlFile, mainInfo.AuditingStatus);
                Response.Write("<script>alert('添加成功!');window.location.href='CasesView.aspx';</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败!');history.back(-1);</script>");
            }
        }
        else if (ViewState["url"].ToString() == "status")
        {
            mainInfo.Hit = Convert.ToInt32(this.txtHit.Text);

            int adstatus = 0;
            adstatus = mainInfo.AuditingStatus;

            byte auditing = 0;
            auditing = Convert.ToByte(this.rblAuditing.SelectedValue.Trim());

            string AuditingRemark = "";
            bool   HasDone;
            string strHtmlFile    = "";
            int    MainPointCount = 0;

            long InfoAas = cases.update(mainInfo, casesInfo, shortInfo, infoResource, Convert.ToInt32(ViewState["infoID"]));
            #region 添加审核记录

            switch (adstatus)
            {
            case 0:
                switch (auditing)
                {
                case 0:
                    break;

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

                    strHtmlFile = "Cases/" + DateTime.Now.ToString("yyyyMM") + "/Cases" + DateTime.Now.ToString("yyyyMMdd") + "_" + Convert.ToInt32(ViewState["infoID"]) + ".shtml";
                    long statu = cases.UpdateStatus(Convert.ToInt32(InfoAas), strHtmlFile, Convert.ToInt32(auditing));
                    //更改审核状态,同时记录操作
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;
                }
                break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    #endregion
                    HasDone = mainBll.InfoAuditNote(auditModel);

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

                case 1:
                    break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;
                }
                break;

            case 2:
                switch (auditing)
                {
                case 0:
                    AuditingRemark = "审核未通过->未审核";

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

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

                    strHtmlFile = "Cases/" + DateTime.Now.ToString("yyyyMM") + "/Cases" + DateTime.Now.ToString("yyyyMMdd") + "_" + Convert.ToInt32(ViewState["infoID"]) + ".shtml";
                    long statu = cases.UpdateStatus(Convert.ToInt32(InfoAas), strHtmlFile, Convert.ToInt32(auditing));
                    //更改审核状态,同时记录操作
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, Convert.ToInt32(this.txtHit.Text.Trim()), mainInfo.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = mainInfo.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = mainInfo.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

                case 2:
                    break;
                }
                break;
            }
            #endregion

            if (InfoAas > 0)
            {
                Response.Write("<script>alert('修改成功!');window.location.href='CasesView.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
            }
        }
    }
Ejemplo n.º 6
0
    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);
        }
    }
Ejemplo n.º 7
0
    protected void btnPublish_Click(object sender, EventArgs e)
    {
        #region 主表

        main.Title         = txtTitle.Text.Trim();
        ViewState["Title"] = main.Title;
        main.InfoCode      = Tz888.BLL.Info.Common.CreateInfoCode("Oppor", ddlIndustry.SelectedValue.ToString().Trim(), this.ZoneSelectControl2.CountryID, DateTime.Now);
        main.publishT      = Convert.ToDateTime(DateTime.Now);
        main.Hit           = 1;
        //main.LoginName = Page.User.Identity.Name;
        main.LoginName          = "tz888admin";
        main.InfoOriginRoleName = "0";

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

        #endregion

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

        pOpportunity.IndustryOpportunityID = ddlIndustry.SelectedValue.ToString().Trim();
        pOpportunity.ValidateID            = "1";

        pOpportunity.Pic1 = "";                                                                                                //图片

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

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

        #region  短内容信息表

        shortInfoRule.ShortInfoControlID = "OpporIndex1";
        shortInfoRule.ShortTitle         = txtShortTitle.Text.Trim();
        shortInfoRule.ShortContent       = txtShortContent.Text.Trim();
        shortInfoRule.Remark             = "";
        #endregion
        if (ViewState["url"].ToString() == "insert")
        {
            //插入数据
            long InfoID = opp.Insert(main, pOpportunity, shortInfoRule);

            if (InfoID > 0)
            {
                if (cbAuditing.Checked)
                {
                    main.HtmlFile       = "Oppor/" + DateTime.Now.ToString("yyyyMM") + "/" + main.InfoCode + "_" + InfoID + ".shtml";
                    main.AuditingStatus = 1;
                }
                else
                {
                    main.HtmlFile       = "";
                    main.AuditingStatus = 0;
                }
                long status = opp.UpdateState(main.HtmlFile, main.AuditingStatus, Convert.ToInt32(InfoID));
                Response.Write("<script>alert('添加成功')</script>");
            }
            else
            {
                Response.Write("<script language=\"javascript\">alert('添加失败')</script>");
            }
        }
        else if (ViewState["url"].ToString() == "status")
        {
            int adstatus = 0;
            adstatus = main.AuditingStatus;

            byte auditing = 0;
            auditing = Convert.ToByte(this.rblAuditing.SelectedValue.Trim());

            string AuditingRemark = "";
            bool   HasDone;
            string strHtmlFile    = "";
            int    MainPointCount = 0;
            if (this.rblAuditing.SelectedValue == "1")
            {
                long stat = opp.GradeFixModify(this.ddlGrade.SelectedValue.Trim(), this.ddlFixPrice.SelectedValue.Trim(), Convert.ToInt32(ViewState["infoID"]));
            }

            long InfoAas = opp.HasModify(main, pOpportunity, shortInfoRule, Convert.ToInt32(ViewState["infoID"]));
            #region 添加审核记录

            switch (adstatus)
            {
            case 0:
                switch (auditing)
                {
                case 0:
                    break;

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

                    strHtmlFile = "Oppor/" + DateTime.Now.ToString("yyyyMM") + "/" + main.InfoCode + "_" + Convert.ToInt32(ViewState["infoID"]) + ".shtml";
                    long statu = opp.UpdateState(strHtmlFile, Convert.ToInt32(auditing), Convert.ToInt32(InfoAas));
                    //更改审核状态,同时记录操作
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;
                }
                break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    #endregion
                    HasDone = mainBll.InfoAuditNote(auditModel);

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

                case 1:
                    break;

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

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;
                }
                break;

            case 2:
                switch (auditing)
                {
                case 0:
                    AuditingRemark = "审核未通过->未审核";

                    #region 写入操作记录
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    #endregion

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

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

                    strHtmlFile = "Oppor/" + DateTime.Now.ToString("yyyyMM") + "/" + main.InfoCode + "_" + Convert.ToInt32(ViewState["infoID"]) + ".shtml";
                    long statu = opp.UpdateState(strHtmlFile, Convert.ToInt32(auditing), Convert.ToInt32(InfoAas));
                    //更改审核状态,同时记录操作
                    HasDone = mainBll.HasAuditing(_infoid, auditing, true, 1, main.LoginName,
                                                  AuditingRemark, strHtmlFile, "", 0, MainPointCount);
                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }

                    #region 写入信息审核记录
                    auditModel                = new Tz888.Model.Info.InfoAuditModel();
                    auditModel.InfoID         = Convert.ToInt32(ViewState["infoID"]);
                    auditModel.InfoTypeID     = theInfoType;
                    auditModel.LoginName      = main.LoginName;
                    auditModel.PostDate       = System.DateTime.Now;
                    auditModel.Title          = ViewState["Title"].ToString();
                    auditModel.FeedbackStatus = 0;         //0,可修改|1,即将删除
                    auditModel.FeedBackNote   = "";
                    auditModel.AuditStatus    = Convert.ToInt32(auditing);
                    auditModel.AuditingDate   = System.DateTime.Now;
                    auditModel.AuditingBy     = main.LoginName;
                    auditModel.AuditingRemark = AuditingRemark;
                    auditModel.Memo           = "";
                    HasDone = mainBll.InfoAuditNote(auditModel);
                    #endregion

                    if (!HasDone)
                    {
                        Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
                    }
                    break;

                case 2:
                    break;
                }
                break;
            }
            #endregion
            if (InfoAas > 0)
            {
                Response.Write("<script>alert('修改成功!');window.location.href='OpporView.aspx'</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败!');history.back(-1);</script>");
            }
        }
    }