Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

them thuoc tinh nguoi dai dien #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CreateDB.cmd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SQLCMD -S DESKTOP-Q75A6S2 -E -i QuanLyDaiLy.sql
SQLCMD -S DESKTOP-97J7D09 -E -i QuanLyDaiLy.sql
44 changes: 36 additions & 8 deletions QuanLyDaiLy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ create table PHIEUXUAT
TongGiaTri int
)
go

create table NGUOIDAIDIEN
(
MaNguoiDaiDien int identity(1,1) primary key,
MaNguoiDaiDien int primary key,
TenNguoiDaiDien varchar(20),
SoDT int,
CMND varchar(15),
DiaChi varchar(20),
Expand All @@ -56,21 +58,39 @@ create table CHITIETPHIEUXUAT
MaPhieuXuat int,
MaXe int,
SoLuongXuat int,
ThanhTien int
ThanhTien int,
MaPhieuXuat int,
MaXe int,
)
go
go

create table NHANVIEN
(
MaNV int primary key,
HoTen varchar(30),
SoDT int,
CMND varchar(15),
DiaChi varchar(50),
MaCV int,
MaDL int,
)
go
create table CHUCVU
(
MaCV int identity(1,1) primary key,
TenCV varchar(20),
)
go

create table LOAIXE
(
MaXe int primary key,
TenXe varchar(40),
SoLuongTon int,
DonGia int
DonGia int,
)

go


