没有合适的资源?快使用搜索试试~ 我知道了~
人事工资管理系统源代码 java.doc
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 98 浏览量
2022-06-11
10:08:45
上传
评论
收藏 198KB DOC 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/85609442/0001-79451a42ccbec508dbb556d7e9972e92_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
34页
人事工资管理系统源代码 java
资源推荐
资源详情
资源评论
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![](https://csdnimg.cn/release/download_crawler_static/85609442/bg1.jpg)
bm.java
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;
class bm extends Frame implements ActionListener,ItemListener
{ private condb conx=null;
private ResultSet rs=null;
private String sql=null;
private Label num=new Label("职工号");
private Label jb=new Label("税收");
private Label fj=new Label("医疗保险");
private Label in=new Label("退休保险");
private TextField numtx=new TextField();
private TextField jbtx=new TextField();
private TextField fjtx=new TextField();
private TextField intx=new TextField();
private Choice numcho=new Choice();
private Button add=new Button("增加");
private Button exit=new Button("退出");
public bm()
{ setTitle("扣除工资");
setSize(400,300);
setBackground(Color.LIGHT_GRAY);
this.setLocationRelativeTo(this.getParent());
this.setResizable(false);
setLayout(null);
num.setBounds(80,50,50,20);
jb.setBounds(80,80,50,20);
fj.setBounds(80,110,50,20);
in.setBounds(80,140,50,20);
numtx.setBounds(160,50,100,20);
jbtx.setBounds(160,80,100,20);
fjtx.setBounds(160,110,100,20);
intx.setBounds(160,140,100,20);
numcho.setBounds(160,170,100,20);
add.setBounds(60,220,50,20);
exit.setBounds(300,220,50,20);
![](https://csdnimg.cn/release/download_crawler_static/85609442/bg2.jpg)
add(add);
add(exit);
add(num);
add(jb);
add(fj);
add(in);
add(numtx);
add(jbtx);
add(fjtx);
add(intx);
add(numcho);
//lb
add.addActionListener(this);
exit.addActionListener(this);
numcho.addItemListener(this);
initnumcho();
setVisible(true);
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{dispose();}
}
);
}
public void itemStateChanged(ItemEvent i)
{ numtx.setText(numcho.getSelectedItem());
}
public void initnumcho()
{ conx=new condb();
sql="select * from 扣除工资 ";
numcho.removeAll();
try { rs=conx.getrs(conx.con,sql);
while(rs.next())
{numcho.add(rs.getString("职工号"));}
conx.dbclose(conx.con,rs);
conx=null;
rs=null;
![](https://csdnimg.cn/release/download_crawler_static/85609442/bg3.jpg)
}
catch(Exception eo){}
}
public void actionPerformed(ActionEvent e)
{ conx=new condb();
if(e.getActionCommand().equals("退出"))
this.dispose();
if(e.getActionCommand().equals("增加"))
{
sql="select * from 扣除工资 where 职工号='"+numtx.getText()+"'";
try{ rs=conx.getrs(conx.con,sql);
if(rs.next())
{
sql="insert into 扣除工资(职工号,税收,医疗保险,养老保险)"+
"values('"+numtx.getText().trim()+"',"+
jbtx.getText()+","+fjtx.getText()+",'"+intx.getText()+"')";
try { System.out.println(sql);
conx.dbclose(conx.con,null);
}
catch(Exception ue){System.out.println(""+ue);}
JOptionPane jop=new JOptionPane();
jop.showMessageDialog(null," 扣除工资添加成功!","添加成功",-1);
conx.dbclose(conx.con,rs);
numtx.setText("");
jbtx.setText("");
fjtx.setText("");
conx=null;
rs=null;
}
else { JOptionPane jop=new JOptionPane();
jop.showConfirmDialog(null,"添加失败!","警告!",-1);
conx.dbclose(conx.con,rs);
conx=null;
rs=null;
}
} catch(SQLException et){System.out.println(""+et);}
}
}
![](https://csdnimg.cn/release/download_crawler_static/85609442/bg4.jpg)
}
/*
else
*/
bmcx.java
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import javax.swing.*;
import java.awt.Window;
class bmcx extends Frame implements ActionListener
{ private condb conc=null;
private ResultSet rs=null;
private String sql=null;
private Label chao=new Label("职工号:");
private Label cname=new Label("姓名:");
private Label csex=new Label("税收:");
private Label cage=new Label("医疗保险:");
private Label cdep=new Label("退休保险: ");
private TextField chaotx=new TextField();
private Label cnametx=new Label("");
private Label csextx=new Label("");
private Label cagetx=new Label("");
private Label cdeptx=new Label("");
private Button cx=new Button("查询");
private Button tc=new Button("退出");
public bmcx()
{ setTitle("扣除工资查询");
setSize(400,250);
setBackground(Color.LIGHT_GRAY);
this.setLocationRelativeTo(this.getParent());
this.setResizable(false);
setLayout(null);
chao.setBounds(80,50,50,20);
cname.setBounds(80,80,50,20);
csex.setBounds(80,110,50,20);
cage.setBounds(80,140,50,20);
![](https://csdnimg.cn/release/download_crawler_static/85609442/bg5.jpg)
cdep.setBounds(80,170,50,20);
chaotx.setBounds(160,50,150,20);
cnametx.setBounds(160,80,150,20);
csextx.setBounds( 160,110,150,20);
cagetx.setBounds(160,140,150,20);
cdeptx.setBounds(140,170,150,20);
cx.setBounds(60,205,50,20);
tc.setBounds(300,205,50,20);
add(chao);
add(cname);
add(cagetx);
add(cage);
add(csex);
add(cdep);
add(chaotx);
add(cnametx);
add(csextx);
add(cdeptx);
add(cx);
add(tc);
setVisible(true);
cx.addActionListener(this);
tc.addActionListener(this);
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{dispose();}
}
);
}
public void actionPerformed(ActionEvent e)
{ if(e.getActionCommand().equals("退出"))
this.dispose();
if(e.getActionCommand().equals("查询"))
{ conc=new condb();
sql="select 姓名,税收,医疗保险,退休保险 from 扣除工资,职工 where 扣除工资.职工号=
职工.职工号 and 扣除工资.职工号='"+chaotx.getText()+"'";
try { rs=conc.getrs(conc.con,sql);
if(rs.next())
{
cnametx.setText(rs.getString("姓名"));
csextx.setText(rs.getString("税收"));
剩余33页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
omyligaga
- 粉丝: 55
- 资源: 2万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)