How lujainkhaled10/pharmacy-management_1 works
This is a Windows Forms pharmacy-management application. A user signs in through the login form; successful authentication opens the dashboard, where staff manage users, suppliers, and medicines, and use a point-of-sale flow to build carts and invoices. The managers implement CRUD, filtering, expiry handling, and password hashing over a shared in-memory store. The dashboard and login form are the visible UI layer; the model layer represents users, medicines, companies, and invoices. The excerpts show these main links, but not every dashboard event handler.
Main entry points: DataStore.cs In-memory store · Form2.cs Management dashboard · Form1.cs Login form · Medicines.cs Medicine
Components 14
Windows Forms UI
- Application startup
Program.cs - Login form
Form1.cs - Management dashboard
Form2.cs
Pharmacy Operations
- User management
Managers/UsersManager.cs - Company management
Managers/CompanyManager.cs - Medicine management
Managers/MedicinesManager.cs
Shared State
- In-memory store
Models/DataStore.cs
Domain Models
- Base entity
Models/Entity.cs - User account
Models/Users.cs - Company
Models/Company.cs - Medicine
Models/Medicines.cs - Invoice
Models/Invoice.cs - Invoice item
Models/InvoiceItem.cs
Other components
- Pharmacy user
Connections 29
- Pharmacy user → Login form: enters credentials
Form1.cs - Application startup → Login form: starts
Program.cs - Login form → User management: authenticates
Form1.cs - Login form → In-memory store: checks users
Form1.cs - Login form → Management dashboard: opens on success
Form1.cs - Management dashboard → User management: manages accounts
Form2.cs - Management dashboard → Company management: manages companies
Form2.cs - Management dashboard → Medicine management: manages medicines
Form2.cs - Management dashboard → In-memory store: updates cart and invoices
Form2.cs - Management dashboard → Invoice: creates and displays
Form2.cs - Management dashboard → Invoice item: adds cart items
Form2.cs - User management → In-memory store: reads and updates
Managers/UsersManager.cs - User management → User account: creates and edits
Managers/UsersManager.cs - Company management → In-memory store: reads and updates
Managers/CompanyManager.cs - Company management → Company: creates and edits
Managers/CompanyManager.cs - Medicine management → In-memory store: reads and updates
Managers/MedicinesManager.cs - Medicine management → Medicine: filters and edits
Managers/MedicinesManager.cs - Medicine management → Company: filters by company
Managers/MedicinesManager.cs - In-memory store → Company: holds
Models/DataStore.cs - In-memory store → Invoice: holds
Models/DataStore.cs - In-memory store → Invoice item: holds cart items
Models/DataStore.cs - In-memory store → Medicine: holds active and expired
Models/DataStore.cs - In-memory store → User account: holds accounts
Models/DataStore.cs - Company → Base entity: inherits
Models/Company.cs - Medicine → Base entity: inherits
Models/Medicines.cs - User account → Base entity: inherits
Models/Users.cs - Medicine → Company: references supplier
Models/Medicines.cs - Invoice → Invoice item: contains items
Models/Invoice.cs - Invoice item → Medicine: references medicine
Models/InvoiceItem.cs