# nguyentrongiam/quanlyhocsinhthpt architecture

> Architecture diagram of the GitHub repository nguyentrongiam/quanlyhocsinhthpt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nguyentrongiam/quanlyhocsinhthpt
- Repository: https://github.com/nguyentrongiam/quanlyhocsinhthpt

## Overview

This is a Vietnamese high-school management desktop application. The visible workflow is teachers managing class grades through the WinForms UI, business services, and data access; the source index also identifies administration, attendance, scheduling, accounts, student/teacher records, and parent/student grade viewing. The evidence supports a layered UI/BUS/DAO/DTO structure. Several screens and modules are indexed but unsampled, so their internal calls are not asserted.

Main entry points: [`BUS/GiaoVienBUS.cs`](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/GiaoVienBUS.cs) (Teacher service), [`BUS/DiemBUS.cs`](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/DiemBUS.cs) (Grade service), [`GUI/ucQuanLyLopHoc_GV.cs`](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyLopHoc_GV.cs) (Teacher class grades), [`BUS/HocSinhBUS.cs`](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/HocSinhBUS.cs) (Student service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_teacher["Teacher class grades"]
  node_teacher_dash["Teacher dashboard"]
  node_teacher_admin["Teacher management"]
  node_student_admin["Student management<br/>[ucQuanLyHocSinh.cs]"]
  node_attendance_ui["Attendance management"]
  node_assignment_ui["Teaching assignments"]
  node_grade_view["Grade viewing<br/>[ucXemDiem.cs]"]
  node_scheduling_ui["Schedules and timetable"]
  node_account_ui["Account administration"]
  node_family_dashboard["Family/student dashboard"]
end

subgraph group_services["Business services"]
  node_grade_service["Grade service<br/>[DiemBUS.cs]"]
  node_teacher_service["Teacher service<br/>[GiaoVienBUS.cs]"]
  node_student_service["Student service<br/>[HocSinhBUS.cs]"]
  node_account_service["Account service<br/>[TaiKhoanBUS.cs]"]
  node_attendance_service["Attendance service<br/>[DiemDanhBUS.cs]"]
  node_assignment_service["Assignment service<br/>[PhanCongBUS.cs]"]
  node_other_services["Class and schedule services"]
end

subgraph group_persistence["Data access"]
  node_grade_dao["Grade persistence<br/>[DiemDAO.cs]"]
  node_teacher_dao["Teacher persistence<br/>[GiaoVienDAO.cs]"]
  node_student_dao["Student persistence<br/>[HocSinhDAO.cs]"]
  node_account_dao["Account persistence<br/>[TaiKhoanDAO.cs]"]
  node_assignment_dao["Assignment persistence<br/>[PhanCongDAO.cs]"]
  node_attendance_dao["Attendance persistence<br/>[DiemDanhDAO.cs]"]
  node_other_dao["Other data access"]
  node_provider["SQL data provider<br/>[DataProvider.cs]"]
  node_db_legacy["Database access<br/>[Database.cs]"]
end

subgraph group_models["Domain models"]
  node_grade_model["Grade record<br/>[DiemDTO.cs]"]
  node_teacher_model["Teacher record<br/>[GiaoVienDTO.cs]"]
  node_student_model["Student record<br/>[HocSinhDTO.cs]"]
  node_account_model["Account and session<br/>[TaiKhoanDTO.cs]"]
  node_assignment_model["Teaching assignment"]
end

node_teacher_actor(("Teacher"))
node_admin_actor(("Administrator"))
node_sql_server[("SQL Server<br/>external database")]

node_teacher_actor -.->|"uses"| node_teacher
node_teacher -->|"loads and saves"| node_grade_service
node_teacher -->|"loads classes"| node_teacher_service
node_teacher_dash -->|"loads profile"| node_teacher_service
node_teacher_admin -->|"manages teachers"| node_teacher_service
node_student_admin -->|"manages students"| node_student_service
node_attendance_ui -->|"manages attendance"| node_attendance_service
node_assignment_ui -->|"manages assignments"| node_assignment_service
node_assignment_ui -->|"loads teachers"| node_teacher_service
node_grade_view -->|"loads grades"| node_grade_service
node_account_ui -->|"manages accounts"| node_account_service
node_grade_service -->|"delegates"| node_grade_dao
node_teacher_service -->|"delegates"| node_teacher_dao
node_teacher_service -->|"creates and locks accounts"| node_account_dao
node_student_service -->|"delegates"| node_student_dao
node_account_service -->|"authenticates and manages"| node_account_dao
node_attendance_service -->|"delegates"| node_attendance_dao
node_assignment_service -->|"delegates"| node_assignment_dao
node_teacher_service -->|"queries gradebook"| node_grade_dao
node_grade_dao -->|"queries and writes"| node_db_legacy
node_teacher_dao -->|"uses"| node_provider
node_provider -->|"connects"| node_sql_server
node_grade_service -->|"accepts and returns"| node_grade_model
node_teacher_service -->|"accepts and returns"| node_teacher_model
node_student_service -->|"accepts and returns"| node_student_model
node_account_service -->|"accepts and returns"| node_account_model
node_assignment_service -->|"uses"| node_assignment_model

click node_teacher "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyLopHoc_GV.cs"
click node_teacher_dash "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/DashboardGiaoVien.cs"
click node_teacher_admin "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyGiaoVien.cs"
click node_student_admin "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyHocSinh.cs"
click node_attendance_ui "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyDiemDanh.cs"
click node_assignment_ui "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucPhanCongGiangDay.cs"
click node_grade_view "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucXemDiem.cs"
click node_scheduling_ui "https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/GUI"
click node_account_ui "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyTaiKhoan.cs"
click node_family_dashboard "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/DashboardPhuHuynhHocSinh.cs"
click node_grade_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/DiemBUS.cs"
click node_teacher_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/GiaoVienBUS.cs"
click node_student_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/HocSinhBUS.cs"
click node_account_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/TaiKhoanBUS.cs"
click node_attendance_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/DiemDanhBUS.cs"
click node_assignment_service "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/PhanCongBUS.cs"
click node_other_services "https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/BUS"
click node_grade_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DiemDAO.cs"
click node_teacher_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/GiaoVienDAO.cs"
click node_student_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/HocSinhDAO.cs"
click node_account_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/TaiKhoanDAO.cs"
click node_assignment_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/PhanCongDAO.cs"
click node_attendance_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DiemDanhDAO.cs"
click node_other_dao "https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/DAO"
click node_provider "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DataProvider.cs"
click node_db_legacy "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/Database.cs"
click node_grade_model "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/DiemDTO.cs"
click node_teacher_model "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/GiaoVienDTO.cs"
click node_student_model "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/HocSinhDTO.cs"
click node_account_model "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/TaiKhoanDTO.cs"
click node_assignment_model "https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/PhanCongGiangDayDTO.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_teacher,node_teacher_dash,node_teacher_admin,node_student_admin,node_attendance_ui,node_assignment_ui,node_grade_view,node_scheduling_ui,node_account_ui,node_family_dashboard toneBlue
class node_grade_service,node_teacher_service,node_student_service,node_account_service,node_attendance_service,node_assignment_service,node_other_services,node_sql_server toneAmber
class node_grade_dao,node_teacher_dao,node_student_dao,node_account_dao,node_assignment_dao,node_attendance_dao,node_other_dao,node_provider,node_db_legacy toneMint
class node_grade_model,node_teacher_model,node_student_model,node_account_model,node_assignment_model toneRose
class node_teacher_actor,node_admin_actor toneIndigo
```

## Components

### Desktop interface

- [Teacher class grades](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyLopHoc_GV.cs): `GUI/ucQuanLyLopHoc_GV.cs`
- [Teacher dashboard](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/DashboardGiaoVien.cs): `GUI/DashboardGiaoVien.cs`
- [Teacher management](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyGiaoVien.cs): `GUI/ucQuanLyGiaoVien.cs`
- [Student management](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyHocSinh.cs): `GUI/ucQuanLyHocSinh.cs`
- [Attendance management](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyDiemDanh.cs): `GUI/ucQuanLyDiemDanh.cs`
- [Teaching assignments](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucPhanCongGiangDay.cs): `GUI/ucPhanCongGiangDay.cs`
- [Grade viewing](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucXemDiem.cs): `GUI/ucXemDiem.cs`
- [Schedules and timetable](https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/GUI): `GUI`
- [Account administration](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/ucQuanLyTaiKhoan.cs): `GUI/ucQuanLyTaiKhoan.cs`
- [Family/student dashboard](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/GUI/DashboardPhuHuynhHocSinh.cs): `GUI/DashboardPhuHuynhHocSinh.cs`

### Business services

- [Grade service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/DiemBUS.cs): `BUS/DiemBUS.cs`
- [Teacher service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/GiaoVienBUS.cs): `BUS/GiaoVienBUS.cs`
- [Student service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/HocSinhBUS.cs): `BUS/HocSinhBUS.cs`
- [Account service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/TaiKhoanBUS.cs): `BUS/TaiKhoanBUS.cs`
- [Attendance service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/DiemDanhBUS.cs): `BUS/DiemDanhBUS.cs`
- [Assignment service](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/BUS/PhanCongBUS.cs): `BUS/PhanCongBUS.cs`
- [Class and schedule services](https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/BUS): `BUS`

### Data access

- [Grade persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DiemDAO.cs): `DAO/DiemDAO.cs`
- [Teacher persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/GiaoVienDAO.cs): `DAO/GiaoVienDAO.cs`
- [Student persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/HocSinhDAO.cs): `DAO/HocSinhDAO.cs`
- [Account persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/TaiKhoanDAO.cs): `DAO/TaiKhoanDAO.cs`
- [Assignment persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/PhanCongDAO.cs): `DAO/PhanCongDAO.cs`
- [Attendance persistence](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DiemDanhDAO.cs): `DAO/DiemDanhDAO.cs`
- [Other data access](https://github.com/nguyentrongiam/quanlyhocsinhthpt/tree/master/DAO): `DAO`
- [SQL data provider](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/DataProvider.cs): `DAO/DataProvider.cs`
- [Database access](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DAO/Database.cs): `DAO/Database.cs`

### Domain models

- [Grade record](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/DiemDTO.cs): `DTO/DiemDTO.cs`
- [Teacher record](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/GiaoVienDTO.cs): `DTO/GiaoVienDTO.cs`
- [Student record](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/HocSinhDTO.cs): `DTO/HocSinhDTO.cs`
- [Account and session](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/TaiKhoanDTO.cs): `DTO/TaiKhoanDTO.cs`
- [Teaching assignment](https://github.com/nguyentrongiam/quanlyhocsinhthpt/blob/master/DTO/PhanCongGiangDayDTO.cs): `DTO/PhanCongGiangDayDTO.cs`

### Other components

- **Teacher**
- **Administrator**
- **SQL Server**: external database

## Connections

- Teacher → Teacher class grades: uses
- Teacher class grades → Grade service: loads and saves (evidence: `GUI/ucQuanLyLopHoc_GV.cs`)
- Teacher class grades → Teacher service: loads classes (evidence: `GUI/ucQuanLyLopHoc_GV.cs`)
- Teacher dashboard → Teacher service: loads profile (evidence: `GUI/DashboardGiaoVien.cs`)
- Teacher management → Teacher service: manages teachers (evidence: `GUI/ucQuanLyGiaoVien.cs`)
- Student management → Student service: manages students (evidence: `GUI/ucQuanLyHocSinh.cs`)
- Attendance management → Attendance service: manages attendance (evidence: `GUI/ucQuanLyDiemDanh.cs`)
- Teaching assignments → Assignment service: manages assignments (evidence: `GUI/ucPhanCongGiangDay.cs`)
- Teaching assignments → Teacher service: loads teachers (evidence: `GUI/ucPhanCongGiangDay.cs`)
- Grade viewing → Grade service: loads grades (evidence: `GUI/ucXemDiem.cs`)
- Account administration → Account service: manages accounts (evidence: `GUI/ucQuanLyTaiKhoan.cs`)
- Grade service → Grade persistence: delegates (evidence: `BUS/DiemBUS.cs`)
- Teacher service → Teacher persistence: delegates (evidence: `BUS/GiaoVienBUS.cs`)
- Teacher service → Account persistence: creates and locks accounts (evidence: `BUS/GiaoVienBUS.cs`)
- Student service → Student persistence: delegates (evidence: `BUS/HocSinhBUS.cs`)
- Account service → Account persistence: authenticates and manages (evidence: `BUS/TaiKhoanBUS.cs`)
- Attendance service → Attendance persistence: delegates (evidence: `BUS/DiemDanhBUS.cs`)
- Assignment service → Assignment persistence: delegates (evidence: `BUS/PhanCongBUS.cs`)
- Teacher service → Grade persistence: queries gradebook (evidence: `BUS/GiaoVienBUS.cs`)
- Grade persistence → Database access: queries and writes (evidence: `DAO/DiemDAO.cs`)
- Teacher persistence → SQL data provider: uses (evidence: `DAO/GiaoVienDAO.cs`)
- SQL data provider → SQL Server: connects (evidence: `DAO/DataProvider.cs`)
- Grade service → Grade record: accepts and returns (evidence: `BUS/DiemBUS.cs`)
- Teacher service → Teacher record: accepts and returns (evidence: `BUS/GiaoVienBUS.cs`)
- Student service → Student record: accepts and returns (evidence: `BUS/HocSinhBUS.cs`)
- Account service → Account and session: accepts and returns (evidence: `BUS/TaiKhoanBUS.cs`)
- Assignment service → Teaching assignment: uses (evidence: `BUS/PhanCongBUS.cs`)
