-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDetailsOfOwner.cpp
More file actions
76 lines (61 loc) · 1.66 KB
/
DetailsOfOwner.cpp
File metadata and controls
76 lines (61 loc) · 1.66 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "DetailsOfOwner.h"
#include "ui_DetailsOfOwner.h"
#include "Global.h"
#include "NewMessageDialogForOwner.h"
using namespace GlobalNameSpace;
DetailsOfOwner::DetailsOfOwner(const unsigned long long keyOfOwner, QWidget *parent) :
QDialog(parent),
ui(new Ui::DetailsOfOwner)
{
ui->setupUi(this);
this->keyOfOwner = keyOfOwner;
TNodeUser<Dealer> * temp = &Globals::DEALER_LIST.getByKey(this->keyOfOwner);
Dealer adm = temp->getData();
ui->led_name->setText(adm.getName());
ui->led_lastname->setText(adm.getLastName());
///ui->led_email->setText(adm.getEmail());
ui->led_postcode->setText(adm.getPostCode());
ui->led_companyname->setText(adm.getComponyName());
ui->userNameL->setText(adm.getUserName());
ui->led_mobilenumber->setText(adm.getMobileNumber());
ui->led_last_enter->setText(adm.getDateOfLastEnter());
ui->led_city->setText(adm.getCity());
ui->cmb_state->setText(adm.getState());
}
DetailsOfOwner::~DetailsOfOwner()
{
delete ui;
}
void DetailsOfOwner::setBack(DetailOfAllProducts *back)
{
this->back_details = back;
return;
}
void DetailsOfOwner::setBackFavorite(DetailOfFavoriteProducts *back)
{
this->back_favorite = back;
return;
}
void DetailsOfOwner::setInt(int a)
{
this->back = a;
return;
}
void DetailsOfOwner::on_btn_ok_clicked()
{
if(back == 2)
{
this->back_favorite->show();
this->hide();
}
else
{
this->back_details->show();
this->hide();
}
}
void DetailsOfOwner::on_chatB_clicked()
{
NewMessageDialogForOwner* d = new NewMessageDialogForOwner(keyOfOwner , this);
d->show(); // Restore from systray
}