-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathidofchangeclient.cpp
More file actions
49 lines (44 loc) · 1.11 KB
/
Copy pathidofchangeclient.cpp
File metadata and controls
49 lines (44 loc) · 1.11 KB
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
40
41
42
43
44
45
46
47
48
49
#include "idofchangeclient.h"
#include "ui_idofchangeclient.h"
#include "allclass.h"
#include "changeclient.h"
#include <QMessageBox>
idofchangeclient::idofchangeclient(QWidget *parent) :
QDialog(parent),
ui(new Ui::idofchangeclient)
{
ui->setupUi(this);
}
idofchangeclient::~idofchangeclient()
{
delete ui;
}
bool isClient1(QString clientid);
extern book_shelf library;
string id;
void idofchangeclient::on_pushButton_clicked()
{
QString idofclient = ui->idofClient->text();
id = idofclient.toStdString();
if(!isClient1(idofclient))
QMessageBox::warning(this,"警告!",
"该用户不存在!",
QMessageBox::Yes);
else
{
changeclient *changecli = new changeclient();
changecli->setModal(true);
changecli->show();
this->close();
}
}
bool isClient1(QString clientid)
{
for(int i=0; i< library.suclient.size();++i)
{
QString q1 = QString::fromStdString(library.suclient[i].clid);
if(!QString::compare(clientid,q1))
return true;
}
return false;
}