How gumiho0812/qlcuahangthucung works
QLCuaHangThuCung is a WPF pet-shop management application. The visible workflow is staff/admin login, role selection, then access to role-specific screens; staff can manage customers and assemble and confirm invoices from product, pet, and service items. Admin and employee permissions cover broader catalog, employee, promotion, service, invoice, dashboard, and reporting capabilities. Source excerpts confirm several direct SQL operations, but do not establish all screen-to-view-model bindings or unsampled feature wiring.
Main entry points: AdminView.xaml.cs Admin workspace · Login_Viewmodel.cs Login handler · NhanVien_BanHang_ViewModel.cs Sales and invoicing · NhanVien_QLKhachHang_ViewModel.cs Customer management
Components 21
Access and roles
- Login screen
Views/Sercurity/Login_View.xaml.cs - Login handler
ViewModels/Sercurity/Login_Viewmodel.cs - Role permissions
Helpers/RoleManager.cs
Staff operations
- Staff workspace
Views/NhanVien/NhanVienView_View.xaml.cs - Staff workspace model
ViewModels/NhanVien/NhanVienView_ViewModel.cs - Sales and invoicing
ViewModels/NhanVien/NhanVien_BanHang_ViewModel.cs - Customer management
ViewModels/NhanVien/NhanVien_QLKhachHang_ViewModel.cs - Customer screen
Views/NhanVien/NhanVien_QLKhachHang_View.xaml.cs
Administration
- Admin workspace
Views/Admin/AdminView.xaml.cs - Admin dashboard
ViewModels/Admin/AdminView_ViewModel.cs - Customer administration
ViewModels/Admin/Admin_KH_ViewModel.cs - Employee administration
ViewModels/Admin/Admin_NS_ViewModel.cs - Invoice administration
ViewModels/Admin/Admin_HD_ViewModel.cs - Invoice details
ViewModels/Admin/Admin_ChiTietHD_ViewModel.cs - Product administration
ViewModels/Admin/Admin_CTSP_ViewModel.cs - Admin reporting
ViewModels/Admin/Admin_TQ_ViewModel.cs
Data layer
- SQL access helper
Helpers/DatabaseHelper.cs - Customer model
Models/KhachHang.cs - Invoice model
Models/HoaDon.cs
Other components
- Operator
- SQL Server
Connections 27
- Operator → Login screen: enters credentials
- Login screen → Login handler: binds input
- Login handler → SQL access helper: gets connection
- Login handler → SQL Server: authenticates
- Login handler → Role permissions: sets signed-in user
- Login handler → Admin workspace: opens admin
- Login handler → Staff workspace: opens staff
- Staff workspace → Staff workspace model: creates model
- Staff workspace model → Sales and invoicing: feature scope
- Staff workspace model → Customer management: feature scope
- Customer management → SQL access helper: gets connection
- Customer management → SQL Server: reads and writes
- Customer management → Customer model: populates
- Sales and invoicing → Role permissions: checks permission
- Sales and invoicing → SQL access helper: gets connection
- Sales and invoicing → SQL Server: loads and saves invoices
- Sales and invoicing → Invoice model: uses invoice data
- Customer administration → SQL access helper: gets connection
- Customer administration → SQL Server: reads and writes
- Employee administration → SQL Server: reads and writes
- Admin workspace → Admin dashboard: feature scope
- Admin workspace → Customer administration: feature scope
- Admin workspace → Employee administration: feature scope
- Admin workspace → Invoice administration: feature scope
- Admin workspace → Invoice details: feature scope
- Admin workspace → Product administration: feature scope
- Admin workspace → Admin reporting: feature scope