资源简介

这个是新版的北邮银行大作业,费时三天帮别人写好了。验收优秀,分数90+,大家可以在上面贴图加一些装饰,就会在界面上更漂亮,之前着急就没加装饰

资源截图

代码片段和文件信息

#include “configuration.h“
#include “ui_configuration.h“
#include 
#include 
#include 
#include se>
#include 
#include 
#include 

configuration::configuration(QWidget *parent) :
    QDialog(parent)
    ui(new Ui::configuration)
{
    ui->setupUi(this);
    QSqlQuery query;
    query.exec(“SELECT * FROM configuration“);
    query.next();
    ui->lineEdit_1_MaxSeqLen->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_2_MinSec->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_3_MaxSec->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_4_MinRestSec->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_5_MaxRestSec->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_6_VIPSERVLen->setText(query.value(1).toString());
    query.next();
    ui->lineEdit_7_WorkTime->setText(query.value(1).toString());
}

configuration::~configuration()
{
    delete ui;
}

void configuration::on_save_clicked()
{
    QSqlQuery query;
    query.exec(“SELECT * FROM configuration“);
    query.next();
    query.value(1).setValue(ui->lineEdit_1_MaxSeqLen->text().toInt());
    //判空
    qDebug()<< query.lastQuery()<    if ((ui->lineEdit_1_MaxSeqLen->text()==““)||
        (ui->lineEdit_2_MinSec->text()==““)||
        (ui->lineEdit_3_MaxSec->text()==““)||
        (ui->lineEdit_4_MinRestSec->text()==““)||
        (ui->lineEdit_5_MaxRestSec->text()==““)||
        (ui->lineEdit_6_VIPSERVLen->text()==““)||
        (ui->lineEdit_7_WorkTime->text()==““))
    {
        QMessageBox::critical(thistr(“(づ ̄3 ̄)づ╭❤~“)tr(“各输入框求不空T^T...“)QMessageBox::Ok);
        return;
    }
    else//写入,未判断框内是否是纯数字,健壮性待改
    {
        query.prepare(“UPDATE configuration SET value = :value WHERE item = :item“);
        query.bindValue(“:value“ ui->lineEdit_1_MaxSeqLen->text().toInt());
        query.bindValue(“:item““MaxSeqLen“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_2_MinSec->text().toInt());
        query.bindValue(“:item““MinSec“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_3_MaxSec->text().toInt());
        query.bindValue(“:item““MaxSec“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_4_MinRestSec->text().toInt());
        query.bindValue(“:item““MinRestSec“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_5_MaxRestSec->text().toInt());
        query.bindValue(“:item““MaxRestSec“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_6_VIPSERVLen->text().toInt());
        query.bindValue(“:item““VIPSERVLen“);
        query.exec();
        query.bindValue(“:value“ ui->lineEdit_7_WorkTime->text().toInt());
        query.bindValue(“:item““WorkTime“);
        query.exec();
        QMessageBox::information(th

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-08-29 11:22  bank\
     文件       37888  2015-07-03 20:23  bank\2015年导论课程设计-模拟银行营业厅排队系统问题描述.doc
     文件         698  2015-07-05 17:19  bank\bank.pro
     文件       18415  2015-08-29 11:22  bank\bank.pro.user
     文件        3175  2015-07-04 18:20  bank\configuration.cpp
     文件         376  2015-07-04 16:52  bank\configuration.h
     文件        4451  2015-07-04 16:52  bank\configuration.ui
     文件        2012  2015-07-06 16:37  bank\datastructure.cpp
     文件        1484  2015-07-06 16:37  bank\datastructure.h
     文件        1038  2015-07-04 16:11  bank\main.cpp
     文件       38077  2015-07-06 16:37  bank\mainwindow.cpp
     文件        1455  2015-07-06 15:34  bank\mainwindow.h
     文件       16528  2015-07-04 21:24  bank\mainwindow.ui
     文件        1232  2015-07-05 18:03  bank\satisfy.cpp
     文件         281  2015-07-05 17:19  bank\satisfy.h
     文件        1812  2015-07-05 17:46  bank\satisfy.ui
     文件        1855  2015-07-06 14:41  bank\vip_identify.cpp
     文件         374  2015-07-05 16:25  bank\vip_identify.h
     文件        1716  2015-07-05 16:25  bank\vip_identify.ui
     文件        1733  2015-07-05 15:40  bank\vip_regist.cpp
     文件         358  2015-07-05 05:46  bank\vip_regist.h
     文件        2225  2015-07-05 05:46  bank\vip_regist.ui
     目录           0  2015-07-06 16:24  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\
     文件        3072  2015-07-06 16:24  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\database.db
     目录           0  2015-07-06 16:59  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\
     文件     2866206  2015-07-06 16:59  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\bank.exe
     文件      365098  2015-07-04 18:29  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\configuration.o
     文件      124256  2015-07-06 16:37  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\datastructure.o
     文件      353179  2015-07-06 16:37  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\main.o
     文件      458747  2015-07-06 16:37  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\mainwindow.o
     文件        3481  2015-07-04 16:53  build-bank-Desktop_Qt_5_4_0_MinGW_32bit-Debug\debug\moc_configuration.cpp
............此处省略23个文件信息

评论

共有 条评论