go
create table PHIEUTHUTIEN
(
MaPhieuThu int identity(1,1) primary key,
Expand Down Expand Up @@ -135,6 +155,8 @@ go
insert LOAIDL VALUES ('1','Loai 1', '100000')
insert LOAIDL VALUES ('2','Loai 2', '200000')

insert into NGUOIDAIDIEN values('hieu','0123456789', '301673604', 'tp Ho Chi minh')

go
insert THAMSO VALUES('1','3','4','10','4');
go
Expand All @@ -144,4 +166,10 @@ go

insert into DAILY VALUES(2,'dai ly 3', '123 so 7', '[email protected]','01584389','2018-05-10',1000,2,1,1)

go
go
insert CHUCVU values('giam doc'),
insert CHUCVU values('truong phong')
insert CHUCVU values('Nhan vien')
insert CHUCVU values('tro ly')


Binary file modified QuanLyDaiLy/.vs/QuanLyDaiLy/v15/.suo
Binary file not shown.
Binary file modified QuanLyDaiLy/.vs/QuanLyDaiLy/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified QuanLyDaiLy/.vs/QuanLyDaiLy/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file modified QuanLyDaiLy/.vs/QuanLyDaiLy/v15/Server/sqlite3/storage.ide-wal
Binary file not shown.
30 changes: 30 additions & 0 deletions QuanLyDaiLy/DaiLyDTO/ChucVuDTO.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Public Class ChucVuDTO
Private iMaCV As Integer
Private strTenCV As String
Public Sub New()

End Sub

Public Sub New(iMaCV As Integer, strTenCV As String)
Me.iMaCV = iMaCV
Me.strTenCV = strTenCV
End Sub

Public Property MaCV As Integer
Get
Return iMaCV
End Get
Set(value As Integer)
iMaCV = value
End Set
End Property

Public Property TenCV As String
Get
Return strTenCV
End Get
Set(value As String)
strTenCV = value
End Set
End Property
End Class
13 changes: 12 additions & 1 deletion QuanLyDaiLy/DaiLyDTO/DaiLyDTO.vb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
Private iNoCuaDaiLy As Integer
Private iMaQuan As Integer
Private iMaLoaiDL As Integer
Private iMaNguoiDaiDien As Integer

Public Sub New()
End Sub

Public Sub New(iMaDL As Integer, strTenDL As String, strDiaChi As String, strEmail As String, strDienThoai As String, dateNgTiepNhan As Date, iNoCuaDaiLy As Integer, iMaQuan As Integer, iMaLoaiDL As Integer)
Public Sub New(iMaDL As Integer, strTenDL As String, strDiaChi As String, strEmail As String, strDienThoai As String, dateNgTiepNhan As Date, iNoCuaDaiLy As Integer, iMaQuan As Integer, iMaLoaiDL As Integer, iMaNguoiDaiDien As Integer)
Me.iMaDL = iMaDL
Me.strTenDL = strTenDL
Me.strDiaChi = strDiaChi
Expand All @@ -22,6 +23,7 @@
Me.iNoCuaDaiLy = iNoCuaDaiLy
Me.iMaQuan = iMaQuan
Me.iMaLoaiDL = iMaLoaiDL
Me.iMaNguoiDaiDien = iMaNguoiDaiDien
End Sub

Public Property MaDL As Integer
Expand Down Expand Up @@ -104,4 +106,13 @@
iNoCuaDaiLy = value
End Set
End Property

Public Property MaNguoiDaiDien As Integer
Get
Return iMaNguoiDaiDien
End Get
Set(value As Integer)
iMaNguoiDaiDien = value
End Set
End Property
End Class
62 changes: 62 additions & 0 deletions QuanLyDaiLy/DaiLyDTO/NguoiDaiDienDTO.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Public Class NguoiDaiDienDTO
Private iMaNguoiDaiDien As Integer
Private iSoDT As Integer
Private strTenNguoiDaiDien As String
Private strCMND As String
Private strDiaChi As String
Public Sub New()
End Sub

Public Sub New(iMaNguoiDaiDien As Integer, strTenNguoiDaiDien As String, iSoDT As Integer, strCMND As String, strDiaChi As String)
Me.iMaNguoiDaiDien = iMaNguoiDaiDien
Me.iSoDT = iSoDT
Me.strCMND = strCMND
Me.strDiaChi = strDiaChi
Me.strTenNguoiDaiDien = strTenNguoiDaiDien

End Sub
Public Property MaNguoiDaiDien As Integer
Get
Return iMaNguoiDaiDien
End Get
Set(value As Integer)
iMaNguoiDaiDien = value
End Set
End Property

Public Property SoDT As Integer
Get
Return iSoDT
End Get
Set(value As Integer)
iSoDT = value
End Set
End Property

Public Property CMND As String
Get
Return strCMND
End Get
Set(value As String)
strCMND = value
End Set
End Property

Public Property DiaChi As String
Get
Return strDiaChi
End Get
Set(value As String)
strDiaChi = value
End Set
End Property

Public Property TenNguoiDaiDien As String
Get
Return strTenNguoiDaiDien
End Get
Set(value As String)
strTenNguoiDaiDien = value
End Set
End Property
End Class
85 changes: 85 additions & 0 deletions QuanLyDaiLy/DaiLyDTO/NhanVienDTO.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Public Class NhanVienDTO
Private iMaNV As Integer
Private strHoTen As String
Private strCMND As String
Private strDienThoai As String
Private strDiaChi As String
Private iMaCV As Integer
Private iMaDL As Integer


Public Sub New()

End Sub
Public Sub New(iMaNV As Integer, strHoTen As String, strCMND As String, strDienThoai As String, strDiaChi As String, iMaCV As Integer, iMaDL As Integer)
Me.iMaNV = iMaNV
Me.strHoTen = strHoTen
Me.strCMND = strCMND
Me.strDienThoai = strDienThoai
Me.strDiaChi = strDiaChi
Me.iMaCV = iMaCV
Me.iMaDL = iMaDL
End Sub
Public Property MaNhanVien As Integer
Get
Return iMaNV
End Get
Set(value As Integer)
iMaNV = value
End Set
End Property

Public Property HoTenNhanVien As String
Get
Return strHoTen
End Get
Set(value As String)
strHoTen = value
End Set
End Property

Public Property CMND As String
Get
Return strCMND
End Get
Set(value As String)
strCMND = value
End Set
End Property

Public Property SoDienThoai As String
Get
Return strDienThoai
End Get
Set(value As String)
strDienThoai = value
End Set
End Property

Public Property DiaChi As String
Get
Return strDiaChi
End Get
Set(value As String)
strDiaChi = value
End Set
End Property

Public Property MaChucVu As Integer
Get
Return iMaCV
End Get
Set(value As Integer)
iMaCV = value
End Set
End Property

Public Property MaDaiLy As Integer
Get
Return iMaDL
End Get
Set(value As Integer)
iMaDL = value
End Set
End Property
End Class
3 changes: 3 additions & 0 deletions QuanLyDaiLy/DaiLyDTO/QLDaiLyDTO.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<Compile Include="BaoCaoCongNo.vb" />
<Compile Include="BaoCaoDoanhSoDTO.vb" />
<Compile Include="ChiTietPhieuXuatDTO.vb" />
<Compile Include="ChucVuDTO.vb" />
<Compile Include="DaiLyDTO.vb" />
<Compile Include="DonViTinhDTO.vb" />
<Compile Include="LoaiDLDTO.vb" />
Expand All @@ -84,6 +85,8 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="NguoiDaiDienDTO.vb" />
<Compile Include="NhanVienDTO.vb" />
<Compile Include="PhieuThuTienDTO.vb" />
<Compile Include="PhieuXuatDTO.vb" />
<Compile Include="QuanDTO.vb" />
Expand Down
Binary file modified QuanLyDaiLy/DaiLyDTO/bin/Debug/QLDaiLyDTO.dll
Binary file not shown.
Binary file modified QuanLyDaiLy/DaiLyDTO/bin/Debug/QLDaiLyDTO.pdb
Binary file not shown.
Binary file not shown.
Binary file modified QuanLyDaiLy/DaiLyDTO/obj/Debug/QLDaiLyDTO.dll
Binary file not shown.
Binary file modified QuanLyDaiLy/DaiLyDTO/obj/Debug/QLDaiLyDTO.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1fd4e021c0b165a6130f262b524d17b03486e4a5
e022b6b43e174e5a0ec99daca18d3fcf692fd51b
Binary file not shown.
23 changes: 23 additions & 0 deletions QuanLyDaiLy/QLDaiLyBUS/ChucVuBUS.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Imports QLDaiLyDAL
Imports QLDaiLyDTO
Imports Utility
Public Class ChucVuBUS
Private cvDAL As ChucVuDAL
Public Sub New()
cvDAL = New ChucVuDAL()
End Sub
Public Sub New(connectionString As String)
cvDAL = New ChucVuDAL(connectionString)
End Sub

Public Function buildMaCV(ByRef nextMaCV As Integer) As Result
Return cvDAL.buildMaCV(nextMaCV)
End Function
Public Function selectAll(ByRef listloaiCV As List(Of ChucVuDTO)) As Result
'1. verify data here!!

'2. insert to DB
Return cvDAL.selectALL(listloaiCV)
End Function
End Class

2 changes: 2 additions & 0 deletions QuanLyDaiLy/QLDaiLyBUS/LoaiXeBUS.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Imports QLDaiLyDAL
Imports QLDaiLyDTO
Imports Utility
Imports LoaiXeDTO
Imports LoaiXeDAL

Public Class LoaiXeBUS

Expand Down
Loading