package com.GUI.salesman;
import com.GUI.OperationUI;
import com.GUI.university.ChangeInformationPanel;
import com.main.Client;
import com.util.ResultSetTableModel;
import com.util.SqlControler;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
public class SalesmanUI extends OperationUI {
private ProcessingOrderPanel processingOrderPanel = new ProcessingOrderPanel();
private NewOrderPanel newOrderPanel = new NewOrderPanel();
private ConfirmationPanel confirmationPanel = new ConfirmationPanel();
private ChangeInformationPanel changeInformationPanel = new ChangeInformationPanel();
private JFrame frame = new JFrame("业务员界面");
public SalesmanUI() {
//查询订单界面功能实现
processingOrderPanel.setButtonListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String userID = processingOrderPanel.getUserID();
String searchText = processingOrderPanel.getSearchText();
if (userID.equals("") && searchText.equals("")) {
try {
refreshProcessingOrder();
} catch (SQLException e1) {
e1.printStackTrace();
}
} else {
try {
searchProcessingOrder();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
});
//新建订单功能实现
newOrderPanel.setButtonListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
addNewOrder();
refreshGoodList();
refreshProcessingOrder();
refreshSubmittedOrderList();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
});
//确认订单功能实现
confirmationPanel.setSearchButtonListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
searchSubmittedOrder();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
});
confirmationPanel.setConfirmButtonListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
confirmSubmittedOrder();
refreshSubmittedOrderList();
refreshProcessingOrder();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
});
//个人信息修改功能实现
changeInformationPanel.setChangeInformationButtonListener();
changeInformationPanel.setChangePasswordButtonListener();
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.add("进行中的订单", processingOrderPanel);
tabbedPane.add("新建订单", newOrderPanel);
tabbedPane.add("确认订单", confirmationPanel);
tabbedPane.add("个人信息修改", changeInformationPanel);
frame.add(tabbedPane);
frame.pack();
}
//
//
// private static PreparedStatement statement;
// private static ResultSet resultSet;
//
// private static JFrame frame;
// private static JTabbedPane tabbedPane;
// private static JPanel orderPanel;
// private static JPanel newOrderPanel;
// private static ResultSetTableModel resultSetTableModel;
// private static JTable queryTable;
//
// //进行中的订单页面
// private JPanel processingPanel;
// private JPanel searchPanel;
// private JPanel combinePanel;
// private JLabel searchUserNameLabel;
// private static JTextField searchUserNameTextField;
// private JLabel searchGoodLabel;
// private static JTextField searchField;
// private static JScrollPane orderQueryPanel;
//
// private JButton queryButton;
//
// //新建订单页面
// private JPanel submitNewOrderPanel;
// private JPanel submitPanel;
// private JPanel namePanel;
// private JPanel amountPanel;
// private JLabel newOrderUserNameLabel;
// private JLabel goodNameLabel;
// private static JTextField newOrderUserNameTextField;
// private static JTextField goodNameTextField;
// private JLabel amountLabel;
// private static JTextField amountTextField;
// private JButton submitNewOrderButton;
// private static JScrollPane newOrderQueryPanel = new JScrollPane();
// //确认订单
// ConfirmationPanel confirmationPanel = new ConfirmationPanel();
//
// //个人信息修改界面
// ChangeInformationPanel changeInformationPanel = new ChangeInformationPanel();
// @Override
// public void init() {
// frame = new JFrame("员工界面");
// tabbedPane = new JTabbedPane(JTabbedPane.TOP);
// orderPanel = new JPanel();
// newOrderPanel = new JPanel();
//
// //进行中订单标签初始化
// processingPanel = new JPanel();
// searchPanel = new JPanel();
// combinePanel = new JPanel();
// searchUserNameLabel = new JLabel("订单收货人");
// searchUserNameTextField = new JTextField(20);
// searchGoodLabel = new JLabel("订单商品编号或名称:");
// searchField = new JTextField(20);
// queryButton = new JButton("查询");
// orderQueryPanel = new JScrollPane();
//
// //查询按键绑定监听
// queryButton.addActionListener(new ActionListener() {
// @Override
// public void actionPerformed(ActionEvent e) {
// SalesmanUI.searchTable(searchUserNameTextField.getText(), searchField.getText());
// }
// });
//
//
// //给searchPanel设置GridBagLayout
// GridBagLayout gb = new GridBagLayout();
// GridBagConstraints gbc = new GridBagConstraints();
// gbc.fill = GridBagConstraints.NONE;
//
// processingPanel.setLayout(gb);
// combinePanel.setLayout(new BorderLayout());
//// combinePanel.add(searchGoodLabel, BorderLayout.WEST);
//// combinePanel.add(searchField, BorderLayout.CENTER);
//
//
// searchPanel.setLayout(gb);
// gbc.gridwidth = 1;
// gbc.insets = new Insets(20, 20, 0, 20);
// gb.setConstraints(searchUserNameLabel, gbc);
// searchPanel.add(searchUserNameLabel);
// gbc.gridwidth = GridBagConstraints.REMAINDER;
// gb.setConstraints(searchUserNameTextField, gbc);
// searchPanel.add(searchUserNameTextField);
// gbc.gridwidth = 1;
// gb.setConstraints(searchGoodLabel, gbc);
// searchPanel.add(searchGoodLabel);
// gbc.gridwidth = GridBagConstraints.REMAINDER;
// gb.setConstraints(searchField, gbc);
// searchPanel.add(searchField);
// gb.setConstraints(queryButton, gbc);
// searchPanel.add(queryButton);
// combinePanel.add(searchPanel);
//
// gb.setConstraints(combinePanel, gbc);
// processingPanel.add(combinePanel);
//
// JSeparator separator = new JSeparator(JSeparator.HORIZONTAL);
// separator.setPreferredSize(new Dimension(800, 50));
// gbc.insets = new Insets(20, 0, 20, 0);
// gb.setConstraints(separator, gbc);
// processingPanel.add(separator);
//
// orderPanel.setLayout(new BorderLayout());
// orderPanel.add(processingPanel, BorderLayout.CENTER);
// orderPanel.add(orderQueryPanel, BorderLayout.SOUTH);
//
//
// queryTable = new JTable();
// orderQueryPanel = new JScrollPane(queryTable);
// Connection connection = SqlCont
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
![thumb](https://img-home.csdnimg.cn/images/20210720083646.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)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 37 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/e908d3f559a440a89ffab26bc7ee7a71_weixin_38343072.jpg!1)
马coder
- 粉丝: 1211
- 资源: 6602
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的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)