public void viewPermit() { string viewPer = "select * from DT_employer"; SqlHelp sqlHelper = new TryDBMS.SqlHelp(); dataGridView1.DataSource = sqlHelper.showData(viewPer, "DT_employer").Tables["DT_employer"]; }
public void workView() { string sqlView = "select careernum 职业号,classnum 类型号,neednum 需求数量,lastnum 聘用数量,employer 用人单位 from DT_employer"; SqlHelp sqlHelper = new TryDBMS.SqlHelp(); dataGridView1.DataSource = sqlHelper.showData(sqlView, "DT_employer").Tables["DT_employer"]; }
private void cbCg_SelectedIndexChanged(object sender, EventArgs e) { string findMj = "select distinct zyname from dt_zy where yxnum in (select yxnum from dt_yx where yxname ='" + cbCg.Text + "')"; SqlHelp sqlHelper = new TryDBMS.SqlHelp(); cbMj.DataSource = sqlHelper.showData(findMj, "dt_zy").Tables[0]; cbMj.DisplayMember = "zyname"; cbMj.ValueMember = "zyname"; }
private void Register_Load(object sender, EventArgs e) { string findCg = "select distinct yxname from dt_yx"; SqlHelp sqlHelper = new TryDBMS.SqlHelp(); cbCg.DataSource = sqlHelper.showData(findCg, "dt_yx").Tables[0]; cbCg.DisplayMember = "yxname"; cbCg.ValueMember = "yxname"; }