📄 guestsettleaccounts.java
字号:
package GuestManagement;
import java.awt.BorderLayout;
import hotelinformationmanagesystem.*;
import javax.swing.JFrame;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.util.Date;
import java.sql.DriverManager;
import javax.swing.JOptionPane;
import java.sql.SQLException;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import java.awt.Color;
import java.text.SimpleDateFormat;
/**
* <p>Title: 酒店信息管理系统</p>
*
* <p>Description: HotelInformationManageSystem</p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: JSP</p>
*
* @author 江世澎
* @version 1.0
*/
public class GuestSettleAccounts extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JPanel jPGusetInfo = new JPanel();
XYLayout xYLayout2 = new XYLayout();
JLabel jLAccounts = new JLabel();
JLabel jLCompany = new JLabel();
JLabel jLName = new JLabel();
JTextField jTFAccounts = new JTextField();
JTextField jTFName = new JTextField();
JTextField jTFCompany = new JTextField();
JPanel jPAccounts = new JPanel();
XYLayout xYLayout4 = new XYLayout();
JLabel jLRoomName = new JLabel();
JPanel jPDeposit = new JPanel();
JLabel jLDeposit = new JLabel();
JTextField jTFDeposit = new JTextField();
XYLayout xYLayout6 = new XYLayout();
JPanel jPRoomInfo = new JPanel();
JLabel jLRoomNum = new JLabel();
JTextField jTFRoomNum = new JTextField();
XYLayout xYLayout7 = new XYLayout();
JPanel jPCHODay = new JPanel();
XYLayout xYLayout8 = new XYLayout();
JLabel jLCHODay = new JLabel();
JTextField jTFCHODay = new JTextField();
JPanel jPSum = new JPanel();
XYLayout xYLayout9 = new XYLayout();
JLabel jLSum = new JLabel();
JButton jBSettlement = new JButton();
JPanel jPCommand = new JPanel();
XYLayout xYLayout10 = new XYLayout();
JButton jBQuit = new JButton();
JPanel jPReceive = new JPanel();
XYLayout xYLayout11 = new XYLayout();
JLabel jLReceive = new JLabel();
JTextField jTFReceive = new JTextField();
JButton jBQueryAccounts = new JButton();
JPanel jPSettlesAccounts = new JPanel();
XYLayout xYLayout5 = new XYLayout();
JRadioButton jRBGuestSettleAccounts = new JRadioButton();
JRadioButton jRBGroupSettleAccounts = new JRadioButton();
ButtonGroup BGGuestSettleAccounts = new ButtonGroup();
JScrollPane jSPRoomaName = new JScrollPane();
JTextArea jTARoomName = new JTextArea();
JButton jBShowRoomInfo = new JButton();
JButton jBAddRoom = new JButton();
JLabel jLSumShow = new JLabel();
JLabel jLYuan = new JLabel();
JButton jBReSet = new JButton();
hotelinformationmanagesystem.JudgeValidity judgeval = new JudgeValidity();
DataConnect connect1;
DataConnect connect2;
DataConnect connect3;
DataConnect connect4;
ResultSet rs1l = null;
float flSum = 0;
public static String strID = "";
Date daCheckInDate;
SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
Date date = new Date();
String strFlag = "";
float flGiveyou;
public GuestSettleAccounts() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(xYLayout1);
this.setResizable(false);
this.setTitle("客户结账界面");
xYLayout1.setWidth(445);
xYLayout1.setHeight(303);
this.setSize(450, 335); //宽,高
SetFormCenter wcenter = new SetFormCenter();
wcenter.setcenter(this);
jPGusetInfo.setBorder(BorderFactory.createEtchedBorder());
jPGusetInfo.setLayout(xYLayout2);
jLAccounts.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLAccounts.setText("账单编号");
jLCompany.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCompany.setText("单 位");
jLName.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLName.setText("姓 名");
jPAccounts.setBorder(BorderFactory.createEtchedBorder());
jPAccounts.setLayout(xYLayout4);
jLRoomName.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLRoomName.setText("房间名");
jPDeposit.setBorder(BorderFactory.createEtchedBorder());
jPDeposit.setLayout(xYLayout6);
jLDeposit.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLDeposit.setText("押 金");
jPRoomInfo.setBorder(BorderFactory.createEtchedBorder());
jPRoomInfo.setLayout(xYLayout7);
jLRoomNum.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLRoomNum.setText("客房数");
jPCHODay.setLayout(xYLayout8);
jPCHODay.setBorder(BorderFactory.createEtchedBorder());
jLCHODay.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCHODay.setText("入住天数");
jPSum.setBorder(BorderFactory.createEtchedBorder());
jPSum.setLayout(xYLayout9);
jLSum.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jLSum.setText("金 额");
jBSettlement.setEnabled(false);
jBSettlement.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jBSettlement.setText("结算");
jBSettlement.addActionListener(new
GuestSettleAccounts_jBSettlement_actionAdapter(this));
jPCommand.setBorder(BorderFactory.createEtchedBorder());
jPCommand.setLayout(xYLayout10);
jBQuit.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jBQuit.setText("取消");
jBQuit.addActionListener(new GuestSettleAccounts_jBQuit_actionAdapter(this));
jPReceive.setBorder(BorderFactory.createEtchedBorder());
jPReceive.setLayout(xYLayout11);
jLReceive.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jLReceive.setText("收 取");
jTFReceive.setEnabled(false);
jTFReceive.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jBQueryAccounts.setToolTipText("");
jBQueryAccounts.setText("查找");
jBQueryAccounts.addActionListener(new
GuestSettleAccounts_jBQueryAccounts_actionAdapter(this));
jPSettlesAccounts.setLayout(xYLayout5);
jPSettlesAccounts.setBorder(BorderFactory.createEtchedBorder());
jRBGuestSettleAccounts.setText("客户结账");
jRBGroupSettleAccounts.setText("团体结账");
jTFName.setEnabled(false);
jTFCompany.setEnabled(false);
jTFRoomNum.setEnabled(false);
jTFCHODay.setEnabled(false);
jTFDeposit.setEnabled(false);
jBShowRoomInfo.setEnabled(false);
jBShowRoomInfo.setFont(new java.awt.Font("宋体", Font.PLAIN, 10));
jBShowRoomInfo.setText("显示详细信息");
jBShowRoomInfo.addActionListener(new
GuestSettleAccounts_jBShowRoomInfo_actionAdapter(this));
jTARoomName.setEnabled(false);
jBAddRoom.setEnabled(false);
jBAddRoom.setText("核算");
jBAddRoom.addActionListener(new
GuestSettleAccounts_jBAddRoom_actionAdapter(this));
jLSumShow.setFont(new java.awt.Font("宋体", Font.BOLD, 18));
jLSumShow.setForeground(Color.orange);
jLYuan.setFont(new java.awt.Font("宋体", Font.BOLD, 18));
jLYuan.setText("元");
jBReSet.setEnabled(false);
jBReSet.setFont(new java.awt.Font("宋体", Font.BOLD, 16));
jBReSet.setText("重置");
jBReSet.addActionListener(new GuestSettleAccounts_jBReSet_actionAdapter(this));
jPSum.add(jLSum, new XYConstraints(9, 9, -1, -1));
this.getContentPane().add(jPAccounts, new XYConstraints(197, 2, 244, 32));
jPCommand.add(jBSettlement, new XYConstraints(22, 4, 104, 35));
jPCommand.add(jBQuit, new XYConstraints(308, 3, 104, 35));
jPCommand.add(jBReSet, new XYConstraints(169, 4, 104, 35));
jPReceive.add(jLReceive, new XYConstraints(9, 9, -1, -1));
jPReceive.add(jTFReceive, new XYConstraints(72, 2, 357, 31));
jPDeposit.add(jLDeposit, new XYConstraints(2, 6, -1, -1));
jPRoomInfo.add(jLRoomNum, new XYConstraints(9, 6, -1, -1));
jPRoomInfo.add(jLRoomName, new XYConstraints(9, 34, -1, -1));
jPCHODay.add(jLCHODay, new XYConstraints(9, 6, -1, -1));
jPGusetInfo.add(jLName, new XYConstraints(9, 7, -1, -1));
this.getContentPane().add(jPGusetInfo, new XYConstraints(4, 35, 437, 33));
this.getContentPane().add(jPCHODay, new XYConstraints(4, 134, 218, 33));
this.getContentPane().add(jPCommand, new XYConstraints(4, 254, 437, 45));
this.getContentPane().add(jPReceive, new XYConstraints(4, 211, 437, 41));
this.getContentPane().add(jPDeposit,
new XYConstraints(223, 134, 218, 33));
this.getContentPane().add(jPSum, new XYConstraints(4, 167, 437, 41));
jPAccounts.add(jLAccounts, new XYConstraints(9, 5, -1, -1));
jPAccounts.add(jTFAccounts, new XYConstraints(81, 3, 86, -1));
jPAccounts.add(jBQueryAccounts, new XYConstraints(174, 3, 63, 20));
this.getContentPane().add(jPSettlesAccounts,
new XYConstraints(4, 2, 192, 32));
jPSettlesAccounts.add(jRBGuestSettleAccounts,
new XYConstraints(7, 1, -1, -1));
jPSettlesAccounts.add(jRBGroupSettleAccounts,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -