Skip to content

Commit

Permalink
modify some files
Browse files Browse the repository at this point in the history
  • Loading branch information
sivanWu0222 committed Aug 5, 2017
1 parent c5fa8d7 commit aa58709
Show file tree
Hide file tree
Showing 41 changed files with 64 additions and 72 deletions.
3 changes: 2 additions & 1 deletion 鑫美ERP管理系统/src/com/first/AddCustomerPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class AddCustomerPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddCustomerPanel() {
// TODO Auto-generated constructor stub
this.setLayout(null);
Expand Down Expand Up @@ -120,6 +120,7 @@ public void actionPerformed(ActionEvent e) {
}
});


this.add(customer_Name);
this.add(customer_Zone);
this.add(customer_Phone);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AddCustomerZonePanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddCustomerZonePanel() {
// TODO Auto-generated constructor stub
this.setLayout(null);
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/first/AddEmployeePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class AddEmployeePanel extends JPanel {

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";

private JLabel empName_Label = new JLabel("员工姓名");
private JLabel empCard_Label = new JLabel("员工身份证号码");
Expand Down Expand Up @@ -121,7 +121,6 @@ public void actionPerformed(ActionEvent e) {
Matcher matcher1 = pattern1.matcher(ePhone);
if(!matcher1.find()){
JOptionPane.showMessageDialog(null, "请检查联系方式是否正确");
System.out.println(ePhone);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AddPortClassifyPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddPortClassifyPanel() {
// TODO Auto-generated constructor stub
this.setLayout(null);
Expand Down
2 changes: 1 addition & 1 deletion 鑫美ERP管理系统/src/com/first/AddPortPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class AddPortPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddPortPanel() {
// TODO Auto-generated constructor stub

Expand Down
2 changes: 1 addition & 1 deletion 鑫美ERP管理系统/src/com/first/SupplierManage.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class SupplierManage extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public SupplierManage() {
// TODO Auto-generated constructor stub
this.setLayout(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class UpdateAndDeleteCustomerPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdateAndDeleteCustomerPanel() {
// TODO Auto-generated constructor stub
id_Field.setEditable(false);
Expand Down Expand Up @@ -135,7 +135,6 @@ public void actionPerformed(ActionEvent e) {
ps.setObject(5, address);
ps.setObject(6, customer.getCustomerId());
int n = ps.executeUpdate();
System.out.println(n);
String cId = customer.getCustomerId();
if(n > 0){
JOptionPane.showMessageDialog(null, "修改成功");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class UpdateAndDeleteCustomerZone extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdateAndDeleteCustomerZone() {
// TODO Auto-generated constructor stub
this.setToolTipText("客户区域添加,修改和删除!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class UpdateAndDeleteEmployeePanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";


public UpdateAndDeleteEmployeePanel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class UpdateAndDeletePortClassifyPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdateAndDeletePortClassifyPanel() {
// TODO Auto-generated constructor stub
this.setToolTipText("花盆分类添加,修改和删除!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class UpdateAndDeletePortPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdateAndDeletePortPanel() {
// TODO Auto-generated constructor stub

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class UpdateAndDeleteSupplierPanel extends JPanel{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdateAndDeleteSupplierPanel() {
// TODO Auto-generated constructor stub

Expand Down Expand Up @@ -150,9 +150,7 @@ public void actionPerformed(ActionEvent e) {
ps.setObject(5, bank);
ps.setObject(6, wechat_Field.getText());
ps.setObject(7, sid);
System.out.println(sid);
int n = ps.executeUpdate();
System.out.println(n);
if(n > 0){
JOptionPane.showMessageDialog(null, "修改成功");
Supplier.removeItem(Supplier.getSelectedItem());
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/fourth/QueryClassify.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -234,7 +234,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/fourth/QueryCustomer.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -237,7 +237,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/fourth/QueryCustomerZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -230,7 +230,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
2 changes: 1 addition & 1 deletion 鑫美ERP管理系统/src/com/fourth/QueryDailyIncome.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public boolean isCellEditable(int row, int column) {
//数据库
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";

Vector<String> header;
final Vector<Vector<String>> dataVector;
Expand Down
1 change: 0 additions & 1 deletion 鑫美ERP管理系统/src/com/fourth/QueryEmpView.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/fourth/QueryInventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -239,7 +239,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
2 changes: 1 addition & 1 deletion 鑫美ERP管理系统/src/com/fourth/QueryPortBelongs.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public boolean isCellEditable(int row, int column) {
//数据库
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";

Vector<String> header;
final Vector<Vector<String>> dataVector;
Expand Down
6 changes: 1 addition & 5 deletions 鑫美ERP管理系统/src/com/fourth/QueryPortInfoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -351,20 +351,16 @@ public QueryPortInfoView() {
e1.printStackTrace();
}

System.out.println(n);
if(n / 15 >= 1){
for (int i = 0; i < 15; i++) {
data.add(dataVector.get(i));
}
System.out.println("q");
}else{
for (int i = 0; i < n % 15; i++) {
data.add(dataVector.get(i));
}
System.out.println("s");
}

System.out.println(data.isEmpty());
DefaultTableModel model = new DefaultTableModel(data,header);
table.setModel(model);

Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/fourth/QuerySupplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public boolean isCellEditable(int row, int column) {
Vector<String> header ;
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
Vector<Vector<String>> dataVector; //存放所有数据
JTextField text; //显示当前页数
Vector<Vector<String>> data; //存放所要显示的每一页的数据
Expand Down Expand Up @@ -260,7 +260,6 @@ public void actionPerformed(ActionEvent e) {
}
text.setText(page + 1 + "");
}
System.out.println(k);
data.removeAllElements();
for (int i = page * 15; i < page * 15 + k; i++) {
data.add(dataVector.get(i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ForgetPasswordView extends JDialog{
//数据库
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";


public ForgetPasswordView() {
Expand Down
3 changes: 2 additions & 1 deletion 鑫美ERP管理系统/src/com/main/UpdatePasswordView.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.view.LogInView;
import com.view.MainView;
import com.view.MainView1;

/**
*
Expand Down Expand Up @@ -44,7 +45,7 @@ public class UpdatePasswordView extends JDialog{
//数据库
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public UpdatePasswordView(final String username,final MainView main) {
// TODO Auto-generated constructor stub
this.setTitle("修改密码");
Expand Down
3 changes: 1 addition & 2 deletions 鑫美ERP管理系统/src/com/second/AddInventoryDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class AddInventoryDialog extends JDialog {
private JButton button = new JButton("添加");
private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
int number1 = 0;
public AddInventoryDialog() {
// TODO Auto-generated constructor stub
Expand Down Expand Up @@ -66,7 +66,6 @@ public AddInventoryDialog() {
e1.printStackTrace();
}

System.out.println(number1);
button.addActionListener(new ActionListener() {

@Override
Expand Down
4 changes: 1 addition & 3 deletions 鑫美ERP管理系统/src/com/second/AddPortDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class AddPortDialog extends JDialog{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddPortDialog(PurchaseManage addPurchasePanel, final JTable table, final Vector<String> header) {
// TODO Auto-generated constructor stub
this.setTitle("添加进货花盆");
Expand Down Expand Up @@ -222,8 +222,6 @@ public void actionPerformed(ActionEvent e) {
vector.add(portCount);
vector.add(portPrice);
vector.add(portMaking);
System.out.println(portId);
System.out.println(vector.get(0));
PurchaseManage.dataVector.add(vector);
DefaultTableModel tableModel = new DefaultTableModel(PurchaseManage.dataVector,header);
table.setModel(tableModel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class AddPurchaseDialog extends JDialog{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddPurchaseDialog(final QueryPurchase query) {
// TODO Auto-generated constructor stub
this.setTitle("添加采购");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class AddVenditionDialog extends JDialog{

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";
public AddVenditionDialog(final QueryVendition query) {
// TODO Auto-generated constructor stub
this.setTitle("添加销售");
Expand Down
10 changes: 4 additions & 6 deletions 鑫美ERP管理系统/src/com/second/PurchaseManage.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class PurchaseManage extends JPanel {

private String url = "jdbc:mysql://localhost:3306/erp";
private String user = "root";
private String password = "yourpassword";
private String password = "1018222wxw";


private JLabel supplierName_Label = new JLabel("供应商名称");
Expand Down Expand Up @@ -74,9 +74,9 @@ public PurchaseManage() {
time_Label.setBounds(580, 30, 80, 35);
time_Field.setBounds(680, 30, 120, 35);
scrollpane.setBounds(65, 90, 760, 500);
add.setBounds(400, 610, 100, 20);
addInventory.setBounds(550, 610, 100, 20);
deleButton.setBounds(250, 610, 100, 20);
add.setBounds(400, 610, 100, 35);
addInventory.setBounds(550, 610, 100, 35);
deleButton.setBounds(250, 610, 100, 35);
final Vector<String> header = new Vector<String>();
header.add("花盆编号");
header.add("花盆种类");
Expand Down Expand Up @@ -150,11 +150,9 @@ public void actionPerformed(ActionEvent e) {
for(int i = 0; i < count; i++){
ps.setObject(1, (Integer)table.getValueAt(i, 3) + number[i]);
ps.setObject(2, table.getValueAt(i, 0));
System.out.println("添加批处理语句" + (i + 1) + "条语句");
ps.addBatch();
}
ps.executeBatch();
System.out.println("sssssss");
conn.commit();
}catch(Exception e1){
try {
Expand Down
Loading

0 comments on commit aa58709

Please sign in to comment.