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 sql;

public partial class JobDetails : System.Web.UI.Page
{
    SqlDB sqldb = new SqlDB();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            JobInfo();
        }
    }
    private string getJobId()
    {
        string JobId="";
        if(Request.QueryString["JobId"]!=null)
        {
            JobId=Request.QueryString["JobId"].ToString();
        }
        else
        {
            Response.Redirect("err.aspx");
        }
        return JobId;
    }
    private void JobInfo()
    {
        string strSql = "select * from JobInfo as a,JobNeed as b where a.JobId=b.JobId and a.JobId=" + getJobId();
        DataSet ds = sqldb.GetDS(strSql);
        lblName.Text = ds.Tables[0].Rows[0]["JobName"].ToString();
        lblAddress.Text = ds.Tables[0].Rows[0]["JobAddress"].ToString();
        lblPerson.Text = ds.Tables[0].Rows[0]["JobNeedPerson"].ToString();
        lblMoney.Text = ds.Tables[0].Rows[0]["JobMoney"].ToString();
        lblDate.Text = ds.Tables[0].Rows[0]["JobTime"].ToString();
        lblSex.Text = ds.Tables[0].Rows[0]["JobPersonSex"].ToString();
        lblAge.Text = ds.Tables[0].Rows[0]["JobPersonAge"].ToString();
        lblDegree.Text = ds.Tables[0].Rows[0]["JobPersonDegree"].ToString();
        lblLanguage.Text = ds.Tables[0].Rows[0]["JobPersonLanguage"].ToString();
        lblExperience.Text = ds.Tables[0].Rows[0]["JobPersonExperience"].ToString();
        lblMajor.Text = ds.Tables[0].Rows[0]["JobPersonMajor"].ToString();
        lblLevel.Text = ds.Tables[0].Rows[0]["JobLevel"].ToString();
        lblSelect.Text = ds.Tables[0].Rows[0]["JobSelect"].ToString();
        lblBelong.Text = ds.Tables[0].Rows[0]["JobBelong"].ToString();

        ltContent.Text = ds.Tables[0].Rows[0]["JobNeedContent"].ToString();
        ltCompetence.Text = ds.Tables[0].Rows[0]["JobNeedCompetence"].ToString();
        ltSchool.Text = ds.Tables[0].Rows[0]["JobNeedSchool"].ToString();
        ltExperience.Text = ds.Tables[0].Rows[0]["JobNeedExperience"].ToString();
        ltSkill.Text = ds.Tables[0].Rows[0]["JobNeedSkill"].ToString();
        ltAttitude.Text = ds.Tables[0].Rows[0]["JobNeedAttritude"].ToString();
        ds.Clear();
    }
}
