-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix using forms when sign out & add frmPhanLop
- Loading branch information
Showing
77 changed files
with
1,201 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using DAO; | ||
using DevComponents.DotNetBar.Controls; | ||
using DTO; | ||
using System.Windows.Forms; | ||
|
||
namespace BUS | ||
{ | ||
public class PhanLopBUS | ||
{ | ||
private static PhanLopBUS instance; | ||
|
||
private PhanLopBUS() { } | ||
|
||
public static PhanLopBUS Instance | ||
{ | ||
get | ||
{ | ||
if (instance == null) instance = new PhanLopBUS(); | ||
return instance; | ||
} | ||
private set => instance = value; | ||
} | ||
|
||
public void LuuHocSinhVaoBangPhanLop(string namHoc, string khoiLop, string lop, ListViewEx listViewEx) | ||
{ | ||
foreach (ListViewItem item in listViewEx.Items) | ||
{ | ||
PhanLopDTO phanLop = new PhanLopDTO(namHoc, khoiLop, lop, item.SubItems[0].Text.ToString()); | ||
PhanLopDAO.Instance.LuuHocSinhVaoBangPhanLop(phanLop); | ||
} | ||
} | ||
|
||
public void XoaHocSinhKhoiBangPhanLop(string namHoc, string khoiLop, string lop, ListViewEx listViewEx) | ||
{ | ||
foreach (ListViewItem item in listViewEx.Items) | ||
{ | ||
PhanLopDTO phanLop = new PhanLopDTO(namHoc, khoiLop, lop, item.SubItems[0].Text.ToString()); | ||
PhanLopDAO.Instance.XoaHocSinhKhoiBangPhanLop(phanLop); | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using DTO; | ||
using System.Data; | ||
|
||
namespace DAO | ||
{ | ||
public class PhanLopDAO | ||
{ | ||
private static PhanLopDAO instance; | ||
|
||
private PhanLopDAO() { } | ||
|
||
public static PhanLopDAO Instance | ||
{ | ||
get | ||
{ | ||
if (instance == null) instance = new PhanLopDAO(); | ||
return instance; | ||
} | ||
private set => instance = value; | ||
} | ||
|
||
public void LuuHocSinhVaoBangPhanLop(PhanLopDTO phanLop) | ||
{ | ||
string query = "EXEC LuuHocSinhVaoBangPhanLop @maNamHoc , @maKhoiLop , @maLop , @maHocSinh"; | ||
object[] parameters = new object[] { phanLop.MaNamHoc, phanLop.MaKhoiLop, phanLop.MaLop, phanLop.MaHocSinh }; | ||
DataProvider.Instance.ExecuteNonQuery(query, parameters); | ||
} | ||
|
||
public void XoaHocSinhKhoiBangPhanLop(PhanLopDTO phanLop) | ||
{ | ||
string query = "EXEC XoaHocSinhKhoiBangPhanLop @maNamHoc , @maKhoiLop , @maLop , @maHocSinh"; | ||
object[] parameters = new object[] { phanLop.MaNamHoc, phanLop.MaKhoiLop, phanLop.MaLop, phanLop.MaHocSinh }; | ||
DataProvider.Instance.ExecuteNonQuery(query, parameters); | ||
} | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ CREATE TABLE LOAINGUOIDUNG | |
) | ||
|
||
INSERT INTO LOAINGUOIDUNG VALUES('LND001', N'Ban giám hiệu') | ||
INSERT INTO LOAINGUOIDUNG VALUES('LND002', N'Giáo viện') | ||
INSERT INTO LOAINGUOIDUNG VALUES('LND002', N'Giáo viên') | ||
INSERT INTO LOAINGUOIDUNG VALUES('LND003', N'Nhân viên giáo vụ') | ||
|
||
--=================================================================================================================================================== | ||
|
@@ -213,15 +213,15 @@ CREATE TABLE HOCSINH | |
MaDanToc VARCHAR(6) NOT NULL, | ||
MaTonGiao VARCHAR(6) NOT NULL, | ||
HoTenCha NVARCHAR(30) NOT NULL, | ||
MaNNghiepCha VARCHAR(6) NOT NULL, | ||
MaNgheCha VARCHAR(6) NOT NULL, | ||
HoTenMe NVARCHAR(30) NOT NULL, | ||
MaNNghiepMe VARCHAR(6) NOT NULL, | ||
MaNgheMe VARCHAR(6) NOT NULL, | ||
Email NVARCHAR(50) NOT NULL UNIQUE, | ||
|
||
CONSTRAINT FK_HOCSINH_DANTOC FOREIGN KEY(MaDanToc) REFERENCES DANTOC(MaDanToc), | ||
CONSTRAINT FK_HOCSINH_TONGIAO FOREIGN KEY(MaTonGiao) REFERENCES TONGIAO(MaTonGiao), | ||
CONSTRAINT FK_HOCSINH_NGHENGHIEPCHA FOREIGN KEY(MaNNghiepCha) REFERENCES NGHENGHIEP(MaNghe), | ||
CONSTRAINT FK_HOCSINH_NGHENGHIEPME FOREIGN KEY(MaNNghiepMe) REFERENCES NGHENGHIEP(MaNghe) | ||
CONSTRAINT FK_HOCSINH_NGHENGHIEPCHA FOREIGN KEY(MaNgheCha) REFERENCES NGHENGHIEP(MaNghe), | ||
CONSTRAINT FK_HOCSINH_NGHENGHIEPME FOREIGN KEY(MaNgheMe) REFERENCES NGHENGHIEP(MaNghe) | ||
) | ||
|
||
INSERT INTO HOCSINH VALUES('HS0001', N'Nguyễn Văn Tú', '0', '01/02/2005', N'Long Xuyên', 'DT0001', 'TG0005', N'Biết chết liền', 'NN0005', N'Biết chết liền', 'NN0002', '[email protected]') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace DTO | ||
{ | ||
public class PhanLopDTO | ||
{ | ||
private string maNamHoc; | ||
private string maKhoiLop; | ||
private string maLop; | ||
private string maHocSinh; | ||
|
||
public PhanLopDTO(string maNamHoc, string maKhoiLop, string maLop, string maHocSinh) | ||
{ | ||
this.maNamHoc = maNamHoc; | ||
this.maKhoiLop = maKhoiLop; | ||
this.maLop = maLop; | ||
this.maHocSinh = maHocSinh; | ||
} | ||
|
||
public string MaNamHoc { get => maNamHoc; set => maNamHoc = value; } | ||
public string MaKhoiLop { get => maKhoiLop; set => maKhoiLop = value; } | ||
public string MaLop { get => maLop; set => maLop = value; } | ||
public string MaHocSinh { get => maHocSinh; set => maHocSinh = value; } | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.