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;
using System.IO;

public partial class uc_job_jobuc : System.Web.UI.UserControl
{
    private string id;
    public string pId
    {
        set
        {
             id = value.ToString().Trim();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection con = CDatabase.wtoconn();
        con.Open();
        SqlCommand cmd = new SqlCommand("select * from jobmag where id=" + id, con);
        SqlDataReader sdr2 = cmd.ExecuteReader();
        sdr2.Read();
        this.jobtitle.Text = sdr2["jobtitle"].ToString();
        this.jobcount.Text ="需求人数："+sdr2["jobcount"].ToString();
        this.jobbm.Text = sdr2["jobbm"].ToString();
        this.jobaddtime.Text = sdr2.GetDateTime(4).ToString("d");
        this.cont.Text = sdr2["cont"].ToString();
        this.times ="查看次数："+sdr2["times"].ToString();
 
        sdr2.Close();
        con.Close();
    }

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