final release

master
HOJI 2 years ago
parent 06700dff52
commit bdaeb06d87

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 9.0.2, 2023-09-12T00:30:34. -->
<!-- Written by QtCreator 9.0.2, 2023-09-12T00:58:33. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -243,7 +243,6 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">F:/git/Hotel_Management/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -7,6 +7,14 @@ add_administration::add_administration(QWidget *parent) :
ui(new Ui::add_administration)
{
ui->setupUi(this);
QIcon logo(":/image/icon/logo.png");
this->setWindowIcon(logo);
this->setWindowTitle("提示");
this->setFixedSize(400,300);
bg = new QLabel(this);
bg->setScaledContents(true);
bg->setPixmap(QPixmap(":/image/bg/add.jpg"));
bg->lower();
}
@ -15,14 +23,20 @@ add_administration::~add_administration()
delete ui;
}
void add_administration::paintEvent(QPaintEvent*)
{
bg->resize(ui->widget->size());
}
void add_administration::on_pushButton_clicked()
{
administration *ad = new administration;
//administration *ad = new administration;
QSqlQuery query((db));
query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);");
query.bindValue(":n",ui->lineEdit->text());
query.exec();
QMessageBox::information(this,tr("提示"),("添加成功,请刷新"));
query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);");
query.bindValue(":n",ui->lineEdit->text());
query.exec();
QMessageBox::information(this,tr("提示"),("添加成功,请刷新"));
this->hide();
}

@ -4,6 +4,7 @@
#include <QDialog>
#include <qsqldatabase.h>
#include <administration.h>
#include <QLabel>
namespace Ui {
class add_administration;
@ -17,12 +18,16 @@ public:
explicit add_administration(QWidget *parent = nullptr);
~add_administration();
protected:
void paintEvent(QPaintEvent*);
private slots:
void on_pushButton_clicked();
private:
Ui::add_administration *ui;
QSqlDatabase db;
QLabel *bg;
};
#endif // ADD_ADMINISTRATION_H

@ -13,40 +13,62 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QPushButton" name="pushButton">
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>140</x>
<y>240</y>
<width>80</width>
<height>19</height>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>90</x>
<y>90</y>
<width>191</width>
<height>81</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>房间号:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
</layout>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>50</x>
<y>90</y>
<width>301</width>
<height>81</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>房间号:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>150</x>
<y>230</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
</widget>
</widget>
<resources/>

@ -142,7 +142,7 @@ void administration::on_Del_clicked()
QTableWidgetItem *item = ui->AcounTable->currentItem();
QString n = 0;
n = ui->AcounTable->model()->index(item->row(),0).data().toString();
int num = n.toInt();
//int num = n.toInt();
query.prepare("DELETE from customer where account = :num ");
query.bindValue(":num",n);
query.exec();

@ -58,6 +58,9 @@
<pointsize>24</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string>
@ -80,6 +83,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string>
@ -146,6 +152,9 @@ color: rgb(255, 255, 255);</string>
<pointsize>24</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string>
@ -189,6 +198,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string>
@ -211,6 +223,9 @@ border-radius:15px;</string>
<pointsize>24</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(85, 170, 255);
border-radius:15px;</string>

@ -45,6 +45,9 @@
<height>60</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="text">
<string>退</string>
</property>
@ -213,6 +216,9 @@ color: rgb(255, 255, 255);</string>
<pointsize>25</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">image:url(:/image/icon/resetcode.png);
background-color: rgba(0, 0, 0, 0);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

@ -50,31 +50,6 @@ void login::on_btn_info_clicked()
QMessageBox::about(this, tr("关于我们"), tr("《宾馆客房管理系统》\n\n开发团队Cyber Pigeon\n\n产品经理:雷张炜\n界面设计:雷张炜\n美术设计:雷张炜、周海康\n系统测试:余朴\n软件分析:曹坤\n程序总监:雷张炜、周海康\n程序设计:雷张炜、周海康、余朴、曹坤\n\nCopyright© 2023 Cyber Pigeon® All Right Reserved."));
}
void login::on_pushButton_2_clicked()
{
customer *cus = new customer;
this->hide();
cus->show();
}
void login::on_pushButton_3_clicked()
{
receptionist *rec = new receptionist;
this->hide();
rec->show();
}
void login::on_pushButton_4_clicked()
{
administration *admin = new administration;
this->hide();
admin->show();
}
void login::on_btn_login_clicked()
{
bool isfind = false;

@ -27,12 +27,6 @@ protected:
private slots:
void on_btn_info_clicked();
void on_pushButton_2_clicked();
void on_pushButton_3_clicked();
void on_pushButton_4_clicked();
void on_btn_login_clicked();
void on_btn_register_clicked();

@ -86,6 +86,9 @@
<pointsize>16</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">radius:15px;</string>
</property>
@ -188,66 +191,6 @@ background-color: rgba(0, 0, 0, 0);</string>
<string/>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>40</x>
<y>290</y>
<width>501</width>
<height>271</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>50</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>测试用</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>130</x>
<y>570</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>客户</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_3">
<property name="geometry">
<rect>
<x>130</x>
<y>620</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>前台</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_4">
<property name="geometry">
<rect>
<x>130</x>
<y>670</y>
<width>151</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>管理</string>
</property>
</widget>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">

@ -101,6 +101,9 @@
<pointsize>12</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>新建客户</string>
</property>
@ -126,6 +129,9 @@
<pointsize>12</pointsize>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>订房</string>
</property>

@ -1,11 +1,10 @@
<RCC>
<qresource prefix="/image/bg">
<file>login.png</file>
<file>customerbackground.webp</file>
<file>sea.jpg</file>
<file>stone.jpg</file>
<file>register.jpg</file>
<file>order.png</file>
<file>add.jpg</file>
</qresource>
<qresource prefix="/image/icon">
<file>info.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Loading…
Cancel
Save