简单的JAVA员工信息管理系统源码
8页1、/ 项目目标:建立员工管理系统第一个版本。/ 实现图形用户界面的员工信息查询、增、删、改;与数据库建立,并将修改结果时时保存到数据库。/ 模块:1.GUI界面 2.数据库连接 3.查询 4.增、5删 6改(操作数据库)import java.sql.*;import java.awt.*;import .*;import javax.swing.*;public class EmpManageSys implements ActionListener Connection con;Statement stmt;String sql;ResultSet rs;StringBuffer sb = new StringBuffer();JTextField jtf2 = new JTextField(张飞,10);JTextField jtf3 = new JTextField(10);JTextField jtf4 = new JTextField(10);JTextField jtf7 = new JTextField(10);JTextField jtf5 = new JTextFie
2、ld(10);JTextField jtf6 = new JTextField(10);JTextField jtf8 = new JTextField(10);JTextField jtf9 = new JTextField(10);JTextArea jta10 = new JTextArea(50, 40);public void actionPerformed(ActionEvent e) String str = e.getActionCommand();if (查询.equals(str) /if check the button of 查询,then go to method of searchEmp()searchEmp(); else if (增加.equals(str) /if check the button of 增加,then go to method of addEmp()addEmp(); else if (修改.equals(str) /if check the button of 修改,then go to method of alterEmp()al
3、terEmp(); else if (撤除.equals(str) /if check the button of 撤除,then go to method of deleteEmp()deleteEmp();/this is the constructor.EmpManageSys() createGUI();connectToDataBase();/ searchEmp();/ addEmp();/ deleteEmp();alterEmp();/connect to the database by using the method getConnection from the class of JdbcUtil./You can find the class of JdbcUtil at the button of this page.public Connection connectToDataBase() con = JdbcUtil.getConnection();(con);return con;public void searchEmp() jta10.setText(
4、);try stmt = con.createStatement();/ sql = select * from Mstar where id= + jtf3.getText();/ sql1=select * from sd100343 where =+jtf3.getText();sql = select * from Mstar where chineseName=+ jtf2.getText().toLowerCase().trim() + or id=+ jtf3.getText().toLowerCase().trim() + or engName=+ jtf4.getText().toLowerCase().trim() + or UNIT=+ jtf5.getText().toLowerCase().trim() + or TEAM=+ jtf6.getText().toLowerCase().trim() + or Phone=+ jtf7.getText().toLowerCase().trim() + or region=+ jtf8.getText().toLo
《简单的JAVA员工信息管理系统源码》由会员人***分享,可在线阅读,更多相关《简单的JAVA员工信息管理系统源码》请在金锄头文库上搜索。
简洁的人生格言警句88条
第三节大气压强.doc
农业技术员个人年终工作总结.docx
冬季施工方案(参考资料).doc
珍重再见幼儿教案.docx
关于2023年欠费维稳调研报告 .doc
江西省化工企业安全生产五十条禁令.doc
计算机二级ps考试试题库
五年级未来的生活日记300字
医院聘用的合同格式版(六篇).doc
最新关于收据范文参考.doc
女生皮肤必修课.doc
2022年设备监理师复习题练习:合同管理(1).docx
儿童过敏性咳嗽有哪些症状
汽车雨刷片型号对照表.doc
钳工基本知识.doc
商洛滤波减速器项目建议书(范文参考)
悲惨世界读后感1
借款合同(七).docx
沥青混合料路面地高质量通病及防治
2023-10-31 7页
2023-07-15 4页
2023-08-27 13页
2023-08-03 2页
2022-12-12 2页
2022-10-29 6页
2022-10-09 2页
2022-11-30 2页
2023-02-28 4页
2024-02-19 2页