Пример #1
0
    protected void btnType_Click(object sender, EventArgs e)
    {
        string        type = ddlTypea.SelectedValue.ToString().Trim();
        StringBuilder sb   = new StringBuilder();
        string        info = bll.SetType(type);

        string[] name = info.Split(',');
        for (int i = 0; i < name.Length - 1; i++)
        {
            page = page.NewsIdAll(Convert.ToInt32(name[i]));
            if (page.AuditingStatus != 1)
            {
                sb.Append("编号:" + name[i] + "  所对应的状态为:" + Verify(page.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                int num = service.ModifyHtmlFile(Convert.ToInt32(name[i]));
                if (num != 0)
                {
                    string number = service.CreateHtml(Convert.ToInt32(name[i]), page.Title, page.PublishT.ToString(), page.Content, page.Hit, page.Address, page.CapitalID, page.ComName, page.Email, page.IndustryCarveOutID, page.InvestObject, page.InvestReturn, page.LinkMan, page.PostCode, page.ProvinceID, page.Tel, page.ValidateID, page.WebSite, page.KeyWord, page.CarveOutInfoType, "tz888Admin", "mtvc2909");
                    if (number == "1")
                    {
                        Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
                    }
                    else
                    {
                        Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败");
                    }
                }
                else
                {
                    Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败");
                }
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
        //else
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
        //}
    }
Пример #2
0
    protected void btnStatic_Click(object sender, EventArgs e)
    {
        string[] values = Request.Form.GetValues("cbxSelect");
        if (values == null || values.Length < 1)
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择要静态化的资源!");
            return;
        }
        StringBuilder sb = new StringBuilder();

        foreach (string str in values)
        {
            page = bll.NewsIdAll(Convert.ToInt32(str.Trim()));

            if (page.AuditingStatus != 1)
            {
                sb.Append("编号:" + str.Trim() + "  所对应的状态为:" + Verify(page.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                int num = service.ModifyHtmlFile(Convert.ToInt32(str.Trim()));
                if (num != 0)
                {
                    string number = service.CreateHtml(Convert.ToInt32(str.Trim()), page.Title, page.PublishT.ToString(), page.Content, page.Hit, page.Address, page.CapitalID, page.ComName, page.Email, page.IndustryCarveOutID, page.InvestObject, page.InvestReturn, page.LinkMan, page.PostCode, page.ProvinceID, page.Tel, page.ValidateID, page.WebSite, page.KeyWord, page.CarveOutInfoType, "tz888Admin", "mtvc2909");
                    if (number == "1")
                    {
                        Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
                    }
                    else
                    {
                        Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败");
                    }
                }
                else
                {
                    Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败");
                }
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
    }
Пример #3
0
        string CasesTem          = ConfigurationManager.AppSettings["NewsTem"].ToString();     //成功案例模版存放位置
        #region 根据ID查询新闻资讯信息
        /// <summary>
        /// 根据ID查询新闻资讯信息
        /// </summary>
        public PageStatic NewsIdAll(int infoId)
        {
            PageStatic page = new PageStatic();
            string     sql  = " select * from MenberInfo_ViewCar where InfoID=@infoId";

            //string sql = "select a.title,a.publishT,a.AuditingStatus, a.Hit,b.[Content] from MainInfoTab as a inner join CarveOutInfoTab as b on a.InfoID=b.InfoID where a.InfoID=@infoId";
            SqlParameter[] para =
            {
                new SqlParameter("@infoId", SqlDbType.Int, 8)
            };
            para[0].Value = infoId;
            DataSet ds = Tz888.DBUtility.DbHelperSQL.Query(sql, para);

            if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
            {
                page.Title              = GetTitle(ds.Tables[0].Rows[0]["title"].ToString(), 18);
                page.PublishT           = Convert.ToDateTime(ds.Tables[0].Rows[0]["publishT"].ToString());
                page.Content            = GetTitle(ThrowHtml((ds.Tables[0].Rows[0]["Content"].ToString().Trim())), 150);
                page._auditingStatus    = Convert.ToInt32(ds.Tables[0].Rows[0]["AuditingStatus"].ToString());
                page.Hit                = Convert.ToString(ds.Tables[0].Rows[0]["Hit"].ToString());
                page.Address            = ds.Tables[0].Rows[0]["Address"].ToString();
                page.CapitalID          = Capital(ds.Tables[0].Rows[0]["CapitalID"].ToString().Trim());
                page.ComName            = ds.Tables[0].Rows[0]["ComName"].ToString();
                page.Email              = ds.Tables[0].Rows[0]["Email"].ToString();
                page.IndustryCarveOutID = IndustryClassListSelect(Convert.ToString(ds.Tables[0].Rows[0]["IndustryCarveOutID"].ToString().Trim()));
                page.InvestObject       = HezuoType(Convert.ToString(ds.Tables[0].Rows[0]["InvestObject"].ToString()));
                page.InvestReturn       = GetTitle(ds.Tables[0].Rows[0]["InvestReturn"].ToString(), 150);
                page.LinkMan            = ds.Tables[0].Rows[0]["LinkMan"].ToString();
                page.PostCode           = Convert.ToString(ds.Tables[0].Rows[0]["PostCode"].ToString());
                page.ProvinceID         = ProvinceSelect(Convert.ToString(ds.Tables[0].Rows[0]["ProvinceID"].ToString().Trim()));
                page.Tel                = Convert.ToString(ds.Tables[0].Rows[0]["Tel"].ToString());
                page.ValidateID         = Xmyxq(Convert.ToString(ds.Tables[0].Rows[0]["ValidateID"].ToString().Trim()));
                page.WebSite            = Convert.ToString(ds.Tables[0].Rows[0]["WebSite"].ToString());
                page.KeyWord            = Convert.ToString(ds.Tables[0].Rows[0]["KeyWord"].ToString());
                page.CarveOutInfoType   = InfoType(Convert.ToString(ds.Tables[0].Rows[0]["CarveOutInfoType"].ToString().Trim()));
            }
            return(page);
        }
Пример #4
0
    protected void IbtnSubmit_Click(object sender, EventArgs e)
    {
        string infoid = Request["infoID"].ToString();   //获取ID
        //List<Tz888.Model.Common.IndustryModel> industryModels = new List<Tz888.Model.Common.IndustryModel>(); //融资行业实体列表
        string Indus = this.ddlIndustry.SelectedValue.ToString().Trim();

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

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

        main.TemplateID = "001";

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

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


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

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

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

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

        #region  短内容信息表

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

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

            Tz888.Common.MessageBox.Show(this.Page, "审核成功");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
        if (InfoID <= 0)
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
    }