資源簡介
一個簡單Java實現的員工信息管理系統,功能還是比較豐富的,作為畢業設計或者課程設計綽綽有余,直接導入可以運行。

代碼片段和文件信息
package?com.first;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?java.sql.Connection;
import?java.sql.DriverManager;
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;
import?javax.swing.JButton;
import?javax.swing.JComboBox;
import?javax.swing.JLabel;
import?javax.swing.JOptionPane;
import?javax.swing.JPanel;
import?javax.swing.JTextField;
import?com.pojo.Suppplier;
import?com.pojo.Zone;
/**
?*?
?*?@author?SiVan
?*?@time?2017年4月27日?上午8:03:16
?*?TODO 添加客戶
?*/
public?class?AddCustomerPanel?extends?JPanel{
private?JLabel?customer_Name?=?new?JLabel(“名稱“);
private?JLabel?customer_Zone?=?new?JLabel(“客戶所在區域“);
private?JLabel?customer_Phone?=?new?JLabel(“聯系方式“);
private?JLabel?customer_WeChat?=?new?JLabel(“微信號“);
private?JLabel?customer_Address?=?new?JLabel(“地址“);
private?JTextField?name_Field?=?new?JTextField();
private?JComboBox?zone_Field?=?new?JComboBox();
private?JTextField?address_Field?=?new?JTextField();
private?JTextField?phone_Field?=?new?JTextField();
private?JTextField?wechat_Field?=?new?JTextField();
private?JButton?button?=?new?JButton(“添加“);
private?String?url?=?“jdbc:mysql://localhost:3306/erp“;
private?String?user?=?“root“;
private?String?password?=?“1018222wxw“;
public?AddCustomerPanel()?{
//?TODO?Auto-generated?constructor?stub
this.setLayout(null);
customer_Name.setBounds(30?30?80?30);
name_Field.setBounds(130?30?250?30);
customer_Zone.setBounds(30?90?80?30);
zone_Field.setBounds(130?90?250?30);
customer_Phone.setBounds(30?150?80?30);
phone_Field.setBounds(130?150?250?30);
customer_WeChat.setBounds(30?210?80?30);
wechat_Field.setBounds(130?210?250?30);
customer_Address.setBounds(30?270?80?30);
address_Field.setBounds(130?270?250?30);
button.setBounds(200?330?80?30);
try{
try(
Connection?conn?=?DriverManager.getConnection(url?user?password);
){
String?sql?=?“select?zIdzName?from?zone?where?zStatus?=?\“1\““;
PreparedStatement?ps?=?conn.prepareStatement(sql);
ResultSet?rs?=?ps.executeQuery();
while(rs.next()){
Zone?zone?=?new?Zone();
zone.setZone(rs.getString(2));
zone.setZoneId(rs.getString(1));
zone_Field.addItem(zone);
}
}
}catch(Exception?e1){
e1.printStackTrace();
}
button.addActionListener(new?ActionListener()?{
@Override
public?void?actionPerformed(ActionEvent?e)?{
//?TODO?Auto-generated?method?stub
String?name?=?name_Field.getText();
Zone?zone?=?(Zone)?zone_Field.getSelectedItem();
String?address?=?address_Field.getText();
String?phone?=?phone_Field.getText();
String?wechat?=?wechat_Field.getText().trim();
if(““.equals(name)){
JOptionPane.showMessageDialog(null?“姓名不能為空,請重新輸入“);
return;
}
try{
try(
Connection?conn?=?DriverManager.getConnection(url?user?password);
){
String?sql?=?“insert?into?customer(zId?cName?cPh
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1289??2018-02-01?20:00??鑫美ERP管理系統\.classpath
?????文件???????1163??2017-08-05?07:07??鑫美ERP管理系統\.project
?????文件????????510??2017-08-05?07:07??鑫美ERP管理系統\.settings\.jsdtscope
?????文件???????6665??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.jdt.core.prefs
?????文件????????514??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.wst.common.component
?????文件????????403??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件???????2774??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.wst.jsdt.core.prefs
?????文件?????????49??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2017-08-05?07:07??鑫美ERP管理系統\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????文件?????639592??2018-02-01?20:00??鑫美ERP管理系統\google-collections-1.0.jar
?????文件???????6508??2017-08-05?07:07??鑫美ERP管理系統\image\background.jpg
?????文件???????6306??2017-08-05?07:07??鑫美ERP管理系統\image\backup.png
?????文件???????5966??2017-08-05?07:07??鑫美ERP管理系統\image\belong.png
?????文件??????11255??2017-08-05?07:07??鑫美ERP管理系統\image\cancel.png
?????文件???????3161??2017-08-05?07:07??鑫美ERP管理系統\image\card.png
?????文件???????6926??2017-08-05?07:07??鑫美ERP管理系統\image\classify.png
?????文件???????3945??2017-08-05?07:07??鑫美ERP管理系統\image\classify1.png
?????文件???????7603??2017-08-05?07:07??鑫美ERP管理系統\image\customer.png
?????文件???????7974??2017-08-05?07:07??鑫美ERP管理系統\image\customer_Info.png
?????文件???????6600??2017-08-05?07:07??鑫美ERP管理系統\image\dailyincome.png
?????文件???????2223??2017-08-05?07:07??鑫美ERP管理系統\image\destroy.png
?????文件???????4375??2017-08-05?07:07??鑫美ERP管理系統\image\destroySave.png
?????文件???????2798??2017-08-05?07:07??鑫美ERP管理系統\image\employee.png
?????文件???????5930??2017-08-05?07:07??鑫美ERP管理系統\image\exit.png
?????文件????????928??2017-08-05?07:07??鑫美ERP管理系統\image\footer_useer.png
?????文件???????6232??2017-08-05?07:07??鑫美ERP管理系統\image\help.png
?????文件???????1600??2017-08-05?07:07??鑫美ERP管理系統\image\info.png
?????文件???????6794??2017-08-05?07:07??鑫美ERP管理系統\image\Inventory.png
?????文件???????5651??2017-08-05?07:07??鑫美ERP管理系統\image\loginbackground.png
?????文件????????203??2017-08-05?07:07??鑫美ERP管理系統\image\login_background.png
............此處省略387個文件信息
- 上一篇:hibernate-3.2.5.ga.jar
- 下一篇:java資費管理系統
評論
共有 條評論