Ejemplo n.º 1
0
 public static void ParseToCommand(OleDbCommand Comando, Festivo festivo)
 {
     Comando.Parameters.AddWithValue("año", festivo.Año);
     Comando.Parameters.AddWithValue("fecha", festivo.Fecha.ToString("yyyy-MM-dd"));
     Comando.Parameters.AddWithValue("id", festivo.Id);
 }
Ejemplo n.º 2
0
        // ====================================================================================================
        #region MÉTODOS ESTÁTICOS
        // ====================================================================================================

        public static void ParseFromReader(OleDbDataReader lector, Festivo festivo)
        {
            festivo.Id    = lector.ToInt32("Id");
            festivo.Año   = lector.ToInt16("Año");
            festivo.Fecha = lector.ToDateTime("Fecha");
        }