-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNhanVien.cpp
175 lines (149 loc) · 4.23 KB
/
NhanVien.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#include "NhanVien.h"
#include<iomanip>
NhanVien::NhanVien(string MaNhanVien, string HoTen, string NgaySinh, string QueQuan, string SoDienThoai, string SoCMT, string ChucVu, string PhanQuyen, string TaiKhoan, string MatKhau){
this->MaNhanVien = MaNhanVien;
this->HoTen = HoTen;
this->NgaySinh = NgaySinh;
this->QueQuan = QueQuan;
this->SoDienThoai = SoDienThoai;
this->SoCMT = SoCMT;
this->ChucVu = ChucVu;
this->PhanQuyen = PhanQuyen;
this->TaiKhoan = TaiKhoan;
this->MatKhau = MatKhau;
}
NhanVien::~NhanVien(){
}
string NhanVien::getMaNV(){
return this->MaNhanVien;
}
string NhanVien::getHoTen(){
return this->HoTen;
}
string NhanVien::getNgaySinh(){
return this->NgaySinh;
}
string NhanVien::getQueQuan(){
return this->QueQuan;
}
string NhanVien::getSDT(){
return this->SoDienThoai;
}
string NhanVien::getSoCMT(){
return this->SoCMT;
}
string NhanVien::getChucVu(){
return this->ChucVu;
}
string NhanVien::getPhanQuyen(){
return this->PhanQuyen;
}
string NhanVien::getTaiKhoan(){
return this->TaiKhoan;
}
string NhanVien::getMatKhau(){
return this->MatKhau;
}
// ham set
void NhanVien::setMaNV(string MaNhanVien){
this->MaNhanVien = MaNhanVien;
}
void NhanVien::setHoTen(string HoTen){
this->HoTen = HoTen;
}
void NhanVien::setNgaySinh(string NgaySinh){
this->NgaySinh = NgaySinh;
}
void NhanVien::setQueQuan(string QueQuan){
this->QueQuan = QueQuan;
}
void NhanVien::setSDT(string SoDienThoai){
this->SoDienThoai = SoDienThoai;
}
void NhanVien::setSoCMT(string SoCMT){
this->SoCMT = SoCMT;
}
void NhanVien::setChucVu(string ChucVu){
this->ChucVu = ChucVu;
}
void NhanVien::setPhanQuyen(string PhanQuyen){
this->PhanQuyen = PhanQuyen;
}
void NhanVien::setTaiKhoan(string TaiKhoan){
this->TaiKhoan = TaiKhoan;
}
void NhanVien::setMatKhau(string MatKhau){
this->MatKhau = MatKhau;
}
void NhanVien::Display(){
cout <<char(179)<< setw(15-1) << left<< this->MaNhanVien <<char(179);
cout << setw(30-1) << left << this->HoTen <<char(179);
cout << setw(15-1) << left << this->SoDienThoai <<char(179);
cout << setw(15-1) << left << this->SoCMT <<char(179);
cout << setw(35-1) << left << this->ChucVu <<char(179)<< endl;
}
void NhanVien::Display2(){
SetColor(0,3);
cout << "Ma Nhan Vien: "<< this->MaNhanVien << endl;
cout << "Ho Ten: " << this->HoTen << endl;
cout << "Ngay Sinh: " << this->NgaySinh << endl;
cout << "Que Quan: " << this->QueQuan << endl;
cout << "SDT: " << this->SoDienThoai << endl;
cout << "CMND: " << this->SoCMT << endl;
cout << "Chuc Vu: " << this->ChucVu << endl;
cout << "Phan Quyen: " << this->PhanQuyen << endl;
cout << "Tai Khoan: " << this->TaiKhoan << endl;
cout << "Mat Khau: " << this->MatKhau << endl;
cout << "\n\n Nhan Phim Bat Ki De Tro Ve";
getch();
}
// Da Nang Hoa
istream& operator>>(istream& i, NhanVien& e){
system("cls");
SetColor(0,3);
cout << "Nhap Ten Moi: ";
fflush(stdin);
SetColor(0,7);
getline(i,e.HoTen);
SetColor(0,3);
cout << "Nhap Ngay Sinh: ";
fflush(stdin);
SetColor(0,7);
getline(i,e.NgaySinh);
SetColor(0,3);
cout << "Nhap Que Quan: ";
fflush(stdin);
SetColor(0,7);
getline(i,e.QueQuan);
SetColor(0,3);
cout << "Nhap SDT: ";
fflush(stdin);
SetColor(0,7);
getline(i,e.SoDienThoai);
SetColor(0,3);
cout << "Nhap CMND :";
fflush(stdin);
SetColor(0,7);
getline(i,e.SoCMT);
SetColor(0,3);
cout << "Nhap Chuc Vu :";
fflush(stdin);
SetColor(0,7);
getline(i,e.ChucVu);
SetColor(0,3);
cout << "Nhap Phan Quyen: ";
fflush(stdin);
SetColor(0,7);
getline(i,e.PhanQuyen);
SetColor(0,3);
cout << "Nhap Tai Khoan :";
fflush(stdin);
SetColor(0,7);
getline(i,e.TaiKhoan);
SetColor(0,3);
cout << "Nhap Mat Khau ";
fflush(stdin);
SetColor(0,7);
getline(i,e.MatKhau);
return i;
}