Пример #1
0
 public void Delete(HistorialViajes historial)
 {
     if (!string.IsNullOrEmpty(Convert.ToString(historial.Id)))
     {
         _crudFactory.Delete(historial);
     }
     else
     {
         throw new Exception();
     }
 }
Пример #2
0
        public EntidadBase BuildObject(Dictionary <string, object> row)
        {
            var historial = new HistorialViajes
            {
                Linea             = GetStringValue(row, DB_COL_LINEA),
                Tren              = GetStringValue(row, DB_COL_TREN),
                EstacionAnterior  = GetStringValue(row, DB_COL_ESTACION_ANTERIOR),
                EstacionSiguiente = GetStringValue(row, DB_COL_ESTACION_SIGUIENTE),
                TiempoEstimado    = GetStringValue(row, DB_COL_TIEMPO_ESTIMADO),
                Accion            = GetStringValue(row, DB_COL_ACCION),
                Fecha             = GetStringValue(row, DB_COL_FECHA)
            };

            return(historial);
        }
Пример #3
0
        public List <EntidadBase> BuildObjects(List <Dictionary <string, object> > lstRows)
        {
            var lstResults = new List <EntidadBase>();

            foreach (var row in lstRows)
            {
                var historial = new HistorialViajes
                {
                    Linea             = GetStringValue(row, DB_COL_LINEA),
                    Tren              = GetStringValue(row, DB_COL_TREN),
                    EstacionAnterior  = GetStringValue(row, DB_COL_ESTACION_ANTERIOR),
                    EstacionSiguiente = GetStringValue(row, DB_COL_ESTACION_SIGUIENTE),
                    TiempoEstimado    = GetStringValue(row, DB_COL_TIEMPO_ESTIMADO),
                    Accion            = GetStringValue(row, DB_COL_ACCION),
                    Fecha             = GetStringValue(row, DB_COL_FECHA)
                };

                lstResults.Add(historial);
            }

            return(lstResults);
        }