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.Web.Mail;
public partial class WTOSYSadmin_vipmag_Commentsedit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["WtoRightName"] == null)
        {
            Response.Redirect("~/SYSADMIN/main/error.aspx?err=非法登陆!或系统超时，请刷新后重新登录");
        }
        if (!IsPostBack)
        {
            SqlConnection conn = CDatabase.wtoconn();
            conn.Open();
            SqlCommand smd = new SqlCommand("select * from jobHRadd where id=" + Request.QueryString["id"], conn);
            SqlDataReader sdr = smd.ExecuteReader();
            sdr.Read();
            this.jobname.Text = sdr["jobname"].ToString();
            this.jobtitle.Text = sdr["jobtitle"].ToString();
            this.age.Text = sdr["age"].ToString();
            this.jobage.Text = sdr["jobage"].ToString();
            this.jcd.Text = sdr["jcd"].ToString();
            this.gcd.Text = sdr["gcd"].ToString();
            this.tel.Text = sdr["tel"].ToString();
            this.email.Text = sdr["email"].ToString();
            this.address.Text = sdr["address"].ToString();
            this.sex.Text = sdr["sex"].ToString();
            this.addtime.Text = sdr["addtime"].ToString();
            this.DropDownList1.SelectedValue = sdr["zt"].ToString();

            if (sdr["fj"].ToString() == "")
            {
                this.dw.Text = "无附件";
            }
            else
            {
                this.dw.Text = "下载附件";
                dw.NavigateUrl = "~/upfile/upload/"+sdr["fj"].ToString();
                dw.Target = "_blank";
            }
            sdr.Close();
            conn.Close();
            Doadmin.Execsql("update jobHRadd set jobck='已查看!' where id=" + Request.QueryString["id"]);
        }

        
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Doadmin.Execsql("update jobHRadd set zt='"+DropDownList1.SelectedValue.ToString()+"' where id="+Request.QueryString["id"]);
        Response.Redirect("~/SYSadmin/job/hrmag.aspx");
    }
}
