private void button1_Click(object sender, EventArgs e) { Entity.Job job = new Entity.Job(); if (this.textBox7.Text == "请输入岗位" || this.textBox7.Text == "") { this.dataGridView1.DataSource = BLL.Recruitment.CJobPlan(); return; } try { job.jName = this.textBox7.Text; } catch (Entity.HrmException he) { Msg.Box.Show(he.Message); return; } this.dataGridView1.DataSource = BLL.Recruitment.CJobPlan1(job); }
/// <summary> /// 按部门查询招聘计划 /// </summary> /// <param name="job"></param> /// <returns></returns> public static System.Data.DataTable CJobPlan1(Entity.Job job) { string sql = "select JPID 编号,JName 需求岗位,JPCount 需求人数,JPNeed 岗位要求,JPStart 发布时间,JPStop 结束时间,JPCall 联系人,JPPhone 联系人电话 from JobPlan,job where JName like '%" + job.jName + "%' and JobPlan.JID=job.JID"; return(DBHelper.GetDT(sql)); }
/// <summary> /// 更新岗位名称 /// </summary> /// <returns></returns> public static int UpJob(Entity.Job job) { string sql = "update Job set JName='" + job.jName + "' where JID=" + job.jID + ""; return(DBHelper.GetLine(sql)); }
/// <summary> /// 删除部门下的岗位 /// </summary> /// <returns></returns> public static int DelJob(Entity.Job job) { string sql = "delete from Job where JID=" + job.jID + ""; return(DBHelper.GetLine(sql)); }
/// <summary> /// 添加岗位到部门 /// </summary> /// <returns></returns> public static int AddJob(Entity.Job job) { string sql = "insert into Job values('" + job.jName + "'," + job.depID + ")"; return(DBHelper.GetLine(sql)); }
/// <summary> /// 加载部门下的岗位 /// </summary> /// <returns></returns> public static System.Data.DataTable LoadJobs(Entity.Job job) { string sql = "select * from Job where DepID=" + job.depID + ""; return(DBHelper.GetDT(sql)); }
public static System.Data.DataTable CJobPlan1(Entity.Job job) { return(DAL.JobPlan.CJobPlan1(job)); }