-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog.cpp
50 lines (40 loc) · 958 Bytes
/
dialog.cpp
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
50
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
}
Dialog::~Dialog()
{
delete ui;
}
void Dialog::on_AnnpB_clicked()
{
this->close();
}
void Dialog::on_ValpB_clicked()
{
QString num = ui->NumLE->text();
QSqlQuery qry;
QString str="select * from LigneCommandeFou where id_commande='"+num+"'";
qDebug()<<str;
int qt;
QString ref_prod_command;
if(qry.exec(str))
{
while(qry.next())
{
qt=qry.value(3).toInt();
ref_prod_command=qry.value(2).toString();
}
if(pro.valider_achat(ref_prod_command,qt))
{ QMessageBox ::information(0, qApp->tr("Commande"),
qApp->tr("Commande valide"), QMessageBox::Ok);
}
}
else
QMessageBox ::information(0, qApp->tr("Commande"),
qApp->tr("Commande n'st pas valide"), QMessageBox::Ok);
}