Agregar archivos de proyecto.

This commit is contained in:
2025-12-25 09:54:32 -06:00
parent 42d745e5e1
commit be7d5ef10d
99 changed files with 85993 additions and 0 deletions

31
MieSystem/Data/Mapper.cs Normal file
View File

@@ -0,0 +1,31 @@
using MieSystem.Models;
namespace MieSystem.Data
{
public static class Mapper
{
public static Expediente MapFromDictionary(IDictionary<string, object> dict)
{
return new Expediente
{
Id = Convert.ToInt32(dict["id"]),
Nombre = dict["nombre"]?.ToString(),
Apellidos = dict["apellidos"]?.ToString(),
FechaNacimiento = Convert.ToDateTime(dict["fecha_nacimiento"]),
NombrePadre = dict["nombre_padre"]?.ToString(),
NombreMadre = dict["nombre_madre"]?.ToString(),
NombreResponsable = dict["nombre_responsable"]?.ToString(),
ParentescoResponsable = dict["parentesco_responsable"]?.ToString(),
Sexo = dict["sexo"]?.ToString(),
Direccion = dict["direccion"]?.ToString(),
Telefono = dict["telefono"]?.ToString(),
Observaciones = dict["observaciones"]?.ToString(),
FotoUrl = dict["foto_url"]?.ToString(),
FechaCreacion = Convert.ToDateTime(dict["fecha_creacion"]),
FechaActualizacion = Convert.ToDateTime(dict["fecha_actualizacion"]),
Activo = Convert.ToBoolean(dict["activo"])
};
}
}
}