using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class WebMain_Product_product : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
            this.databind();
    }
    public void databind()
    {       
        SqlConnection conn = CDatabase.wtoconn();
        conn.Open();
        string sqlstr="";
        sqlstr = "select * from jobmag where isfp='y' order by jobaddtime";
        SqlDataAdapter sda=new SqlDataAdapter(sqlstr, conn);
        DataSet ds = new DataSet();
        sda.Fill(ds,"cu");
        this.prductpt.DataSource = Doadmin.psgb(ds, Table1, 5, 0);//分页类调用
        prductpt.DataKeyField="id";
        this.prductpt.DataBind();
        SqlCommand smdj;
        SqlDataReader sdrj;
        Label laj;
        HyperLink hyj;
        this.prductpt.RepeatColumns =1;
        if (ds.Tables[0].Rows.Count != 0)
        {
    
        }
        else
        {
            this.Panel1.Visible = false;
            this.Panel2.Visible = true;
        }
        conn.Close();
    }

    public string SubStr(string sString, int nLeng)
    {
        if (sString.Length <= nLeng)
        {
            return sString;
        }
        string sNewStr = sString.Substring(0, nLeng);
        sNewStr = sNewStr + "...";
        return sNewStr;
    }
    public string getimgurl(string no)
    {
        return "fd";
    }

}
