⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clothessquarelistener.java

📁 一个优秀的干洗店管理系统
💻 JAVA
字号:
package control.getClothes;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

import view.dialog.getClothes.ClothesSquareDlg;
import vo.OrderVo;
import dao.common.DbException;
import dao.getClothesDao.GetClothesDao;
import dao.getClothesDao.getClothesDaoImpl.GetClothesDaoImpl;

public class ClothesSquareListener implements ActionListener{
	private ClothesSquareDlg clothesSquareDlg;

	public ClothesSquareListener(ClothesSquareDlg clothesSquareDlg) {
		super();
		this.clothesSquareDlg = clothesSquareDlg;
	}

	public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		if(command.equals("确定")){
			OrderVo orderVo = clothesSquareDlg.getGetClothesPanel().formOrderVo();
			GetClothesDao getClothesDao = new GetClothesDaoImpl();
			try{
				orderVo.setPaidOrNot(true);
				if(getClothesDao.registAnOrder(orderVo)){
					clothesSquareDlg.getGetClothesPanel().clearAllContent();
					clothesSquareDlg.dispose();
				}
			}catch(DbException de){
				JOptionPane.showMessageDialog(null, de.getMessage());
			}
		}else if(command.equals("取消")){
			clothesSquareDlg.dispose();
		}
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -