How je7remy/sistema-inventario-farmacia works
Project Type and Main Purpose
• This is a full-stack desktop application built with C# using Visual Studio.
• It employs a multi-layer architecture with a Windows Forms-based user interface, a business logic layer (CapaNegocio), a data access layer (CapaDatos), and a back-end SQL Server database.
• The system is designed to manage product inventory, employee data, and inventory movements for a pharmacy.
File Structure
• Notice the separation into folders like CapaDatos and CapaNegocio that indicate a layered architecture.
• The presence of multiple “Sistema Inventario” files (including Windows Forms (.cs, .Designer.cs, .resx)) shows that the UI is implemented as a Windows Forms application.
• Database files and SQL scripts (e.g., DBInventario.mdf, SQL scripts for product/category/employee insertions) emphasize a reliance on SQL Server as the data store.
• There is also integration for reporting (with Microsoft ReportingServices packages) which should be shown as an external reporting component or service.
Main Components
a. Presentation Layer:
• Windows Forms User Interface – Screens, menus (Mantenimientos, Procesos, Consultas, Reportes, Seguridad).
• “form” elements such as Login, Bienvenida, Gestión de Productos, etc.
b. Business Logic Layer:
• CapaNegocio – Handles business rules and operations (validations, processing of inventory entries/exits, etc.).
c. Data Access Layer:
• CapaDatos – Manages CRUD operations, database connection logic (using InventarioConexion.cs and direct interactions with the SQL Server database).
d. Database:
• SQL Server database that stores entities: Productos, Empleados, Movimientos de Inventario, and Categorías.
e. External Services and Utilities:
• Reporting Services through Microsoft.ReportingServices.ReportViewer for generating detailed reports.
• SQL scripts and backup utilities that support security and data resilience (backups, copias de seguridad).
Relationships and Data Flow
• The UI communicates user actions (e.g., product registration, movements) to the Business Logic Layer.
• CapaNegocio processes the user input, applies the needed business rules and then calls the Data Access Layer.
• CapaDatos interacts with the SQL Server database using direct queries or stored procedures.
• For report generation, data is extracted perhaps through the business logic or directly via report components, and then formatted and displayed through the reporting tools.
• Bidirectional interactions where necessary (for example, confirmation messages flowing back from CapaNegocio to the UI).
Architectural Design Principles & Patterns
• Separation of Concerns: Clearly distinguish between presentation, business logic, and data access.
• External Dependencies: Highlight integration with SQL Server and reporting tools.
Final Touches
• Every component is detailed enough so that a principal software engineer can see the complete interaction flow.
¡Buena suerte con el diagrama y la presentación del sistema!