-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackbook.cpp
More file actions
39 lines (35 loc) · 937 Bytes
/
Copy pathbackbook.cpp
File metadata and controls
39 lines (35 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "backbook.h"
#include "ui_backbook.h"
#include "QMessageBox"
#include "allclass.h"
#include <QApplication>
backbook::backbook(QWidget *parent) :
QDialog(parent),
ui(new Ui::backbook)
{
ui->setupUi(this);
}
backbook::~backbook()
{
delete ui;
}
extern book_shelf library;
extern int temp_c; //为1表示还书成功,0代表书ID不正确
void backbook::on_pushButton_clicked()
{
QString ID = ui->backBook->text();
string backID = ID.toStdString();
library.back_book(backID);
if(temp_c)
{
QMessageBox::warning(this,"提示!",
"还书成功!",
QMessageBox::Yes);
temp_c = 0;
this->close();
}
else
QMessageBox::warning(this,"警告!",
"请检查书ID!",
QMessageBox::Yes);
}