当前位置:首页 > (完整版)工资管理系统(论文范文_JSP_JAVA_毕业设计)
sWageLab.setText(rs.getString(\sWTypeLab.setText(rs.getString(\conn.dbClose(rs);
conn=null; rs=null; } else {
JOptionPane jop=new JOptionPane();
jop.showMessageDialog(null,\该用户不存在!\警告\ } } }
public void itemStateChanged(ItemEvent ie){ }
}
nameTxt.setText(userChoice.getSelectedItem()); }
catch(Exception e){}
添加员工信息的核心代码如下:
public void initDtmtChoice(){ try{
conn=new sqlconn();
sql=\
rs=conn.getRs(sql);
}
while(rs.next()){
dtmtChoice.addItem(rs.getString(\
conn.dbClose(rs); conn=null; }
catch(Exception e){} }
public void initWTypeChoice(){ int i=1; while(i<=8){ } }
public void initIdChoice() { try{
conn=new sqlconn();
wTypeChoice.addItem(i+\级\i++;
sql=\ }
conn.dbClose(rs);
rs=conn.getRs(sql); while(rs.next()){
idChoice.addItem(rs.getString(\
conn=null; }
catch(Exception e){} }
public void actionPerformed(ActionEvent ae){ if(ae.getActionCommand().equals(\退出\
dispose();
if(ae.getActionCommand().equals(\清空\
idTxt.setText(\nameTxt.setText(\sexTxt.setText(\ageTxt.setText(\
postTxt.setText(\ wageTxt.setText(\ }
if(ae.getActionCommand().equals(\添加\
sql=\
conn=new sqlconn(); try{
rs=conn.getRs(sql); if(rs.next()){
JOptionPane jop=new JOptionPane();
jop.showMessageDialog(null,\该员工已经存在!\警告\ conn.dbClose(rs);
conn=null; rs=null; } else{ try{
sql=\
into
employees
values('\
+ageTxt.getText()+\
\
+wTypeChoice.getSelectedItem()+\ conn=new sqlconn(); conn.dbMod(sql); conn.dbClose(rs);
JOptionPane jop=new JOptionPane();
jop.showMessageDialog(null,\添加成功!\提示信息\ sql=\
into
wages
values('\em()+\
connT=new sqlconn(); connT.dbMod(sql); connT.dbClose(rs); }
catch(Exception se){}
idChoice.addItem(idTxt.getText());
共分享92篇相关文档