Folder structure
Map of the damsy_erp_core repository — where web UI, data access, business objects, shared utilities, and deployment scripts live.
Introduction
Damsy ERP is a multi-project .NET Framework 4.5.2 solution. The web project is large: MVC Areas per module, thousands of static assets, Crystal report viewers, and Razor views. Business logic is split between SQL stored procedures (primary) and C# controllers/DAL (orchestration).
Purpose
Help developers navigate the codebase, know where to add views or DAL methods, and understand what publishes to IIS vs what stays in SQL.
When to use
- Locating a module's controllers and views
- Adding CSS or partial views (remember
.csprojContent includes) - Finding blank-database scripts or publish profiles
- Onboarding after reading Solution structure
How it works
Repository root
damsy_erp_core/
├── DamsyERP.sln # Open this in Visual Studio
├── DamsyERP.UI/ # Web application (startup project)
├── DAL/ # Data access layer
├── BO/ # Business objects / DTOs
├── UTILITIES/ # Shared helpers
├── database-backup/ # Backup notes + blank DB scripts
├── docs/ # In-repo knowledge guide
└── (supporting files)
DamsyERP.UI (web application)
Primary deployable project — publish output goes to IIS.
DamsyERP.UI/
├── App_Start/ # RouteConfig, BundleConfig, FilterConfig, AreaRegistration
├── Controllers/ # Root controllers (Login, Dashboard, ManageError, …)
├── Views/ # Root views (Login, Dashboard, Shared layouts)
├── Areas/ # Module boundaries (see below)
├── app-assets/ # CSS, JS, fonts, images (shell UI)
├── AppScripts/ # Module-specific JavaScript
├── Content/ # Legacy/bootstrap content paths
├── Scripts/ # jQuery and vendor scripts
├── crystalreportviewers13/ # Crystal web viewer assets
├── DataSet/ # Typed DataSets for reports
├── Properties/
│ └── PublishProfiles/
│ └── MVC_PUBLISH.pubxml # VPS file-system publish profile
├── Web.config # Base configuration
├── Web.Release.config # Release transform
└── Global.asax.cs # Application lifecycle, ForceHttps
MVC Areas (modules)
Each Area typically contains:
Areas/<AreaName>/
├── <AreaName>AreaRegistration.cs
├── Controllers/
├── Views/
├── Models/ # Some areas
├── *Reports/ # Crystal .rpt + code-behind
└── *ReportViewerForm/ # .aspx report hosts
| Area folder | Module |
|---|---|
Payroll | Payroll processing, statutory reports |
Registration | Employee registration / web enroll |
Bills | Client billing, GST/IRN |
Stock | Inventory, requisition, PO |
Sales | Sales follow-up |
ESS | Employee self-service |
Adminisration | Users, roles, company admin (spelling intentional) |
ManagmentDashBoard | Management MIS (spelling intentional) |
AttendancePunching | Attendance entry |
Operation | Field operations |
ContractedRates | Contract rate masters |
VerificationAndApproval | Approval workflows |
Root shared partials (examples):
Views/Shared/
├── _SidebarBrand.cshtml
├── _SidebarMenuSearch.cshtml
└── Error.cshtml
Module layouts live under Areas/<Area>/Views/Shared/.
DAL project
DAL/
├── BaseHelper.cs # Connection + SP execution
├── Login_DAL.cs
├── Employee/
├── Payroll/
├── Bills/
├── Administrator/
└── … # Mirrors module boundaries
Pattern: one DAL class (or family) per feature screen; methods map 1:1 to stored procedure names in most cases.
BO project
BO/
├── User.cs # Login user + module flags
├── Payroll/
├── Employee/
├── Bills/
├── Administrator/
└── …
Plain C# properties — no ORM attributes. Populated manually from DataRow in DAL or controllers.
UTILITIES project
UTILITIES/
├── HashCryptography.cs # Password encryption
├── Constants / helpers
└── …
Referenced by DAL and UI for cross-cutting non-UI helpers.
database-backup
database-backup/
├── scripts-blank-db/
│ ├── 00-recreate-blank-database.sql
│ ├── 01-create-blank-database.sql
│ ├── 02-verify-blank-database.sql
│ ├── 03-NOTES-apply-schema.sql
│ ├── 04-seed-minimal.sql
│ ├── 04b-fix-admin-login.sql
│ ├── 05-update-connection-string-NOTES.sql
│ ├── Clean-SchemaScript.ps1
│ └── Export-SchemaOnly-FromLocal.ps1
└── (backup artifacts, guides)
Operational SQL — not loaded by the web app at runtime.
Publish output (IIS mirror)
After MVC_PUBLISH, the folder structure mirrors DamsyERP.UI content plus bin/ assemblies:
C:\inetpub\wwwroot\damsy_erp/ # Typical IIS path
├── bin/
│ ├── DamsyERP.UI.dll
│ ├── DAL.dll
│ ├── BO.dll
│ └── UTILITIES.dll
├── Areas/
├── app-assets/
├── Views/
├── Web.config # Transformed Release config
└── …
Examples
Example — Find Payroll salary screen
- URL suggests Area
Payroll→Areas/Payroll/Controllers/ - DAL:
DAL/Payroll/or root DAL file named for feature - BO:
BO/Payroll/ - SP: search SSMS for procedure name referenced in DAL method
Example — Add new dashboard CSS
- File:
DamsyERP.UI/app-assets/css/my-module-dashboard.css - Include in
DamsyERP.UI.csprojas Content - Reference in Area layout with
?v=query string - Publish and verify under inetpub
Example — Login pipeline files
| Layer | Path |
|---|---|
| Controller | Controllers/LoginController.cs |
| View | Views/Login/Index.cshtml |
| DAL | DAL/Login_DAL.cs |
| BO | BO/User.cs |
| Crypto | UTILITIES/HashCryptography.cs |
Related pages
Important notes
.csprojsize — UI project lists thousands of Content entries; use "Include in Project" for new web files.- Not in Git: full SQL schema — see Database operations.
- Areas spelling matches URLs — folder rename breaks routes.
docs/in repo is a knowledge guide; official Docusaurus site is separate (damsy-erp-docs).
Common mistakes
| Mistake | Result |
|---|---|
| Adding view only under Areas without csproj | Publish omit |
Searching Administration folder | Area is Adminisration |
| Editing BO expecting EF migrations | BO is manual DTO |
| Looking for business rules only in C# | Check SQL procedures |
Next steps
- Read Naming conventions before creating files.
- Follow Installation to build locally.
- Use Glossary while exploring Areas.