}
xbtext.setText(rs.getString("性别")); bmtext.setText(rs.getString("部门名")); gwtext.setText(rs.getString("岗位")); csnytext.setText(rs.getString("出生年月")); hyzktext.setText(rs.getString("婚姻状况")); lxdhtext.setText(rs.getString("联系电话")); zztext.setText(rs.getString("住址"));
con.dbclose(con.con, rs); con = null; rs = null;
}catch (SQLException e1) { }
e1.printStackTrace();
4.修改职工信息
if (ae.getActionCommand().equals("确定")) {
try {
sql = "update 员工基本信息 set 姓名='"+nametext.getText()+"',
性别='"+xbtext.getText()+"',部门名='"+bmchoice.getSelectedItem()+"',岗位='"+gwchoice.getSelectedItem()+"',出生年月='"+csnytext.getText()+"',婚姻状况='"+hyzktext.getText()+"',
联
系
电
话
='"+lxdhtext.getText()+"',
住
址
='"+zztext.getText()+"' WHERE 职工号='"+numchoice.getSelectedItem()+"'"; -1);
} catch (Exception ue) { }
con.dbclose(con.con, rs); nametext.setText("");
ue.printStackTrace();
con.moddb(con.con, sql);
jop.showMessageDialog(null, " 职工修改成功!", "更新成功",