📄 guestregister.java
字号:
package GuestManagement;
import java.awt.BorderLayout;
import hotelinformationmanagesystem.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JCheckBox;
import javax.swing.JRadioButton;
import javax.swing.JTextArea;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.ButtonGroup;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.DriverManager;
import javax.swing.JOptionPane;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.text.*;
/**
* <p>Title: 酒店信息管理系统</p>
*
* <p>Description: HotelInformationManageSystem</p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: JSP</p>
*
* @author 江世澎
* @version 1.0
*/
public class GuestRegister extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JPanel jPAccountChange = new JPanel();
XYLayout xYLayout2 = new XYLayout();
JPanel jPGuestInfo = new JPanel();
XYLayout xYLayout3 = new XYLayout();
JLabel jLName = new JLabel();
JTextField jTFName = new JTextField();
JLabel jLPaperType = new JLabel();
JComboBox jCBPaperType = new JComboBox();
JLabel jLPaperNo = new JLabel();
JTextField jTFPaperNo = new JTextField();
JLabel jLGuestRegID = new JLabel();
JTextField jTFGuestRegID = new JTextField();
JLabel jLCounty = new JLabel();
JLabel jLCompany = new JLabel();
JTextField jTFCompany = new JTextField();
JTextField jTFCounty = new JTextField();
JRadioButton jRBGuestDestine = new JRadioButton();
JRadioButton jRBGroupDestine = new JRadioButton();
JRadioButton jRBGuestRegist = new JRadioButton();
JPanel jPGuestInfo05 = new JPanel();
XYLayout xYLayout4 = new XYLayout();
JLabel jLabel8 = new JLabel();
JTextField jTextField7 = new JTextField();
JLabel jLCheckInDate = new JLabel();
JTextField jTFCheckInDate = new JTextField();
JLabel jLCheckInDay = new JLabel();
JTextField jTFPersonMon = new JTextField();
JLabel jLCHOReason = new JLabel();
JLabel jLRoomMon = new JLabel();
JTextField jTFRoomMon = new JTextField();
JPanel jPEdit = new JPanel();
XYLayout xYLayout7 = new XYLayout();
JButton jBEdit = new JButton();
JPanel jPDelete = new JPanel();
XYLayout xYLayout8 = new XYLayout();
JButton jBFSetRoomMon = new JButton();
JPanel jPGuestInfo04 = new JPanel();
XYLayout xYLayout9 = new XYLayout();
JLabel jLPersonMon = new JLabel();
JTextField jTFCheckInDay = new JTextField();
JPanel jPjBNewBuild = new JPanel();
XYLayout xYLayout10 = new XYLayout();
JButton jBNewBuild = new JButton();
JPanel jPQueryRoomInfo = new JPanel();
XYLayout xYLayout11 = new XYLayout();
JButton jBQueryRoomInfo = new JButton();
JPanel jPQueryFreeRoom = new JPanel();
XYLayout xYLayout12 = new XYLayout();
JButton jBQueryFreeRoom = new JButton();
JLabel jLRegPhone = new JLabel();
JTextField jTFRegPhone = new JTextField();
JScrollPane jSPCHOReason = new JScrollPane();
JTextArea jTACHOReason = new JTextArea();
JButton jBGuestRegID = new JButton();
ButtonGroup buttonGroup1 = new ButtonGroup();
JPanel jPanel13 = new JPanel();
XYLayout xYLayout14 = new XYLayout();
JPanel jPGuestInfo01 = new JPanel();
XYLayout xYLayout15 = new XYLayout();
JPanel jPGuestInfo03 = new JPanel();
XYLayout xYLayout16 = new XYLayout();
JRadioButton jRBGroupRegist = new JRadioButton();
JPanel jPGuestInfo02 = new JPanel();
XYLayout xYLayout6 = new XYLayout();
JLabel jLaWillCheckDate = new JLabel();
JTextField jTFWillCheckDate = new JTextField();
JButton jBNewBuildFinish = new JButton();
JButton jBEditFinish = new JButton();
JButton jBDelete = new JButton();
JPanel jPQuit = new JPanel();
JButton jBQuit = new JButton();
XYLayout xYLayout5 = new XYLayout();
JPanel jPChickIn = new JPanel();
XYLayout xYLayout17 = new XYLayout();
JButton jBChickIn = new JButton();
JPanel jPEmpIDQuery = new JPanel();
XYLayout xYLayout13 = new XYLayout();
JLabel jLEmpIDQuery = new JLabel();
JTextField jTFEmpIDQuery = new JTextField();
JButton jBEmpIDQuery = new JButton();
//------------------------------------------------------
DataConnect connect1;
DataConnect connect2;
DataConnect connect3;
DataConnect connect4;
ResultSet rs1l = null;
//-------------------------------------------------------
hotelinformationmanagesystem.JudgeValidity judgeval = new JudgeValidity();
public static String RoomMon = ""; //房间数
public static String RegisterID = ""; //客户登录号
public static String strStartDate = ""; //开始日期
public static String strEndDate = ""; //结束日期
String strLiveIn = ""; //入住
String strRegiType = null; //客人类型“客人还是团体”
String strCheckINType = null; //客人入住形式“预定还是现入”
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar calen = Calendar.getInstance();
Date date = new Date();
public GuestRegister() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(xYLayout1);
this.setResizable(false);
this.setTitle("客人登录界面");
this.setSize(460, 390);
jPAccountChange.setBorder(BorderFactory.createEtchedBorder());
jPAccountChange.setLayout(xYLayout2);
jLName.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLName.setText("姓 名");
jPGuestInfo.setBorder(BorderFactory.createEtchedBorder());
jPGuestInfo.setLayout(xYLayout3);
jLPaperType.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLPaperType.setText("证件类型");
jLPaperNo.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLPaperNo.setText("证件号码");
jLGuestRegID.setFont(new java.awt.Font("宋体", Font.BOLD, 12));
jLGuestRegID.setText("客人登记号");
jLCounty.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCounty.setText("国 家");
jLCompany.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCompany.setText("单 位");
jRBGuestDestine.setText("客户预定");
jRBGroupDestine.setText("团体预定");
jRBGuestRegist.setText("客户登记");
jPGuestInfo05.setBorder(BorderFactory.createEtchedBorder());
jPGuestInfo05.setLayout(xYLayout4);
xYLayout1.setWidth(455);
xYLayout1.setHeight(360);
jLabel8.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLabel8.setText("押 金");
jLCheckInDate.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCheckInDate.setText("入住日期");
jLCheckInDay.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCheckInDay.setText("入住天数");
jLCHOReason.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLCHOReason.setText("入住原因");
jLRoomMon.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLRoomMon.setText("订房数");
jPEdit.setBorder(BorderFactory.createEtchedBorder());
jPEdit.setLayout(xYLayout7);
jBEdit.setEnabled(false);
jBEdit.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
jBEdit.setText("修改");
jBEdit.addActionListener(new GuestRegister_jBEdit_actionAdapter(this));
jPDelete.setBorder(BorderFactory.createEtchedBorder());
jPDelete.setLayout(xYLayout8);
jBFSetRoomMon.setEnabled(false);
jBFSetRoomMon.setFont(new java.awt.Font("宋体", Font.PLAIN, 8));
jBFSetRoomMon.setText("设置");
jBFSetRoomMon.addActionListener(new
GuestRegister_jBFSetRoomMon_actionAdapter(this));
jPGuestInfo04.setLayout(xYLayout9);
jPGuestInfo04.setBorder(BorderFactory.createEtchedBorder());
jLPersonMon.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLPersonMon.setText("入住人数");
jPjBNewBuild.setBorder(BorderFactory.createEtchedBorder());
jPjBNewBuild.setLayout(xYLayout10);
jBNewBuild.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
jBNewBuild.setText("新单");
jBNewBuild.addActionListener(new GuestRegister_jBNewBuild_actionAdapter(this));
jPQueryRoomInfo.setBorder(BorderFactory.createEtchedBorder());
jPQueryRoomInfo.setLayout(xYLayout11);
jBQueryRoomInfo.setFont(new java.awt.Font("宋体", Font.PLAIN, 10));
jBQueryRoomInfo.setText("查询客房信息");
jBQueryRoomInfo.addActionListener(new
GuestRegister_jBQueryRoomInfo_actionAdapter(this));
jPQueryFreeRoom.setBorder(BorderFactory.createEtchedBorder());
jPQueryFreeRoom.setLayout(xYLayout12);
jBQueryFreeRoom.setFont(new java.awt.Font("宋体", Font.PLAIN, 10));
jBQueryFreeRoom.setText("查看空客房");
jBQueryFreeRoom.addActionListener(new
GuestRegister_jBQueryFreeRoom_actionAdapter(this));
jLRegPhone.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLRegPhone.setText("联系电话");
jBGuestRegID.setEnabled(false);
jBGuestRegID.setFont(new java.awt.Font("宋体", Font.PLAIN, 9));
jBGuestRegID.setToolTipText("");
jBGuestRegID.setText("验证");
jBGuestRegID.addActionListener(new
GuestRegister_jBGuestRegID_actionAdapter(this));
jPanel13.setBorder(BorderFactory.createEtchedBorder());
jPanel13.setLayout(xYLayout14);
jPGuestInfo01.setBorder(BorderFactory.createEtchedBorder());
jPGuestInfo01.setLayout(xYLayout15);
jPGuestInfo03.setBorder(BorderFactory.createEtchedBorder());
jPGuestInfo03.setLayout(xYLayout16);
jRBGroupRegist.setText("团体登记");
jPGuestInfo02.setLayout(xYLayout6);
jPGuestInfo02.setBorder(BorderFactory.createEtchedBorder());
jLaWillCheckDate.setFont(new java.awt.Font("宋体", Font.BOLD, 14));
jLaWillCheckDate.setText("抵店日期");
jBNewBuildFinish.setEnabled(false);
jBNewBuildFinish.setFont(new java.awt.Font("宋体", Font.BOLD, 15));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -