# baongoc02/quanlydiemsinhvien architecture

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

- Interactive diagram: https://gitdiagram.com/baongoc02/quanlydiemsinhvien
- Repository: https://github.com/baongoc02/quanlydiemsinhvien

## Overview

This is a Vietnamese Windows desktop application for managing student grades. The principal workflow is login, then an instructor searches or imports grade records, while the application retrieves and presents results; services mediate between screens and data access. The repository also contains administrative screens for academic records, student and lecturer management, and reporting-oriented grade queries. Source excerpts establish the login and instructor grade paths, SQL access, and Excel imports; other GUI capabilities are represented from the file tree, with unverified connections left dashed.

Main entry points: [`QuanLyDiemSinhVienNhom5/GUI/Login.cs`](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/Login.cs) (Login), [`QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs`](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs) (SQL connection), [`QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs`](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs) (Grade service), [`QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs) (Instructor home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_program["Application entry<br/>[Program.cs]"]
  node_login["Login<br/>[Login.cs]"]
  node_admin["Admin screens"]
  node_teacher["Instructor home"]
  node_gradeview["Grade detail"]
  node_reports["Grade reports"]
end

subgraph group_core["Application Services"]
  node_user_service["User service<br/>[UserService.cs]"]
  node_grade_service["Grade service"]
  node_academic_services["Academic services<br/>[Services]"]
  node_people_services["People services<br/>[Services]"]
end

subgraph group_data["Data Access"]
  node_grade_dao["Grade DAO<br/>[KetQuaHocTapDAO.cs]"]
  node_dao_layer["Other DAOs<br/>[DAO]"]
  node_sql_connection["SQL connection"]
  node_settings["Database settings<br/>[AppSetting.cs]"]
end

subgraph group_domain["Domain and Import"]
  node_grade_import["Grade Excel import"]
  node_student_import["Student Excel import"]
  node_records["Domain records<br/>[Entities]"]
  node_viewmodels["Grade view models<br/>[ViewModel]"]
end

node_user(("User"))
node_sqlserver[("SQL Server")]

node_user -.->|"starts session"| node_login
node_program -->|"opens"| node_login
node_login -->|"authenticates"| node_user_service
node_login -->|"opens on login"| node_admin
node_login -->|"opens on login"| node_teacher
node_login -->|"tests connection"| node_sql_connection
node_login -->|"sets credentials"| node_settings
node_teacher -->|"searches and imports"| node_grade_service
node_teacher -->|"loads filters"| node_academic_services
node_teacher -->|"opens detail"| node_gradeview
node_grade_service -->|"delegates queries"| node_grade_dao
node_grade_service -->|"maps results"| node_viewmodels
node_grade_dao -->|"loads file"| node_grade_import
node_grade_import -->|"executes import"| node_sql_connection
node_grade_import -->|"builds grade record"| node_records
node_grade_dao -->|"runs queries"| node_sql_connection
node_sql_connection -->|"reads credentials"| node_settings
node_sql_connection -.->|"connects"| node_sqlserver
node_student_import -->|"executes import"| node_sql_connection
node_student_import -->|"builds student record"| node_records
node_dao_layer -.->|"uses connection"| node_sql_connection
node_grade_service -.->|"provides grade queries"| node_reports
node_admin -.->|"manages records"| node_people_services
node_admin -.->|"manages academic data"| node_academic_services
node_gradeview -.->|"reads or edits grades"| node_grade_service

click node_program "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/Program.cs"
click node_login "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/Login.cs"
click node_admin "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5/GUI"
click node_teacher "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs"
click node_gradeview "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/KetQuaHocTapSinhVien.cs"
click node_reports "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5/GUI"
click node_user_service "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.Core/Services/UserService.cs"
click node_grade_service "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs"
click node_academic_services "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/Services"
click node_people_services "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/Services"
click node_grade_dao "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs"
click node_dao_layer "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.DataAccess/DAO"
click node_sql_connection "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs"
click node_grade_import "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/NhapDiemSinhVienExcelEngine.cs"
click node_student_import "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/SinhVienExcelEngine.cs"
click node_records "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.DataAccess/Entities"
click node_viewmodels "https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/ViewModel"
click node_settings "https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/Base/AppSetting.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_program,node_login,node_admin,node_teacher,node_gradeview,node_reports,node_user toneBlue
class node_user_service,node_grade_service,node_academic_services,node_people_services,node_sqlserver toneAmber
class node_grade_dao,node_dao_layer,node_sql_connection,node_settings toneMint
class node_grade_import,node_student_import,node_records,node_viewmodels toneRose
```

## Components

### Desktop UI

- [Application entry](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/Program.cs): `QuanLyDiemSinhVienNhom5/Program.cs`
- [Login](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/Login.cs): `QuanLyDiemSinhVienNhom5/GUI/Login.cs`
- [Admin screens](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5/GUI): `QuanLyDiemSinhVienNhom5/GUI`
- [Instructor home](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs): `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`
- [Grade detail](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5/GUI/KetQuaHocTapSinhVien.cs): `QuanLyDiemSinhVienNhom5/GUI/KetQuaHocTapSinhVien.cs`
- [Grade reports](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5/GUI): `QuanLyDiemSinhVienNhom5/GUI`

### Application Services

- [User service](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.Core/Services/UserService.cs): `QuanLyDiemSinhVienNhom5.Core/Services/UserService.cs`
- [Grade service](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs): `QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs`
- [Academic services](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/Services): `QuanLyDiemSinhVienNhom5.Core/Services`
- [People services](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/Services): `QuanLyDiemSinhVienNhom5.Core/Services`

### Data Access

- [Grade DAO](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs): `QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs`
- [Other DAOs](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.DataAccess/DAO): `QuanLyDiemSinhVienNhom5.DataAccess/DAO`
- [SQL connection](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs): `QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs`
- [Database settings](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/Base/AppSetting.cs): `QuanLyDiemSinhVienNhom5.DataAccess/Base/AppSetting.cs`

### Domain and Import

- [Grade Excel import](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/NhapDiemSinhVienExcelEngine.cs): `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/NhapDiemSinhVienExcelEngine.cs`
- [Student Excel import](https://github.com/baongoc02/quanlydiemsinhvien/blob/main/QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/SinhVienExcelEngine.cs): `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/SinhVienExcelEngine.cs`
- [Domain records](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.DataAccess/Entities): `QuanLyDiemSinhVienNhom5.DataAccess/Entities`
- [Grade view models](https://github.com/baongoc02/quanlydiemsinhvien/tree/main/QuanLyDiemSinhVienNhom5.Core/ViewModel): `QuanLyDiemSinhVienNhom5.Core/ViewModel`

### Other components

- **User**
- **SQL Server**

## Connections

- User → Login: starts session
- Application entry → Login: opens (evidence: `QuanLyDiemSinhVienNhom5/Program.cs`)
- Login → User service: authenticates (evidence: `QuanLyDiemSinhVienNhom5/GUI/Login.cs`)
- Login → Admin screens: opens on login (evidence: `QuanLyDiemSinhVienNhom5/GUI/Login.cs`)
- Login → Instructor home: opens on login (evidence: `QuanLyDiemSinhVienNhom5/GUI/Login.cs`)
- Login → SQL connection: tests connection (evidence: `QuanLyDiemSinhVienNhom5/GUI/Login.cs`)
- Login → Database settings: sets credentials (evidence: `QuanLyDiemSinhVienNhom5/GUI/Login.cs`)
- Instructor home → Grade service: searches and imports (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Instructor home → Academic services: loads filters (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Instructor home → Grade detail: opens detail (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Grade service → Grade DAO: delegates queries (evidence: `QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs`)
- Grade service → Grade view models: maps results (evidence: `QuanLyDiemSinhVienNhom5.Core/Services/KetQuaHocTapService.cs`)
- Grade DAO → Grade Excel import: loads file (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs`)
- Grade Excel import → SQL connection: executes import (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/NhapDiemSinhVienExcelEngine.cs`)
- Grade Excel import → Domain records: builds grade record (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/NhapDiemSinhVienExcelEngine.cs`)
- Grade DAO → SQL connection: runs queries (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs`)
- SQL connection → Database settings: reads credentials (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/SqlServer/SqlServerConnectionSingleon.cs`)
- SQL connection → SQL Server: connects
- Student Excel import → SQL connection: executes import (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/SinhVienExcelEngine.cs`)
- Student Excel import → Domain records: builds student record (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/ExcelEngine/SinhVienExcelEngine.cs`)
- Other DAOs → SQL connection: uses connection (evidence: `QuanLyDiemSinhVienNhom5.DataAccess/DAO/KetQuaHocTapDAO.cs`)
- Grade service → Grade reports: provides grade queries (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Admin screens → People services: manages records (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Admin screens → Academic services: manages academic data (evidence: `QuanLyDiemSinhVienNhom5/GUI/HomePageGiangVien.cs`)
- Grade detail → Grade service: reads or edits grades
