Esempio n. 1
0
        /// <summary>
        /// 根据ID查询商机信息
        /// </summary>
        public PageStatic2 SJInfo(int infoId)
        {
            PageStatic2 page = new PageStatic2();
            string      sql  = "select a.title,a.publishT,a.AuditingStatus,b.[Content],b.ProvinceID,b.CountyID,"
                               + "b.IndustryOpportunityID,b.OpportunityType,a.ValidateTerm,b.Analysis,b.Flow,b.Request "
                               + "from MainInfoTab as a inner join OpportunityInfoTab 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                 = ds.Tables[0].Rows[0]["title"].ToString();
                page.PublishT              = Convert.ToDateTime(ds.Tables[0].Rows[0]["publishT"].ToString());
                page.Content               = ds.Tables[0].Rows[0]["Content"].ToString();
                page.AuditingStatus        = Convert.ToInt32(ds.Tables[0].Rows[0]["AuditingStatus"].ToString());
                page.ProvinceID            = ds.Tables[0].Rows[0]["ProvinceID"].ToString();
                page.CountyID              = ds.Tables[0].Rows[0]["CountyID"].ToString();
                page.IndustryOpportunityID = ds.Tables[0].Rows[0]["IndustryOpportunityID"].ToString();
                page.OpportunityType       = ds.Tables[0].Rows[0]["OpportunityType"].ToString();
                page.ValidateTerm          = ds.Tables[0].Rows[0]["ValidateTerm"].ToString();
                page.Analysis              = ds.Tables[0].Rows[0]["Analysis"].ToString();
                page.Flow    = ds.Tables[0].Rows[0]["Flow"].ToString();
                page.Request = ds.Tables[0].Rows[0]["Request"].ToString();
            }
            return(page);
        }
Esempio n. 2
0
        /// <summary>
        /// 根据ID查询成功案例信息
        /// </summary>
        public PageStatic2 cgyl(int infoId)
        {
            PageStatic2 page = new PageStatic2();
            string      sql  = "select a.title,a.publishT,a.AuditingStatus,b.[Content],b.CasesTypeID,c.ShortTitle,c.ShortContent "
                               + " from MainInfoTab as a inner join CasesInfoTab as b on a.InfoID=b.InfoID inner join "
                               + " ShortInfoTab as c on a.InfoID=c.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          = ds.Tables[0].Rows[0]["title"].ToString();
                page.PublishT       = Convert.ToDateTime(ds.Tables[0].Rows[0]["publishT"].ToString());
                page.Content        = ds.Tables[0].Rows[0]["Content"].ToString();
                page.AuditingStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["AuditingStatus"].ToString());
                page.CasesTypeID    = ds.Tables[0].Rows[0]["CasesTypeID"].ToString().Trim();
                page.Laiyuan        = ds.Tables[0].Rows[0]["ShortTitle"].ToString().Trim();
                page.Zuozhe         = ds.Tables[0].Rows[0]["ShortContent"].ToString().Trim();
            }
            return(page);
        }
Esempio n. 3
0
    protected void btnShare_Click(object sender, EventArgs e)
    {
        StringBuilder sb        = new StringBuilder();
        int           begInfoID = Convert.ToInt32(this.begInfo.Value);
        int           endInfoID = Convert.ToInt32(this.endInfo.Value);

        string[] name = webservice.SjselBegion(begInfoID, endInfoID).Split(',');
        for (int i = 0; i < name.Length - 1; i++)
        {
            cc = page.SJInfo(Convert.ToInt32(name[i]));
            if (cc.AuditingStatus != 1)
            {
                sb.Append("编号:" + name[i] + "  所对应的状态为:" + Verify(cc.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                webservice.SjHtml(Convert.ToInt32(name[i]), name[i].Trim(), cc.Title, cc.ProvinceID, cc.CountyID, cc.IndustryOpportunityID,
                                  cc.OpportunityType, Convert.ToString(cc.PublishT), cc.ValidateTerm, cc.Content, cc.Analysis, cc.Request, cc.Flow);
                webservice.SjModifyHtml(Convert.ToInt32(name[i]));
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
        }
    }
Esempio n. 4
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)
        {
            cc = page.SJInfo(Convert.ToInt32(str.Trim()));
            if (cc.AuditingStatus != 1)
            {
                sb.Append("编号:" + str.Trim() + "  所对应的状态为:" + Verify(cc.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                webservice.SjHtml(Convert.ToInt32(str), str.Trim(), cc.Title, cc.ProvinceID, cc.CountyID, cc.IndustryOpportunityID,
                                  cc.OpportunityType, Convert.ToString(cc.PublishT), cc.ValidateTerm, cc.Content, cc.Analysis, cc.Request, cc.Flow);
                webservice.SjModifyHtml(Convert.ToInt32(str.Trim()));
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
        }
    }
Esempio n. 5
0
    /// <summary>
    /// 在所对应的区间内生成静态文件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnShare_Click(object sender, EventArgs e)
    {
        StringBuilder sb        = new StringBuilder();
        int           begInfoID = Convert.ToInt32(this.begInfo.Value);
        int           endInfoID = Convert.ToInt32(this.endInfo.Value);

        string[] name = page.selInfoIdRegion(begInfoID, endInfoID).Split(',');
        for (int i = 0; i < name.Length - 1; i++)
        {
            cc = page.cgyl(Convert.ToInt32(name[i]));
            if (cc.AuditingStatus != 1)
            {
                sb.Append("编号:" + name[i] + "  所对应的状态为:" + Verify(cc.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                page.StaticHtml(Convert.ToInt32(name[i]), name[i].Trim(), cc.Title, cc.PublishT.ToString(), cc.Laiyuan, cc.Zuozhe, cc.Content, cc.CasesTypeID.Trim());
                page.ModifyHtmlFile(Convert.ToInt32(name[i]));
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
        }
    }
Esempio n. 6
0
    /// <summary>
    /// 生成静态文件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    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)
        {
            cc = page.cgyl(Convert.ToInt32(str.Trim()));

            if (cc.AuditingStatus != 1)
            {
                sb.Append("编号:" + str.Trim() + "  所对应的状态为:" + Verify(cc.AuditingStatus) + " ,生成静态化页面失败\\n");
            }
            else
            {
                page.StaticHtml(Convert.ToInt32(str.Trim()), str.Trim(), cc.Title, cc.PublishT.ToString(), cc.Laiyuan, cc.Zuozhe, cc.Content, cc.CasesTypeID.Trim());
                page.ModifyHtmlFile(Convert.ToInt32(str.Trim()));
            }
        }
        if (sb.ToString() != "")
        {
            Tz888.Common.MessageBox.Show(this.Page, sb.ToString());
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功");
        }
    }