示例#1
0
        public List <DetalleVehiculo> ObtenerInfoVehiculoDetalle(short IdEmpresa, DateTime?fechaInicio, DateTime?fechaFin)
        {
            List <DetalleVehiculo> lista = null;
            short valorDefecto           = 0;

            try
            {
                lista = (from t in context.SP_S_ReporteVehiculoDetalle(IdEmpresa, fechaInicio, fechaFin).ToList()
                         select new DetalleVehiculo()
                {
                    Descripcion = t.Constante,
                    Cantidad = t.Cantidad == null ? valorDefecto : (short)t.Cantidad,
                    MontoAsegurado = t.Importe
                }).ToList();
            }
            catch (Exception ex)
            {
                lista = null;
                throw ex;
            }

            return(lista);
        }