public List<Evento> ObtenerListadoEventosEnvio(string tipoOperacion, int numeroEnvio, string sortExpression) { try { Pagos acceso = new Pagos(); ReporteEventosEnvio.PC_ReporteEventosEnvioDataTable datos = acceso.ReporteEventosEnvio(tipoOperacion, numeroEnvio, System.Web.HttpContext.Current.User.Identity.Name, System.Web.HttpContext.Current.Request.UserHostAddress); List<Evento> listadoEventos = null; if (datos != null && datos.Count > 0 && datos.Rows.Count > 0) { listadoEventos = (from ReporteEventosEnvio.PC_ReporteEventosEnvioRow row in datos.Rows select new Evento { Descripcion = row.DescripcionEvento, DireccionIP = row.DireccionIP, FechaRegistro = row.FechaEvento, Login = row.Login, NombreUsuario = row.IsNombreUsuarioNull() ? String.Empty : row.NombreUsuario, NumeroEnvio = row.IsNumeroEnvioNull() ? String.Empty : row.NumeroEnvio.ToString(), NumeroTransaccion = row.IsNumeroTransaccionNull() ? String.Empty : row.NumeroTransaccion.ToString(), TipoEvento = (EnumTipoEventoBitacora) row.TipoEvento, }).ToList(); } return listadoEventos; } catch (Exception) { throw; } }