Introduction
SMAF (Sistema de Manejo Administrativo y Financiero) is an internal expense and travel allowance control system for the Mexican Federal Public Administration, specifically developed for INAPESCA - CRIP Salina Cruz. The system is built using ASP.NET Web Forms with a traditional three-tier architecture pattern.Technology Stack
Platform & Framework
.NET Framework
Version 4.0 targeting Windows platform
ASP.NET Web Forms
Traditional server-side web application model
C#
Primary programming language
Visual Studio 2010
Development environment and tooling
Database
- Database Engine: MySQL Server 5.6.17
- Data Provider: MySql.Data.dll (Version 6.6.5.0)
- Database Name:
inapesca_cripsc
Third-Party Components
UI Components
UI Components
- Telerik UI for ASP.NET AJAX (Version 2014.2.618.40)
- Telerik Reporting (Version 8.1.14.618)
- AjaxControlToolkit (Version 4.1.40412.0)
Document Generation
Document Generation
- iTextSharp (Version 5.5.5) - PDF generation
- Microsoft ReportViewer (Version 10.0.0.0)
Utilities
Utilities
- QRCoder - QR code generation for documents
Solution Structure
The SMAF system is organized as a Visual Studio Solution (.sln) containing four distinct projects:
InapescaWeb.sln
Project Overview
InapescaWeb (Presentation Layer)
Main web application project containing ASPX pages, user controls, and UI logic. This is the entry point for all user interactions.Project GUID:
{090B5AA3-82FB-4607-BEE8-38EBDA114B4E}InapescaWeb.Entidades (Entity Layer)
Class library defining business entities and data transfer objects (DTOs) that represent the domain model.Project GUID:
{6B711C7C-3272-43FC-BB0C-A99E644DF90B}InapescaWeb.BRL (Business Rules Layer)
Business logic layer containing validation rules, calculations, and orchestration of business processes.Project GUID:
{9E452915-86A4-4499-B7C6-EDB42B6FF5EE}Architectural Pattern
SMAF follows a Three-Tier Architecture pattern, providing clear separation of concerns:Key Features
Functional Modules
The system is organized into functional areas based on directory structure:Solicitudes
Travel commission request submission and management
Autorizaciones
Authorization workflow for commission requests
Comprobaciones
Expense documentation and voucher submission
Pagos
Travel allowance payment processing
Ministraciones
Budget allocation and fund disbursement
Reportes
Reports and analytics for transparency
Catalogos
Master data management (projects, programs, accounts)
Validaciones
Validation and verification processes
Security Features
web.config:45-47
- Password encryption for user authentication
- Role-based access control (RBAC)
- Session management
- X-Frame-Options security header
Deployment Configuration
Build Configuration
The solution supports two build configurations:- Debug: Full debugging symbols, no optimization
- Release: Optimized code, minimal debugging information
Target Framework
Connection Management
The system supports multiple database connections for different modules:MngConexion.cs:33-40
The system includes dedicated connection methods for different databases:
- Main SMAF database (
getConexionMysql) - DGAIPP database (
getConexionMysql_dgaipp) - Contracts module (
getConexionMysql_Contratos) - Consultation module (
getConexionMysql_ModuloConsulta)
Design Principles
- Separation of Concerns: Clear boundaries between presentation, business logic, and data access
- Reusability: Common entities and business logic shared across layers
- Maintainability: Modular structure allows independent development and testing
- Scalability: Stateless business logic tier supports horizontal scaling
Next Steps
Three-Tier Architecture
Deep dive into the three-tier implementation
Database Schema
Explore the MySQL database structure