44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
--- ANTES/UserControl/DetalleEtapa.ascx.cs
|
|
+++ DESPUES/UserControl/DetalleEtapa.ascx.cs
|
|
@@ -328,7 +328,39 @@
|
|
return;
|
|
}
|
|
|
|
- GvTramites.DataSource = consulta.Data;
|
|
+ List<TramiteSolicitudModel> tramites =
|
|
+ consulta.Data ?? new List<TramiteSolicitudModel>();
|
|
+
|
|
+ foreach (TramiteSolicitudModel tramite in tramites)
|
|
+ {
|
|
+ var contexto = AppServices.TramiteSolicitudService
|
|
+ .ObtenerContextoCambioEstatus(
|
|
+ tramite.CveSolicitud,
|
|
+ CurrentUser.CveUsuario,
|
|
+ CurrentUser.NombreDominio);
|
|
+
|
|
+ if (!contexto.Success || contexto.Data == null)
|
|
+ {
|
|
+ Avisar(
|
|
+ contexto.Success
|
|
+ ? "No fue posible consultar los pendientes del trámite."
|
|
+ : contexto.UserMessage);
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ tramite.DocumentosPendientes =
|
|
+ (contexto.Data.Documentos ??
|
|
+ new List<SIG.Web.AppCode.Models.Documentos.TramiteDocumentoSolicitudModel>())
|
|
+ .Count(documento =>
|
|
+ documento.EsRequerido &&
|
|
+ (!documento.TieneArchivo || documento.FechaExpirada));
|
|
+
|
|
+ tramite.PagosPendientes =
|
|
+ (contexto.Data.Pagos ?? new List<ModeloPagoSolicitud>())
|
|
+ .Count(pago => pago.EstaPendiente);
|
|
+ }
|
|
+
|
|
+ GvTramites.DataSource = tramites;
|
|
GvTramites.DataBind();
|
|
}
|
|
|