if (e.getActionCommand().equals("查询")) {
gzcx.setText(""); con=new condb();
sql="select 工资表.职工号,员工基本信息.姓名,员工基本信息.部门
名,工资表.工资,工资表.工资日期 from 员工基本信息,工资表 WHERE 员工基本信息.职工号=工资表.职工号 AND 员工基本信息.部门名='" + bmchoice.getSelectedItem()+ "' ORDER BY 工资表.工资日期 DESC ";
rs=con.getrs(con.con, sql); try {
while(rs.next()) { }
try {
gzcx.appendText(" ");
gzcx.appendText(rs.getString("职工号")); gzcx.appendText(rs.getString("姓名")); gzcx.appendText(rs.getString("部门名")); gzcx.appendText(rs.getString("工资")); gzcx.appendText("\t ");
gzcx.appendText(rs.getString("工资日期")); gzcx.appendText("\n");
} catch (SQLException e1) { }
// TODO Auto-generated catch block e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block e1.printStackTrace();