avance y gisfail
This commit is contained in:
@@ -52,6 +52,7 @@ namespace SIG.Web.AppCode.Configuration
|
|||||||
"~/Metronic/assets/admin/layout/scripts/quick-sidebar.js",
|
"~/Metronic/assets/admin/layout/scripts/quick-sidebar.js",
|
||||||
"~/Metronic/assets/admin/layout/scripts/demo.js",
|
"~/Metronic/assets/admin/layout/scripts/demo.js",
|
||||||
"~/Scripts/porcentaje-box.js",
|
"~/Scripts/porcentaje-box.js",
|
||||||
|
"~/Scripts/BitacoraGrid.js",
|
||||||
"~/Scripts/DropdownGrid.js",
|
"~/Scripts/DropdownGrid.js",
|
||||||
"~/Scripts/UcBuscadorCatalogo.js",
|
"~/Scripts/UcBuscadorCatalogo.js",
|
||||||
"~/Scripts/SigPdfViewer.js",
|
"~/Scripts/SigPdfViewer.js",
|
||||||
@@ -110,6 +111,7 @@ namespace SIG.Web.AppCode.Configuration
|
|||||||
.Include("~/Metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css", new CssRewriteUrlTransform())
|
.Include("~/Metronic/assets/global/plugins/simple-line-icons/simple-line-icons.min.css", new CssRewriteUrlTransform())
|
||||||
.Include(
|
.Include(
|
||||||
"~/Styles/porcentaje-box.css",
|
"~/Styles/porcentaje-box.css",
|
||||||
|
"~/Styles/BitacoraGrid.css",
|
||||||
"~/Styles/DropdownGrid.css",
|
"~/Styles/DropdownGrid.css",
|
||||||
"~/Styles/UcBuscadorCatalogo.css",
|
"~/Styles/UcBuscadorCatalogo.css",
|
||||||
"~/Styles/Filtros.css",
|
"~/Styles/Filtros.css",
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ namespace SIG.Web.AppCode.Contracts.Bitacora
|
|||||||
BitacoraFiltroModel filtro,
|
BitacoraFiltroModel filtro,
|
||||||
int cveUsuarioEjecuta);
|
int cveUsuarioEjecuta);
|
||||||
|
|
||||||
|
DbResult<ResultadoPaginado<BitacoraModel>> ConsultarResumen(
|
||||||
|
BitacoraConsultaModel consulta,
|
||||||
|
int cveUsuarioEjecuta);
|
||||||
|
|
||||||
DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
||||||
BitacoraConsultaModel consulta,
|
BitacoraConsultaModel consulta,
|
||||||
int cveUsuarioEjecuta);
|
int cveUsuarioEjecuta);
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ namespace SIG.Web.AppCode.Contracts.Bitacora
|
|||||||
|
|
||||||
DbResult<List<BitacoraModel>> Listar(BitacoraFiltroModel filtro);
|
DbResult<List<BitacoraModel>> Listar(BitacoraFiltroModel filtro);
|
||||||
|
|
||||||
|
DbResult<ResultadoPaginado<BitacoraModel>> ConsultarResumen(
|
||||||
|
BitacoraConsultaModel consulta);
|
||||||
|
|
||||||
DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
||||||
BitacoraConsultaModel consulta);
|
BitacoraConsultaModel consulta);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,100 @@ namespace SIG.Web.AppCode.Repositories.Bitacora
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DbResult<ResultadoPaginado<BitacoraModel>> ConsultarResumen(
|
||||||
|
BitacoraConsultaModel consulta,
|
||||||
|
int cveUsuarioEjecuta)
|
||||||
|
{
|
||||||
|
int registrosOmitidos = checked(
|
||||||
|
(consulta.Pagina - 1) * consulta.RegistrosPorPagina);
|
||||||
|
|
||||||
|
return _dbExecutor.Execute(BitacoraDomain, connection =>
|
||||||
|
{
|
||||||
|
using (IDbCommand command = connection.CreateCommand())
|
||||||
|
{
|
||||||
|
StoredProcedureCommand.Configure(
|
||||||
|
command,
|
||||||
|
"dbo.PA_Bit_BitacoraListByRelations",
|
||||||
|
cveUsuarioEjecuta);
|
||||||
|
|
||||||
|
StoredProcedureCommand.AddInput(
|
||||||
|
command,
|
||||||
|
"@RelacionesXml",
|
||||||
|
SerializeFilters(consulta.Filtros),
|
||||||
|
DbType.Xml);
|
||||||
|
StoredProcedureCommand.AddInput(
|
||||||
|
command,
|
||||||
|
"@RelacionesMostrarXml",
|
||||||
|
SerializeRelationsToShow(
|
||||||
|
consulta.RelacionesMostrar),
|
||||||
|
DbType.Xml);
|
||||||
|
StoredProcedureCommand.AddInput(
|
||||||
|
command,
|
||||||
|
"@RegistrosOmitidos",
|
||||||
|
registrosOmitidos,
|
||||||
|
DbType.Int32);
|
||||||
|
StoredProcedureCommand.AddInput(
|
||||||
|
command,
|
||||||
|
"@RegistrosPorPagina",
|
||||||
|
consulta.RegistrosPorPagina,
|
||||||
|
DbType.Int32);
|
||||||
|
|
||||||
|
int totalRegistros = 0;
|
||||||
|
var bitacoras = new List<BitacoraModel>();
|
||||||
|
var relacionesMostrar =
|
||||||
|
new List<BitacoraRelacionValorModel>();
|
||||||
|
|
||||||
|
using (IDataReader reader = command.ExecuteReader())
|
||||||
|
{
|
||||||
|
if (reader.Read() && !reader.IsDBNull(0))
|
||||||
|
{
|
||||||
|
totalRegistros = reader.GetInt32(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reader.NextResult())
|
||||||
|
{
|
||||||
|
bitacoras = reader.ToList<BitacoraModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// El procedimiento actual devuelve Campos y Relaciones
|
||||||
|
// antes de RelacionesMostrar. En el resumen se omiten
|
||||||
|
// ambos result sets para no materializar el detalle.
|
||||||
|
if (reader.NextResult())
|
||||||
|
{
|
||||||
|
// Campos: se descartan en el listado.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reader.NextResult())
|
||||||
|
{
|
||||||
|
// Relaciones internas: se descartan en el listado.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reader.NextResult())
|
||||||
|
{
|
||||||
|
relacionesMostrar =
|
||||||
|
reader.ToList<BitacoraRelacionValorModel>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StoredProcedureCommand.EnsureSuccess(command);
|
||||||
|
AsociarRelacionesMostrar(
|
||||||
|
bitacoras,
|
||||||
|
relacionesMostrar);
|
||||||
|
|
||||||
|
return new ResultadoPaginado<BitacoraModel>
|
||||||
|
{
|
||||||
|
Registros = bitacoras,
|
||||||
|
Pagina = consulta.Pagina,
|
||||||
|
RegistrosPorPagina = consulta.RegistrosPorPagina,
|
||||||
|
TotalRegistros = totalRegistros,
|
||||||
|
TotalPaginas = (int)Math.Ceiling(
|
||||||
|
totalRegistros /
|
||||||
|
(decimal)consulta.RegistrosPorPagina)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
public DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
||||||
BitacoraConsultaModel consulta,
|
BitacoraConsultaModel consulta,
|
||||||
int cveUsuarioEjecuta)
|
int cveUsuarioEjecuta)
|
||||||
@@ -269,6 +363,28 @@ namespace SIG.Web.AppCode.Repositories.Bitacora
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AsociarRelacionesMostrar(
|
||||||
|
IEnumerable<BitacoraModel> bitacoras,
|
||||||
|
IEnumerable<BitacoraRelacionValorModel> relacionesMostrar)
|
||||||
|
{
|
||||||
|
IDictionary<long, BitacoraModel> bitacorasPorClave =
|
||||||
|
bitacoras.ToDictionary(
|
||||||
|
bitacora => bitacora.CveBitacora);
|
||||||
|
|
||||||
|
foreach (BitacoraRelacionValorModel relacion
|
||||||
|
in relacionesMostrar)
|
||||||
|
{
|
||||||
|
BitacoraModel bitacora;
|
||||||
|
|
||||||
|
if (bitacorasPorClave.TryGetValue(
|
||||||
|
relacion.CveBitacora,
|
||||||
|
out bitacora))
|
||||||
|
{
|
||||||
|
bitacora.RelacionesMostrar.Add(relacion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void AsociarResultados(
|
private static void AsociarResultados(
|
||||||
IEnumerable<BitacoraModel> bitacoras,
|
IEnumerable<BitacoraModel> bitacoras,
|
||||||
IEnumerable<BitacoraCampoModel> campos,
|
IEnumerable<BitacoraCampoModel> campos,
|
||||||
|
|||||||
@@ -70,6 +70,45 @@ namespace SIG.Web.AppCode.Services.Bitacora
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DbResult<ResultadoPaginado<BitacoraModel>> ConsultarResumen(
|
||||||
|
BitacoraConsultaModel consulta)
|
||||||
|
{
|
||||||
|
string validationMessage = ValidarConsulta(consulta);
|
||||||
|
|
||||||
|
if (validationMessage != null)
|
||||||
|
{
|
||||||
|
return Fail<ResultadoPaginado<BitacoraModel>>(
|
||||||
|
validationMessage);
|
||||||
|
}
|
||||||
|
|
||||||
|
BitacoraContextoModel contexto = _contextoProvider.Obtener();
|
||||||
|
|
||||||
|
if (contexto.CveUsuarioEjecuta <= 0)
|
||||||
|
{
|
||||||
|
return Fail<ResultadoPaginado<BitacoraModel>>(
|
||||||
|
"No existe un usuario autenticado para consultar la bitácora.");
|
||||||
|
}
|
||||||
|
|
||||||
|
BitacoraConsultaModel consultaNormalizada =
|
||||||
|
NormalizarConsulta(consulta);
|
||||||
|
|
||||||
|
using (var scope = new TransactionLogic(
|
||||||
|
TransactionScopeOption.Suppress))
|
||||||
|
{
|
||||||
|
DbResult<ResultadoPaginado<BitacoraModel>> result =
|
||||||
|
_repository.ConsultarResumen(
|
||||||
|
consultaNormalizada,
|
||||||
|
contexto.CveUsuarioEjecuta);
|
||||||
|
|
||||||
|
if (result.Success)
|
||||||
|
{
|
||||||
|
scope.Commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
public DbResult<ResultadoPaginado<BitacoraModel>> Consultar(
|
||||||
BitacoraConsultaModel consulta)
|
BitacoraConsultaModel consulta)
|
||||||
{
|
{
|
||||||
|
|||||||
1306
SIG.Web/App_Code/SigControls/BitacoraGrid.cs
Normal file
1306
SIG.Web/App_Code/SigControls/BitacoraGrid.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,9 +9,6 @@
|
|||||||
<link href='<%= ResolveUrl("~/Styles/FraccionamientoDetalle.css?v=20260814-5") %>'
|
<link href='<%= ResolveUrl("~/Styles/FraccionamientoDetalle.css?v=20260814-5") %>'
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css" />
|
type="text/css" />
|
||||||
<link href='<%= ResolveUrl("~/Styles/BitacoraFeed.css?v=20260814-4") %>'
|
|
||||||
rel="stylesheet"
|
|
||||||
type="text/css" />
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="ContentActions" ContentPlaceHolderID="A" runat="server">
|
<asp:Content ID="ContentActions" ContentPlaceHolderID="A" runat="server">
|
||||||
@@ -652,201 +649,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section class="fraction-log-card"
|
<sig:BitacoraGrid ID="UcBitacoraDetalle"
|
||||||
aria-labelledby="TituloBitacoraDetalle">
|
runat="server"
|
||||||
<div class="fraction-card-heading">
|
Titulo="Bitácora"
|
||||||
<h3 id="TituloBitacoraDetalle">
|
Descripcion="Historial del fraccionamiento, sus etapas y lotes"
|
||||||
<i class="fa fa-book" aria-hidden="true"></i>
|
TextoVacio="No hay movimientos registrados para este fraccionamiento."
|
||||||
Bitácora
|
RegistrosPorPagina="20"
|
||||||
</h3>
|
ScrollsParaCambiarPagina="3" />
|
||||||
<span class="sig-bitacora-heading-note">
|
|
||||||
Historial del fraccionamiento, sus etapas y lotes
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpBitacoraDetalle"
|
|
||||||
runat="server"
|
|
||||||
UpdateMode="Conditional"
|
|
||||||
ChildrenAsTriggers="false">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="sig-bitacora-feed js-sig-bitacora">
|
|
||||||
<asp:Panel ID="PnlBitacoraDetalleError"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-state is-error"
|
|
||||||
role="alert"
|
|
||||||
aria-live="assertive"
|
|
||||||
Visible="false">
|
|
||||||
<i class="fa fa-exclamation-circle"></i>
|
|
||||||
<asp:Label ID="LblBitacoraDetalleError"
|
|
||||||
runat="server" />
|
|
||||||
</asp:Panel>
|
|
||||||
|
|
||||||
<asp:Panel ID="PnlBitacoraDetalleVacia"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-state"
|
|
||||||
role="status"
|
|
||||||
aria-live="polite"
|
|
||||||
Visible="false">
|
|
||||||
<i class="fa fa-book"></i>
|
|
||||||
<p>No hay movimientos registrados para este fraccionamiento.</p>
|
|
||||||
</asp:Panel>
|
|
||||||
|
|
||||||
<asp:Repeater ID="RptBitacoraDetalle"
|
|
||||||
runat="server">
|
|
||||||
<HeaderTemplate>
|
|
||||||
<div class="sig-bitacora-list" role="list">
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<article class='<%# GetBitacoraItemCss(Eval("CveTipoMovimiento"), Eval("DescripcionMovimiento")) %>'
|
|
||||||
role="listitem">
|
|
||||||
<div class="sig-bitacora-row"
|
|
||||||
data-has-relations='<%# Convert.ToBoolean(Eval("TieneRelacionesMostrar")) ? "1" : "0" %>'>
|
|
||||||
<span class="sig-bitacora-icon sig-bitacora-movement-icon" aria-hidden="true">
|
|
||||||
<i class='<%# GetBitacoraIconCss(Eval("CveTipoMovimiento"), Eval("DescripcionMovimiento")) %>'></i>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-entity">
|
|
||||||
<small class="sig-bitacora-column-label">Entidad</small>
|
|
||||||
<strong class="sig-bitacora-entity-name"><%#: Eval("NombreTabla") %></strong>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-action">
|
|
||||||
<strong class="sig-bitacora-action-title"><%#: GetBitacoraActionText(Eval("NombreAccion"), Eval("TipoMovimiento")) %></strong>
|
|
||||||
<span class="sig-bitacora-action-description"><%#: Eval("DescripcionMovimiento") %></span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<asp:PlaceHolder ID="PhRelacionesDetalle"
|
|
||||||
runat="server"
|
|
||||||
Visible='<%# Eval("TieneRelacionesMostrar") %>'>
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-relations">
|
|
||||||
<span class="sig-bitacora-relation-list">
|
|
||||||
<asp:Repeater ID="RptRelacionesDetalle"
|
|
||||||
runat="server"
|
|
||||||
DataSource='<%# Eval("RelacionesMostrar") %>'>
|
|
||||||
<ItemTemplate>
|
|
||||||
<span class="sig-bitacora-relation-entry">
|
|
||||||
<small class="sig-bitacora-column-label"><%#: Eval("NombreCampo") %></small>
|
|
||||||
<span class="sig-bitacora-relation">
|
|
||||||
<strong><%#: Eval("ValorMostrar") %></strong>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</asp:PlaceHolder>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-user">
|
|
||||||
<i class="fa fa-user" aria-hidden="true"></i>
|
|
||||||
<span><%#: Eval("NombreUsuarioEjecuta") %></span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-date">
|
|
||||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
||||||
<time datetime='<%# Eval("FechaMovimiento", "{0:yyyy-MM-ddTHH:mm:ss}") %>'>
|
|
||||||
<%#: Eval("FechaMovimiento", "{0:dd/MM/yyyy HH:mm}") %>
|
|
||||||
</time>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<button type="button"
|
|
||||||
id='BitacoraDetalleResumen-<%# Eval("CveBitacora") %>'
|
|
||||||
class="sig-bitacora-detail-toggle js-sig-bitacora-toggle"
|
|
||||||
title="Mostrar el detalle del movimiento"
|
|
||||||
aria-expanded="false"
|
|
||||||
aria-controls='BitacoraDetalleMovimiento-<%# Eval("CveBitacora") %>'>
|
|
||||||
<span class="sig-bitacora-detail-toggle-label">Ver detalle</span>
|
|
||||||
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id='BitacoraDetalleMovimiento-<%# Eval("CveBitacora") %>'
|
|
||||||
class="sig-bitacora-details"
|
|
||||||
role="region"
|
|
||||||
aria-labelledby='BitacoraDetalleResumen-<%# Eval("CveBitacora") %>'
|
|
||||||
aria-hidden="true"
|
|
||||||
hidden>
|
|
||||||
<div class="sig-bitacora-details-heading">
|
|
||||||
<strong>Detalle del movimiento</strong>
|
|
||||||
<span>Clave de bitácora <%#: Eval("CveBitacora") %></span>
|
|
||||||
</div>
|
|
||||||
<div class="sig-bitacora-details-table-wrap">
|
|
||||||
<table class="table table-hover sig-bitacora-details-table">
|
|
||||||
<caption class="sig-visually-hidden">
|
|
||||||
Campos modificados en este movimiento
|
|
||||||
</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Campo</th>
|
|
||||||
<th scope="col">Valor anterior</th>
|
|
||||||
<th scope="col">Valor nuevo</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<asp:Repeater ID="RptCamposDetalle"
|
|
||||||
runat="server"
|
|
||||||
DataSource='<%# Eval("Campos") %>'>
|
|
||||||
<ItemTemplate>
|
|
||||||
<tr>
|
|
||||||
<td class="sig-bitacora-field-name"><%#: Eval("NombreMostrar") %></td>
|
|
||||||
<td class="sig-bitacora-old-value"><%#: GetBitacoraValue(Eval("ValorAnteriorMostrar"), Eval("ValorAnterior"), Eval("NombreCampoSQL")) %></td>
|
|
||||||
<td class="sig-bitacora-new-value"><%#: GetBitacoraValue(Eval("ValorNuevoMostrar"), Eval("ValorNuevo"), Eval("NombreCampoSQL")) %></td>
|
|
||||||
</tr>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</ItemTemplate>
|
|
||||||
<FooterTemplate>
|
|
||||||
</div>
|
|
||||||
</FooterTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
|
|
||||||
<asp:Panel ID="PnlBitacoraDetallePaginacion"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-pager"
|
|
||||||
role="navigation"
|
|
||||||
aria-label="Paginación de la bitácora"
|
|
||||||
Visible="false">
|
|
||||||
<asp:LinkButton ID="BtnBitacoraDetalleAnterior"
|
|
||||||
runat="server"
|
|
||||||
CssClass="btn btn-default sig-bitacora-page-link sig-bitacora-page-previous"
|
|
||||||
CausesValidation="false"
|
|
||||||
OnClick="BtnBitacoraDetalleAnterior_Click">
|
|
||||||
<i class="fa fa-chevron-left" aria-hidden="true"></i>
|
|
||||||
Anterior
|
|
||||||
</asp:LinkButton>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-page-summary"
|
|
||||||
role="status"
|
|
||||||
aria-live="polite">
|
|
||||||
<asp:Literal ID="LitBitacoraDetallePaginacion"
|
|
||||||
runat="server" />
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<asp:LinkButton ID="BtnBitacoraDetalleSiguiente"
|
|
||||||
runat="server"
|
|
||||||
CssClass="btn btn-default sig-bitacora-page-link sig-bitacora-page-next"
|
|
||||||
CausesValidation="false"
|
|
||||||
OnClick="BtnBitacoraDetalleSiguiente_Click">
|
|
||||||
Siguiente
|
|
||||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</asp:Panel>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
<Triggers>
|
|
||||||
<asp:AsyncPostBackTrigger
|
|
||||||
ControlID="BtnBitacoraDetalleAnterior"
|
|
||||||
EventName="Click" />
|
|
||||||
<asp:AsyncPostBackTrigger
|
|
||||||
ControlID="BtnBitacoraDetalleSiguiente"
|
|
||||||
EventName="Click" />
|
|
||||||
</Triggers>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div id="ModalEditDevelopment"
|
<div id="ModalEditDevelopment"
|
||||||
class="modal fade fraction-modal"
|
class="modal fade fraction-modal"
|
||||||
@@ -1491,8 +1300,6 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="ContentScripts" ContentPlaceHolderID="J" runat="server">
|
<asp:Content ID="ContentScripts" ContentPlaceHolderID="J" runat="server">
|
||||||
<script src='<%= ResolveUrl("~/Scripts/BitacoraFeed.js?v=20260814-3") %>'
|
|
||||||
type="text/javascript"></script>
|
|
||||||
<script>
|
<script>
|
||||||
window.SIGDetail = window.SIGDetail || {};
|
window.SIGDetail = window.SIGDetail || {};
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
public partial class FraccionamientoDetalle : ClsPaginaBase
|
public partial class FraccionamientoDetalle : ClsPaginaBase
|
||||||
{
|
{
|
||||||
private const string EmptyDisplayValue = "—";
|
private const string EmptyDisplayValue = "—";
|
||||||
private const int RegistrosBitacoraPorPagina = 10;
|
|
||||||
|
|
||||||
#region "Propiedades"
|
#region "Propiedades"
|
||||||
private int CveFraccionamientoActual
|
private int CveFraccionamientoActual
|
||||||
@@ -147,20 +146,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int PaginaBitacoraDetalle
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ViewState["PaginaBitacoraDetalle"] == null
|
|
||||||
? 1
|
|
||||||
: (int)ViewState["PaginaBitacoraDetalle"];
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ViewState["PaginaBitacoraDetalle"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -197,28 +182,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
BindBitacoraDetalle();
|
BindBitacoraDetalle();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnBitacoraDetalleAnterior_Click(
|
|
||||||
object sender,
|
|
||||||
EventArgs e)
|
|
||||||
{
|
|
||||||
if (PaginaBitacoraDetalle > 1)
|
|
||||||
{
|
|
||||||
PaginaBitacoraDetalle--;
|
|
||||||
}
|
|
||||||
|
|
||||||
BindBitacoraDetalle();
|
|
||||||
UpBitacoraDetalle.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void BtnBitacoraDetalleSiguiente_Click(
|
|
||||||
object sender,
|
|
||||||
EventArgs e)
|
|
||||||
{
|
|
||||||
PaginaBitacoraDetalle++;
|
|
||||||
BindBitacoraDetalle();
|
|
||||||
UpBitacoraDetalle.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void BtnSave_Click(object sender, EventArgs e)
|
protected void BtnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
decimal? hectares;
|
decimal? hectares;
|
||||||
@@ -838,92 +801,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
"%;";
|
"%;";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string GetBitacoraItemCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
return "sig-bitacora-item " + GetBitacoraMovementCss(
|
|
||||||
cveTipoMovimientoValue,
|
|
||||||
descripcionValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraIconCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
string movementCss = GetBitacoraMovementCss(
|
|
||||||
cveTipoMovimientoValue,
|
|
||||||
descripcionValue);
|
|
||||||
|
|
||||||
switch (movementCss)
|
|
||||||
{
|
|
||||||
case "is-added":
|
|
||||||
return "fa fa-plus";
|
|
||||||
case "is-deleted":
|
|
||||||
return "fa fa-trash-o";
|
|
||||||
case "is-enabled":
|
|
||||||
return "fa fa-check";
|
|
||||||
case "is-disabled":
|
|
||||||
return "fa fa-ban";
|
|
||||||
default:
|
|
||||||
return "fa fa-pencil";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraActionText(
|
|
||||||
object nombreAccionValue,
|
|
||||||
object tipoMovimientoValue)
|
|
||||||
{
|
|
||||||
string nombreAccion = Convert.ToString(nombreAccionValue);
|
|
||||||
|
|
||||||
return string.IsNullOrWhiteSpace(nombreAccion)
|
|
||||||
? Convert.ToString(tipoMovimientoValue)
|
|
||||||
: nombreAccion;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraValue(
|
|
||||||
object displayValue,
|
|
||||||
object rawValue,
|
|
||||||
object fieldNameValue)
|
|
||||||
{
|
|
||||||
string display = Convert.ToString(displayValue);
|
|
||||||
string fieldName = Convert.ToString(fieldNameValue);
|
|
||||||
string valueToDisplay = string.IsNullOrWhiteSpace(display)
|
|
||||||
? Convert.ToString(rawValue)
|
|
||||||
: display;
|
|
||||||
|
|
||||||
if (IsBooleanAuditField(fieldName))
|
|
||||||
{
|
|
||||||
if (valueToDisplay == "1")
|
|
||||||
{
|
|
||||||
return "Sí";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (valueToDisplay == "0")
|
|
||||||
{
|
|
||||||
return "No";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(display))
|
|
||||||
{
|
|
||||||
return display;
|
|
||||||
}
|
|
||||||
|
|
||||||
string raw = valueToDisplay;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(raw))
|
|
||||||
{
|
|
||||||
return EmptyDisplayValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
return fieldName.StartsWith(
|
|
||||||
"Cve",
|
|
||||||
StringComparison.OrdinalIgnoreCase)
|
|
||||||
? "(" + raw + ") Eliminada"
|
|
||||||
: raw;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DeleteStage(int cveFraccionamientoEtapa)
|
private void DeleteStage(int cveFraccionamientoEtapa)
|
||||||
{
|
{
|
||||||
DbResult<bool> result =
|
DbResult<bool> result =
|
||||||
@@ -1152,11 +1029,8 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
|
|
||||||
private void BindBitacoraDetalle()
|
private void BindBitacoraDetalle()
|
||||||
{
|
{
|
||||||
var consulta = new BitacoraConsultaModel
|
UcBitacoraDetalle.ConfigurarConsulta(
|
||||||
{
|
new List<BitacoraCampoFiltroModel>
|
||||||
Pagina = PaginaBitacoraDetalle,
|
|
||||||
RegistrosPorPagina = RegistrosBitacoraPorPagina,
|
|
||||||
Filtros = new List<BitacoraCampoFiltroModel>
|
|
||||||
{
|
{
|
||||||
new BitacoraCampoFiltroModel
|
new BitacoraCampoFiltroModel
|
||||||
{
|
{
|
||||||
@@ -1166,7 +1040,7 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
CultureInfo.InvariantCulture)
|
CultureInfo.InvariantCulture)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RelacionesMostrar = new List<BitacoraRelacionMostrarModel>
|
new List<BitacoraRelacionMostrarModel>
|
||||||
{
|
{
|
||||||
new BitacoraRelacionMostrarModel
|
new BitacoraRelacionMostrarModel
|
||||||
{
|
{
|
||||||
@@ -1180,119 +1054,14 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
NombreTablaSQL = "FraccionamientosEtapas",
|
NombreTablaSQL = "FraccionamientosEtapas",
|
||||||
NombreCampoMostrarSQL = "Etapa"
|
NombreCampoMostrarSQL = "Etapa"
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
|
||||||
DbResult<ResultadoPaginado<BitacoraModel>> result =
|
UcBitacoraDetalle.Consultar(true);
|
||||||
AppServices.BitacoraService.Consultar(consulta);
|
|
||||||
|
|
||||||
if (!result.Success)
|
|
||||||
{
|
|
||||||
BindBitacoraDetalleError(result.UserMessage);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ResultadoPaginado<BitacoraModel> pagina = result.Data ??
|
|
||||||
new ResultadoPaginado<BitacoraModel>
|
|
||||||
{
|
|
||||||
Pagina = PaginaBitacoraDetalle,
|
|
||||||
RegistrosPorPagina = RegistrosBitacoraPorPagina
|
|
||||||
};
|
|
||||||
|
|
||||||
PaginaBitacoraDetalle = pagina.Pagina;
|
|
||||||
RptBitacoraDetalle.DataSource = pagina.Registros;
|
|
||||||
RptBitacoraDetalle.DataBind();
|
|
||||||
|
|
||||||
PnlBitacoraDetalleError.Visible = false;
|
|
||||||
LblBitacoraDetalleError.Text = string.Empty;
|
|
||||||
PnlBitacoraDetalleVacia.Visible =
|
|
||||||
pagina.TotalRegistros == 0;
|
|
||||||
PnlBitacoraDetallePaginacion.Visible =
|
|
||||||
pagina.TotalRegistros > 0;
|
|
||||||
BtnBitacoraDetalleAnterior.Visible = pagina.Pagina > 1;
|
|
||||||
BtnBitacoraDetalleSiguiente.Visible =
|
|
||||||
pagina.Pagina < pagina.TotalPaginas;
|
|
||||||
LitBitacoraDetallePaginacion.Text = string.Format(
|
|
||||||
CultureInfo.CurrentCulture,
|
|
||||||
"Página {0} de {1} · {2} movimientos",
|
|
||||||
pagina.Pagina,
|
|
||||||
Math.Max(pagina.TotalPaginas, 1),
|
|
||||||
pagina.TotalRegistros);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BindBitacoraDetalleError(string message)
|
|
||||||
{
|
|
||||||
RptBitacoraDetalle.DataSource = new List<BitacoraModel>();
|
|
||||||
RptBitacoraDetalle.DataBind();
|
|
||||||
PnlBitacoraDetalleError.Visible = true;
|
|
||||||
LblBitacoraDetalleError.Text = Server.HtmlEncode(
|
|
||||||
string.IsNullOrWhiteSpace(message)
|
|
||||||
? "No fue posible consultar la bitácora."
|
|
||||||
: message);
|
|
||||||
PnlBitacoraDetalleVacia.Visible = false;
|
|
||||||
PnlBitacoraDetallePaginacion.Visible = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RefreshBitacoraDetalle()
|
private void RefreshBitacoraDetalle()
|
||||||
{
|
{
|
||||||
PaginaBitacoraDetalle = 1;
|
UcBitacoraDetalle.Refrescar();
|
||||||
BindBitacoraDetalle();
|
|
||||||
UpBitacoraDetalle.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetBitacoraMovementCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
string description = Convert.ToString(descripcionValue);
|
|
||||||
|
|
||||||
if (description.IndexOf(
|
|
||||||
"desactiv",
|
|
||||||
StringComparison.OrdinalIgnoreCase) >= 0)
|
|
||||||
{
|
|
||||||
return "is-disabled";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (description.IndexOf(
|
|
||||||
"activ",
|
|
||||||
StringComparison.OrdinalIgnoreCase) >= 0)
|
|
||||||
{
|
|
||||||
return "is-enabled";
|
|
||||||
}
|
|
||||||
|
|
||||||
byte cveTipoMovimiento;
|
|
||||||
byte.TryParse(
|
|
||||||
Convert.ToString(cveTipoMovimientoValue),
|
|
||||||
out cveTipoMovimiento);
|
|
||||||
|
|
||||||
switch ((BitacoraTipoMovimiento)cveTipoMovimiento)
|
|
||||||
{
|
|
||||||
case BitacoraTipoMovimiento.Agregado:
|
|
||||||
return "is-added";
|
|
||||||
case BitacoraTipoMovimiento.Eliminado:
|
|
||||||
return "is-deleted";
|
|
||||||
default:
|
|
||||||
return "is-edited";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsBooleanAuditField(string fieldName)
|
|
||||||
{
|
|
||||||
return fieldName.Equals(
|
|
||||||
"Activo",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.Equals(
|
|
||||||
"EsActivo",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.Equals(
|
|
||||||
"EsPrincipal",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.StartsWith(
|
|
||||||
"Debe",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.StartsWith(
|
|
||||||
"CorreoVerificado",
|
|
||||||
StringComparison.OrdinalIgnoreCase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static decimal NormalizeProgress(object progressValue)
|
private static decimal NormalizeProgress(object progressValue)
|
||||||
|
|||||||
@@ -772,52 +772,12 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Button BtnSaveLot;
|
protected global::System.Web.UI.WebControls.Button BtnSaveLot;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UpBitacoraDetalle control.
|
/// UcBitacoraDetalle control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Auto-generated field.
|
/// Auto-generated field.
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.UpdatePanel UpBitacoraDetalle;
|
protected global::SIG.Web.AppCode.SigControls.BitacoraGrid UcBitacoraDetalle;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraDetalleError control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraDetalleError;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// LblBitacoraDetalleError control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Label LblBitacoraDetalleError;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraDetalleVacia control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraDetalleVacia;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// RptBitacoraDetalle control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Repeater RptBitacoraDetalle;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraDetallePaginacion control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraDetallePaginacion;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BtnBitacoraDetalleAnterior control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.LinkButton BtnBitacoraDetalleAnterior;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// LitBitacoraDetallePaginacion control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Literal LitBitacoraDetallePaginacion;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BtnBitacoraDetalleSiguiente control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.LinkButton BtnBitacoraDetalleSiguiente;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<%@ Page Title="Catálogo de fraccionamientos" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Fraccionamientos.aspx.cs" Inherits="SIG.Web.Pages.Fraccionamientos.Fraccionamientos" %>
|
<%@ Page Title="Catálogo de fraccionamientos" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Fraccionamientos.aspx.cs" Inherits="SIG.Web.Pages.Fraccionamientos.Fraccionamientos" %>
|
||||||
|
|
||||||
<asp:Content ID="ContentHead" ContentPlaceHolderID="H" runat="server">
|
<asp:Content ID="ContentHead" ContentPlaceHolderID="H" runat="server">
|
||||||
<link href='<%= ResolveUrl("~/Styles/BitacoraFeed.css?v=20260814-4") %>'
|
|
||||||
rel="stylesheet"
|
|
||||||
type="text/css" />
|
|
||||||
<style>
|
<style>
|
||||||
.sig-indicators {
|
.sig-indicators {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -285,225 +282,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section class="sig-bitacora-card sig-bitacora-section"
|
<sig:BitacoraGrid ID="UcBitacoraCatalogo"
|
||||||
aria-labelledby="TituloBitacoraCatalogo">
|
runat="server"
|
||||||
<asp:UpdatePanel ID="UpBitacoraCatalogo"
|
Titulo="Bitácora"
|
||||||
runat="server"
|
Descripcion="Historial de los fraccionamientos a los que tiene acceso"
|
||||||
UpdateMode="Conditional"
|
TextoVacio="No hay movimientos registrados para los fraccionamientos disponibles."
|
||||||
ChildrenAsTriggers="false">
|
RegistrosPorPagina="20"
|
||||||
<ContentTemplate>
|
ScrollsParaCambiarPagina="3"
|
||||||
<div class="sig-bitacora-header">
|
AccionTexto="Ver toda"
|
||||||
<h3 id="TituloBitacoraCatalogo"
|
OnAccionClick="UcBitacoraCatalogo_AccionClick" />
|
||||||
class="sig-bitacora-heading">
|
|
||||||
<i class="fa fa-book sig-bitacora-heading-icon"
|
|
||||||
aria-hidden="true"></i>
|
|
||||||
Bitácora
|
|
||||||
</h3>
|
|
||||||
<div class="sig-bitacora-header-actions">
|
|
||||||
<span class="sig-bitacora-heading-note">
|
|
||||||
Historial de los fraccionamientos a los que tiene acceso
|
|
||||||
<strong>
|
|
||||||
<asp:Literal ID="LitBitacoraFraccionamiento"
|
|
||||||
runat="server" />
|
|
||||||
</strong>
|
|
||||||
</span>
|
|
||||||
<asp:LinkButton ID="BtnBitacoraVerToda"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-view-all"
|
|
||||||
CausesValidation="false"
|
|
||||||
Visible="false"
|
|
||||||
OnClick="BtnBitacoraVerToda_Click">
|
|
||||||
Ver toda
|
|
||||||
</asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sig-bitacora-feed js-sig-bitacora">
|
|
||||||
<asp:Panel ID="PnlBitacoraCatalogoError"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-state is-error"
|
|
||||||
role="alert"
|
|
||||||
aria-live="assertive"
|
|
||||||
Visible="false">
|
|
||||||
<i class="fa fa-exclamation-circle"></i>
|
|
||||||
<asp:Label ID="LblBitacoraCatalogoError"
|
|
||||||
runat="server" />
|
|
||||||
</asp:Panel>
|
|
||||||
|
|
||||||
<asp:Panel ID="PnlBitacoraCatalogoVacia"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-state"
|
|
||||||
role="status"
|
|
||||||
aria-live="polite"
|
|
||||||
Visible="false">
|
|
||||||
<i class="fa fa-book"></i>
|
|
||||||
<p>No hay movimientos registrados para los fraccionamientos disponibles.</p>
|
|
||||||
</asp:Panel>
|
|
||||||
|
|
||||||
<asp:Repeater ID="RptBitacoraCatalogo"
|
|
||||||
runat="server">
|
|
||||||
<HeaderTemplate>
|
|
||||||
<div class="sig-bitacora-list" role="list">
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<article class='<%# GetBitacoraItemCss(Eval("CveTipoMovimiento"), Eval("DescripcionMovimiento")) %>'
|
|
||||||
role="listitem">
|
|
||||||
<div class="sig-bitacora-row"
|
|
||||||
data-has-relations='<%# Convert.ToBoolean(Eval("TieneRelacionesMostrar")) ? "1" : "0" %>'>
|
|
||||||
<span class="sig-bitacora-icon sig-bitacora-movement-icon" aria-hidden="true">
|
|
||||||
<i class='<%# GetBitacoraIconCss(Eval("CveTipoMovimiento"), Eval("DescripcionMovimiento")) %>'></i>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-entity">
|
|
||||||
<small class="sig-bitacora-column-label">Entidad</small>
|
|
||||||
<strong class="sig-bitacora-entity-name"><%#: Eval("NombreTabla") %></strong>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-action">
|
|
||||||
<strong class="sig-bitacora-action-title"><%#: GetBitacoraActionText(Eval("NombreAccion"), Eval("TipoMovimiento")) %></strong>
|
|
||||||
<span class="sig-bitacora-action-description"><%#: Eval("DescripcionMovimiento") %></span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<asp:PlaceHolder ID="PhRelacionesCatalogo"
|
|
||||||
runat="server"
|
|
||||||
Visible='<%# Eval("TieneRelacionesMostrar") %>'>
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-relations">
|
|
||||||
<span class="sig-bitacora-relation-list">
|
|
||||||
<asp:Repeater ID="RptRelacionesCatalogo"
|
|
||||||
runat="server"
|
|
||||||
DataSource='<%# Eval("RelacionesMostrar") %>'>
|
|
||||||
<ItemTemplate>
|
|
||||||
<span class="sig-bitacora-relation-entry">
|
|
||||||
<small class="sig-bitacora-column-label"><%#: Eval("NombreCampo") %></small>
|
|
||||||
<span class="sig-bitacora-relation">
|
|
||||||
<strong><%#: Eval("ValorMostrar") %></strong>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</asp:PlaceHolder>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-user">
|
|
||||||
<i class="fa fa-user" aria-hidden="true"></i>
|
|
||||||
<span><%#: Eval("NombreUsuarioEjecuta") %></span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-column sig-bitacora-cell sig-bitacora-date">
|
|
||||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
||||||
<time datetime='<%# Eval("FechaMovimiento", "{0:yyyy-MM-ddTHH:mm:ss}") %>'>
|
|
||||||
<%#: Eval("FechaMovimiento", "{0:dd/MM/yyyy HH:mm}") %>
|
|
||||||
</time>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<button type="button"
|
|
||||||
id='BitacoraCatalogoResumen-<%# Eval("CveBitacora") %>'
|
|
||||||
class="sig-bitacora-detail-toggle js-sig-bitacora-toggle"
|
|
||||||
title="Mostrar el detalle del movimiento"
|
|
||||||
aria-expanded="false"
|
|
||||||
aria-controls='BitacoraCatalogoDetalle-<%# Eval("CveBitacora") %>'>
|
|
||||||
<span class="sig-bitacora-detail-toggle-label">Ver detalle</span>
|
|
||||||
<i class="fa fa-chevron-down" aria-hidden="true"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id='BitacoraCatalogoDetalle-<%# Eval("CveBitacora") %>'
|
|
||||||
class="sig-bitacora-details"
|
|
||||||
role="region"
|
|
||||||
aria-labelledby='BitacoraCatalogoResumen-<%# Eval("CveBitacora") %>'
|
|
||||||
aria-hidden="true"
|
|
||||||
hidden>
|
|
||||||
<div class="sig-bitacora-details-heading">
|
|
||||||
<strong>Detalle del movimiento</strong>
|
|
||||||
<span>Clave de bitácora <%#: Eval("CveBitacora") %></span>
|
|
||||||
</div>
|
|
||||||
<div class="sig-bitacora-details-table-wrap">
|
|
||||||
<table class="table table-hover sig-bitacora-details-table">
|
|
||||||
<caption class="sig-visually-hidden">
|
|
||||||
Campos modificados en este movimiento
|
|
||||||
</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Campo</th>
|
|
||||||
<th scope="col">Valor anterior</th>
|
|
||||||
<th scope="col">Valor nuevo</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<asp:Repeater ID="RptCamposCatalogo"
|
|
||||||
runat="server"
|
|
||||||
DataSource='<%# Eval("Campos") %>'>
|
|
||||||
<ItemTemplate>
|
|
||||||
<tr>
|
|
||||||
<td class="sig-bitacora-field-name"><%#: Eval("NombreMostrar") %></td>
|
|
||||||
<td class="sig-bitacora-old-value"><%#: GetBitacoraValue(Eval("ValorAnteriorMostrar"), Eval("ValorAnterior"), Eval("NombreCampoSQL")) %></td>
|
|
||||||
<td class="sig-bitacora-new-value"><%#: GetBitacoraValue(Eval("ValorNuevoMostrar"), Eval("ValorNuevo"), Eval("NombreCampoSQL")) %></td>
|
|
||||||
</tr>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</ItemTemplate>
|
|
||||||
<FooterTemplate>
|
|
||||||
</div>
|
|
||||||
</FooterTemplate>
|
|
||||||
</asp:Repeater>
|
|
||||||
|
|
||||||
<asp:Panel ID="PnlBitacoraCatalogoPaginacion"
|
|
||||||
runat="server"
|
|
||||||
CssClass="sig-bitacora-pager"
|
|
||||||
role="navigation"
|
|
||||||
aria-label="Paginación de la bitácora"
|
|
||||||
Visible="false">
|
|
||||||
<asp:LinkButton ID="BtnBitacoraCatalogoAnterior"
|
|
||||||
runat="server"
|
|
||||||
CssClass="btn btn-default sig-bitacora-page-link sig-bitacora-page-previous"
|
|
||||||
CausesValidation="false"
|
|
||||||
OnClick="BtnBitacoraCatalogoAnterior_Click">
|
|
||||||
<i class="fa fa-chevron-left" aria-hidden="true"></i>
|
|
||||||
Anterior
|
|
||||||
</asp:LinkButton>
|
|
||||||
|
|
||||||
<span class="sig-bitacora-page-summary"
|
|
||||||
role="status"
|
|
||||||
aria-live="polite">
|
|
||||||
<asp:Literal ID="LitBitacoraCatalogoPaginacion"
|
|
||||||
runat="server" />
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<asp:LinkButton ID="BtnBitacoraCatalogoSiguiente"
|
|
||||||
runat="server"
|
|
||||||
CssClass="btn btn-default sig-bitacora-page-link sig-bitacora-page-next"
|
|
||||||
CausesValidation="false"
|
|
||||||
OnClick="BtnBitacoraCatalogoSiguiente_Click">
|
|
||||||
Siguiente
|
|
||||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
|
||||||
</asp:LinkButton>
|
|
||||||
</asp:Panel>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
<Triggers>
|
|
||||||
<asp:AsyncPostBackTrigger
|
|
||||||
ControlID="BtnBitacoraCatalogoAnterior"
|
|
||||||
EventName="Click" />
|
|
||||||
<asp:AsyncPostBackTrigger
|
|
||||||
ControlID="BtnBitacoraCatalogoSiguiente"
|
|
||||||
EventName="Click" />
|
|
||||||
<asp:AsyncPostBackTrigger
|
|
||||||
ControlID="BtnBitacoraVerToda"
|
|
||||||
EventName="Click" />
|
|
||||||
</Triggers>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</section>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="ContentScripts" ContentPlaceHolderID="J" runat="server">
|
<asp:Content ID="ContentScripts" ContentPlaceHolderID="J" runat="server">
|
||||||
<script src='<%= ResolveUrl("~/Scripts/BitacoraFeed.js?v=20260814-3") %>'
|
|
||||||
type="text/javascript"></script>
|
|
||||||
<script>
|
<script>
|
||||||
window.SIGCatalog = window.SIGCatalog || {};
|
window.SIGCatalog = window.SIGCatalog || {};
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
{
|
{
|
||||||
public partial class Fraccionamientos : ClsPaginaBase
|
public partial class Fraccionamientos : ClsPaginaBase
|
||||||
{
|
{
|
||||||
private const int RegistrosBitacoraPorPagina = 10;
|
|
||||||
|
|
||||||
private int CveFraccionamientoBitacoraActual
|
private int CveFraccionamientoBitacoraActual
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -32,19 +30,6 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int PaginaBitacoraCatalogo
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ViewState["PaginaBitacoraCatalogo"] == null
|
|
||||||
? 1
|
|
||||||
: (int)ViewState["PaginaBitacoraCatalogo"];
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ViewState["PaginaBitacoraCatalogo"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string NombreFraccionamientoBitacoraActual
|
private string NombreFraccionamientoBitacoraActual
|
||||||
{
|
{
|
||||||
@@ -129,48 +114,17 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
CveFraccionamientoBitacoraActual = cveFraccionamiento;
|
CveFraccionamientoBitacoraActual = cveFraccionamiento;
|
||||||
NombreFraccionamientoBitacoraActual =
|
NombreFraccionamientoBitacoraActual =
|
||||||
nombreFraccionamiento;
|
nombreFraccionamiento;
|
||||||
PaginaBitacoraCatalogo = 1;
|
|
||||||
|
|
||||||
BindBitacoraCatalogo();
|
BindBitacoraCatalogo();
|
||||||
UpBitacoraCatalogo.Update();
|
|
||||||
ScrollToBitacoraCatalogo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnBitacoraVerToda_Click(
|
protected void UcBitacoraCatalogo_AccionClick(
|
||||||
object sender,
|
object sender,
|
||||||
EventArgs e)
|
EventArgs e)
|
||||||
{
|
{
|
||||||
CveFraccionamientoBitacoraActual = 0;
|
CveFraccionamientoBitacoraActual = 0;
|
||||||
NombreFraccionamientoBitacoraActual = string.Empty;
|
NombreFraccionamientoBitacoraActual = string.Empty;
|
||||||
PaginaBitacoraCatalogo = 1;
|
|
||||||
|
|
||||||
BindBitacoraCatalogo();
|
BindBitacoraCatalogo();
|
||||||
UpBitacoraCatalogo.Update();
|
|
||||||
ScrollToBitacoraCatalogo();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void BtnBitacoraCatalogoAnterior_Click(
|
|
||||||
object sender,
|
|
||||||
EventArgs e)
|
|
||||||
{
|
|
||||||
if (PaginaBitacoraCatalogo > 1)
|
|
||||||
{
|
|
||||||
PaginaBitacoraCatalogo--;
|
|
||||||
}
|
|
||||||
|
|
||||||
BindBitacoraCatalogo();
|
|
||||||
UpBitacoraCatalogo.Update();
|
|
||||||
ScrollToBitacoraCatalogo();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void BtnBitacoraCatalogoSiguiente_Click(
|
|
||||||
object sender,
|
|
||||||
EventArgs e)
|
|
||||||
{
|
|
||||||
PaginaBitacoraCatalogo++;
|
|
||||||
BindBitacoraCatalogo();
|
|
||||||
UpBitacoraCatalogo.Update();
|
|
||||||
ScrollToBitacoraCatalogo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void UcFiltros_MostrarFiltros(object sender, EventArgs e)
|
protected void UcFiltros_MostrarFiltros(object sender, EventArgs e)
|
||||||
@@ -320,110 +274,22 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
return ResolveUrl(fraccionamientoDetalleUrl);
|
return ResolveUrl(fraccionamientoDetalleUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string GetBitacoraItemCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
return "sig-bitacora-item " + GetBitacoraMovementCss(
|
|
||||||
cveTipoMovimientoValue,
|
|
||||||
descripcionValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraIconCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
string movementCss = GetBitacoraMovementCss(
|
|
||||||
cveTipoMovimientoValue,
|
|
||||||
descripcionValue);
|
|
||||||
|
|
||||||
switch (movementCss)
|
|
||||||
{
|
|
||||||
case "is-added":
|
|
||||||
return "fa fa-plus";
|
|
||||||
case "is-deleted":
|
|
||||||
return "fa fa-trash-o";
|
|
||||||
case "is-enabled":
|
|
||||||
return "fa fa-check";
|
|
||||||
case "is-disabled":
|
|
||||||
return "fa fa-ban";
|
|
||||||
default:
|
|
||||||
return "fa fa-pencil";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraActionText(
|
|
||||||
object nombreAccionValue,
|
|
||||||
object tipoMovimientoValue)
|
|
||||||
{
|
|
||||||
string nombreAccion = Convert.ToString(nombreAccionValue);
|
|
||||||
|
|
||||||
return string.IsNullOrWhiteSpace(nombreAccion)
|
|
||||||
? Convert.ToString(tipoMovimientoValue)
|
|
||||||
: nombreAccion;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string GetBitacoraValue(
|
|
||||||
object displayValue,
|
|
||||||
object rawValue,
|
|
||||||
object fieldNameValue)
|
|
||||||
{
|
|
||||||
string display = Convert.ToString(displayValue);
|
|
||||||
string fieldName = Convert.ToString(fieldNameValue);
|
|
||||||
string valueToDisplay = string.IsNullOrWhiteSpace(display)
|
|
||||||
? Convert.ToString(rawValue)
|
|
||||||
: display;
|
|
||||||
|
|
||||||
if (IsBooleanAuditField(fieldName))
|
|
||||||
{
|
|
||||||
if (valueToDisplay == "1")
|
|
||||||
{
|
|
||||||
return "Sí";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (valueToDisplay == "0")
|
|
||||||
{
|
|
||||||
return "No";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(display))
|
|
||||||
{
|
|
||||||
return display;
|
|
||||||
}
|
|
||||||
|
|
||||||
string raw = valueToDisplay;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(raw))
|
|
||||||
{
|
|
||||||
return "—";
|
|
||||||
}
|
|
||||||
|
|
||||||
return fieldName.StartsWith(
|
|
||||||
"Cve",
|
|
||||||
StringComparison.OrdinalIgnoreCase)
|
|
||||||
? "(" + raw + ") Eliminada"
|
|
||||||
: raw;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BindBitacoraCatalogo()
|
private void BindBitacoraCatalogo()
|
||||||
{
|
{
|
||||||
bool filtrarPorFraccionamiento =
|
bool filtrarPorFraccionamiento =
|
||||||
CveFraccionamientoBitacoraActual > 0;
|
CveFraccionamientoBitacoraActual > 0;
|
||||||
|
|
||||||
LitBitacoraFraccionamiento.Text = Server.HtmlEncode(
|
UcBitacoraCatalogo.Descripcion = filtrarPorFraccionamiento &&
|
||||||
filtrarPorFraccionamiento &&
|
|
||||||
!string.IsNullOrWhiteSpace(
|
!string.IsNullOrWhiteSpace(
|
||||||
NombreFraccionamientoBitacoraActual)
|
NombreFraccionamientoBitacoraActual)
|
||||||
? " · " + NombreFraccionamientoBitacoraActual
|
? "Historial de " +
|
||||||
: string.Empty);
|
NombreFraccionamientoBitacoraActual
|
||||||
BtnBitacoraVerToda.Visible = filtrarPorFraccionamiento;
|
: "Historial de los fraccionamientos a los que tiene acceso";
|
||||||
|
UcBitacoraCatalogo.AccionVisible =
|
||||||
|
filtrarPorFraccionamiento;
|
||||||
|
|
||||||
var consulta = new BitacoraConsultaModel
|
UcBitacoraCatalogo.ConfigurarConsulta(
|
||||||
{
|
new List<BitacoraCampoFiltroModel>
|
||||||
Pagina = PaginaBitacoraCatalogo,
|
|
||||||
RegistrosPorPagina = RegistrosBitacoraPorPagina,
|
|
||||||
Filtros = new List<BitacoraCampoFiltroModel>
|
|
||||||
{
|
{
|
||||||
new BitacoraCampoFiltroModel
|
new BitacoraCampoFiltroModel
|
||||||
{
|
{
|
||||||
@@ -436,7 +302,7 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
SoloExistencia = !filtrarPorFraccionamiento
|
SoloExistencia = !filtrarPorFraccionamiento
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RelacionesMostrar = new List<BitacoraRelacionMostrarModel>
|
new List<BitacoraRelacionMostrarModel>
|
||||||
{
|
{
|
||||||
new BitacoraRelacionMostrarModel
|
new BitacoraRelacionMostrarModel
|
||||||
{
|
{
|
||||||
@@ -450,132 +316,9 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
NombreTablaSQL = "FraccionamientosEtapas",
|
NombreTablaSQL = "FraccionamientosEtapas",
|
||||||
NombreCampoMostrarSQL = "Etapa"
|
NombreCampoMostrarSQL = "Etapa"
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
|
||||||
DbResult<ResultadoPaginado<BitacoraModel>> result =
|
UcBitacoraCatalogo.Consultar(true);
|
||||||
AppServices.BitacoraService.Consultar(consulta);
|
|
||||||
|
|
||||||
if (!result.Success)
|
|
||||||
{
|
|
||||||
BindBitacoraCatalogoError(result.UserMessage);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ResultadoPaginado<BitacoraModel> pagina = result.Data ??
|
|
||||||
new ResultadoPaginado<BitacoraModel>
|
|
||||||
{
|
|
||||||
Pagina = PaginaBitacoraCatalogo,
|
|
||||||
RegistrosPorPagina = RegistrosBitacoraPorPagina
|
|
||||||
};
|
|
||||||
|
|
||||||
PaginaBitacoraCatalogo = pagina.Pagina;
|
|
||||||
RptBitacoraCatalogo.DataSource = pagina.Registros;
|
|
||||||
RptBitacoraCatalogo.DataBind();
|
|
||||||
|
|
||||||
PnlBitacoraCatalogoError.Visible = false;
|
|
||||||
LblBitacoraCatalogoError.Text = string.Empty;
|
|
||||||
PnlBitacoraCatalogoVacia.Visible =
|
|
||||||
pagina.TotalRegistros == 0;
|
|
||||||
PnlBitacoraCatalogoPaginacion.Visible =
|
|
||||||
pagina.TotalRegistros > 0;
|
|
||||||
BtnBitacoraCatalogoAnterior.Visible = pagina.Pagina > 1;
|
|
||||||
BtnBitacoraCatalogoSiguiente.Visible =
|
|
||||||
pagina.Pagina < pagina.TotalPaginas;
|
|
||||||
LitBitacoraCatalogoPaginacion.Text = string.Format(
|
|
||||||
CultureInfo.CurrentCulture,
|
|
||||||
"Página {0} de {1} · {2} movimientos",
|
|
||||||
pagina.Pagina,
|
|
||||||
Math.Max(pagina.TotalPaginas, 1),
|
|
||||||
pagina.TotalRegistros);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ScrollToBitacoraCatalogo()
|
|
||||||
{
|
|
||||||
string script = string.Format(
|
|
||||||
CultureInfo.InvariantCulture,
|
|
||||||
"window.setTimeout(function () {{ " +
|
|
||||||
"var bitacora = document.getElementById('{0}'); " +
|
|
||||||
"if (bitacora) {{ bitacora.scrollIntoView(" +
|
|
||||||
"{{ behavior: 'smooth', block: 'start' }}); }} " +
|
|
||||||
"}}, 0);",
|
|
||||||
UpBitacoraCatalogo.ClientID);
|
|
||||||
|
|
||||||
ScriptManager.RegisterStartupScript(
|
|
||||||
UpBitacoraCatalogo,
|
|
||||||
typeof(Fraccionamientos),
|
|
||||||
"ScrollBitacoraCatalogo",
|
|
||||||
script,
|
|
||||||
true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BindBitacoraCatalogoError(string message)
|
|
||||||
{
|
|
||||||
RptBitacoraCatalogo.DataSource =
|
|
||||||
new List<BitacoraModel>();
|
|
||||||
RptBitacoraCatalogo.DataBind();
|
|
||||||
PnlBitacoraCatalogoError.Visible = true;
|
|
||||||
LblBitacoraCatalogoError.Text = Server.HtmlEncode(
|
|
||||||
string.IsNullOrWhiteSpace(message)
|
|
||||||
? "No fue posible consultar la bitácora."
|
|
||||||
: message);
|
|
||||||
PnlBitacoraCatalogoVacia.Visible = false;
|
|
||||||
PnlBitacoraCatalogoPaginacion.Visible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetBitacoraMovementCss(
|
|
||||||
object cveTipoMovimientoValue,
|
|
||||||
object descripcionValue)
|
|
||||||
{
|
|
||||||
string description = Convert.ToString(descripcionValue);
|
|
||||||
|
|
||||||
if (description.IndexOf(
|
|
||||||
"desactiv",
|
|
||||||
StringComparison.OrdinalIgnoreCase) >= 0)
|
|
||||||
{
|
|
||||||
return "is-disabled";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (description.IndexOf(
|
|
||||||
"activ",
|
|
||||||
StringComparison.OrdinalIgnoreCase) >= 0)
|
|
||||||
{
|
|
||||||
return "is-enabled";
|
|
||||||
}
|
|
||||||
|
|
||||||
byte cveTipoMovimiento;
|
|
||||||
byte.TryParse(
|
|
||||||
Convert.ToString(cveTipoMovimientoValue),
|
|
||||||
out cveTipoMovimiento);
|
|
||||||
|
|
||||||
switch ((BitacoraTipoMovimiento)cveTipoMovimiento)
|
|
||||||
{
|
|
||||||
case BitacoraTipoMovimiento.Agregado:
|
|
||||||
return "is-added";
|
|
||||||
case BitacoraTipoMovimiento.Eliminado:
|
|
||||||
return "is-deleted";
|
|
||||||
default:
|
|
||||||
return "is-edited";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsBooleanAuditField(string fieldName)
|
|
||||||
{
|
|
||||||
return fieldName.Equals(
|
|
||||||
"Activo",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.Equals(
|
|
||||||
"EsActivo",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.Equals(
|
|
||||||
"EsPrincipal",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.StartsWith(
|
|
||||||
"Debe",
|
|
||||||
StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
fieldName.StartsWith(
|
|
||||||
"CorreoVerificado",
|
|
||||||
StringComparison.OrdinalIgnoreCase);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindClients()
|
private void BindClients()
|
||||||
|
|||||||
@@ -237,66 +237,12 @@ namespace SIG.Web.Pages.Fraccionamientos
|
|||||||
protected global::System.Web.UI.WebControls.Button BtnSave;
|
protected global::System.Web.UI.WebControls.Button BtnSave;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// LitBitacoraFraccionamiento control.
|
/// UcBitacoraCatalogo control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Auto-generated field.
|
/// Auto-generated field.
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Literal LitBitacoraFraccionamiento;
|
protected global::SIG.Web.AppCode.SigControls.BitacoraGrid UcBitacoraCatalogo;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BtnBitacoraVerToda control.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Auto-generated field.
|
|
||||||
/// To modify move field declaration from designer file to code-behind file.
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.LinkButton BtnBitacoraVerToda;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// UpBitacoraCatalogo control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.UpdatePanel UpBitacoraCatalogo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraCatalogoError control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraCatalogoError;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// LblBitacoraCatalogoError control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Label LblBitacoraCatalogoError;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraCatalogoVacia control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraCatalogoVacia;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// RptBitacoraCatalogo control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Repeater RptBitacoraCatalogo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// PnlBitacoraCatalogoPaginacion control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Panel PnlBitacoraCatalogoPaginacion;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BtnBitacoraCatalogoAnterior control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.LinkButton BtnBitacoraCatalogoAnterior;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// LitBitacoraCatalogoPaginacion control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.Literal LitBitacoraCatalogoPaginacion;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// BtnBitacoraCatalogoSiguiente control.
|
|
||||||
/// </summary>
|
|
||||||
protected global::System.Web.UI.WebControls.LinkButton BtnBitacoraCatalogoSiguiente;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
177
SIG.Web/Scripts/BitacoraGrid.js
Normal file
177
SIG.Web/Scripts/BitacoraGrid.js
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
(function (window, document) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var api = window.SIGBitacoraGrid = window.SIGBitacoraGrid || {};
|
||||||
|
|
||||||
|
function asArray(list) {
|
||||||
|
return Array.prototype.slice.call(list || []);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRoots(root) {
|
||||||
|
var context = root || document;
|
||||||
|
var roots = [];
|
||||||
|
|
||||||
|
if (context.nodeType === 1 &&
|
||||||
|
context.matches &&
|
||||||
|
context.matches('.js-sig-bitacora-grid')) {
|
||||||
|
roots.push(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (context.querySelectorAll) {
|
||||||
|
roots = roots.concat(
|
||||||
|
asArray(context.querySelectorAll('.js-sig-bitacora-grid'))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return roots;
|
||||||
|
}
|
||||||
|
|
||||||
|
function initializeRoot(root) {
|
||||||
|
if (!root ||
|
||||||
|
root.getAttribute('data-sig-bitacora-grid-initialized') === '1') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var scroll = root.querySelector('.js-sig-bitacora-grid-scroll');
|
||||||
|
var previous = root.querySelector('.js-sig-bitacora-grid-prev');
|
||||||
|
var next = root.querySelector('.js-sig-bitacora-grid-next');
|
||||||
|
var threshold = parseInt(
|
||||||
|
root.getAttribute('data-sig-scroll-threshold'),
|
||||||
|
10
|
||||||
|
);
|
||||||
|
var canPrevious = root.getAttribute('data-sig-can-prev') === '1';
|
||||||
|
var canNext = root.getAttribute('data-sig-can-next') === '1';
|
||||||
|
var anchor = root.getAttribute('data-sig-scroll-anchor');
|
||||||
|
var upCount = 0;
|
||||||
|
var downCount = 0;
|
||||||
|
var changingPage = false;
|
||||||
|
|
||||||
|
if (!scroll) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!threshold || threshold < 1) {
|
||||||
|
threshold = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anchor === 'bottom') {
|
||||||
|
scroll.scrollTop = scroll.scrollHeight;
|
||||||
|
} else {
|
||||||
|
scroll.scrollTop = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
scroll.addEventListener('scroll', function () {
|
||||||
|
upCount = 0;
|
||||||
|
downCount = 0;
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
scroll.addEventListener('wheel', function (event) {
|
||||||
|
if (changingPage) {
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var atTop = scroll.scrollTop <= 1;
|
||||||
|
var remaining = scroll.scrollHeight -
|
||||||
|
scroll.clientHeight -
|
||||||
|
scroll.scrollTop;
|
||||||
|
var atBottom = remaining <= 1;
|
||||||
|
|
||||||
|
if (event.deltaY > 0 && atBottom && canNext && next) {
|
||||||
|
event.preventDefault();
|
||||||
|
downCount += 1;
|
||||||
|
upCount = 0;
|
||||||
|
|
||||||
|
if (downCount >= threshold) {
|
||||||
|
changingPage = true;
|
||||||
|
next.click();
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.deltaY < 0 && atTop && canPrevious && previous) {
|
||||||
|
event.preventDefault();
|
||||||
|
upCount += 1;
|
||||||
|
downCount = 0;
|
||||||
|
|
||||||
|
if (upCount >= threshold) {
|
||||||
|
changingPage = true;
|
||||||
|
previous.click();
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
upCount = 0;
|
||||||
|
downCount = 0;
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
root.setAttribute('data-sig-bitacora-grid-initialized', '1');
|
||||||
|
}
|
||||||
|
|
||||||
|
api.initialize = function (root) {
|
||||||
|
getRoots(root).forEach(initializeRoot);
|
||||||
|
};
|
||||||
|
|
||||||
|
api.showModal = function (id) {
|
||||||
|
if (!id || !window.jQuery) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var modal = window.jQuery('#' + id);
|
||||||
|
|
||||||
|
if (!modal.length || !modal.modal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
modal.modal('show');
|
||||||
|
|
||||||
|
if (window.App && window.App.initAjax) {
|
||||||
|
window.App.initAjax();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function registerPartialPostbackBridge() {
|
||||||
|
if (window.SIG_BITACORA_GRID_PARTIAL_INITIALIZED === true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window.Sys ||
|
||||||
|
!Sys.WebForms ||
|
||||||
|
!Sys.WebForms.PageRequestManager) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.SIG_BITACORA_GRID_PARTIAL_INITIALIZED = true;
|
||||||
|
|
||||||
|
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(
|
||||||
|
function (sender, args) {
|
||||||
|
debugger
|
||||||
|
var panels = null;
|
||||||
|
if (args?.get_panelsUpdated) {
|
||||||
|
panels = args.get_panelsUpdated();
|
||||||
|
}
|
||||||
|
if (!panels || panels.length === 0) {
|
||||||
|
api.initialize(document);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var index = 0; index < panels.length; index += 1) {
|
||||||
|
api.initialize(panels[index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ready() {
|
||||||
|
api.initialize(document);
|
||||||
|
registerPartialPostbackBridge();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', ready, false);
|
||||||
|
} else {
|
||||||
|
ready();
|
||||||
|
}
|
||||||
|
}(window, document));
|
||||||
258
SIG.Web/Styles/BitacoraGrid.css
Normal file
258
SIG.Web/Styles/BitacoraGrid.css
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
.sig-bitacora-grid-card {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #dfe3e8;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-header {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #e7e9ec;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
min-height: 58px;
|
||||||
|
padding: 12px 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-title-wrap {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-title-icon {
|
||||||
|
color: #26a69a;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-title {
|
||||||
|
color: #2f353b;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-description {
|
||||||
|
color: #7d8790;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-toolbar {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
gap: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-page-size-label {
|
||||||
|
color: #7d8790;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-page-size {
|
||||||
|
display: inline-block;
|
||||||
|
height: 30px;
|
||||||
|
padding: 3px 7px;
|
||||||
|
width: 68px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-secondary-action {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-state {
|
||||||
|
color: #7d8790;
|
||||||
|
padding: 24px 18px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-state.is-error {
|
||||||
|
color: #a94442;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-scroll {
|
||||||
|
max-height: 560px;
|
||||||
|
overflow: auto;
|
||||||
|
overscroll-behavior: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th {
|
||||||
|
background: #f7f8fa;
|
||||||
|
border-bottom: 1px solid #dfe3e8;
|
||||||
|
color: #6f7a83;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 9px 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td {
|
||||||
|
border-top: 1px solid #edf0f2;
|
||||||
|
color: #4b555d;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.35;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
padding: 9px 10px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(1),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(1) {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(2),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(2) {
|
||||||
|
width: 11%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(3),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(3) {
|
||||||
|
width: 24%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(4),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(4) {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(5),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(5) {
|
||||||
|
width: 12%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(6),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(6) {
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 13%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table > thead > tr > th:nth-child(7),
|
||||||
|
.sig-bitacora-grid-table > tbody > tr > td:nth-child(7) {
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 9%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-button {
|
||||||
|
color: #337ab7;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-pager {
|
||||||
|
align-items: center;
|
||||||
|
border-top: 1px solid #e7e9ec;
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 48px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-page-summary {
|
||||||
|
color: #7d8790;
|
||||||
|
font-size: 12px;
|
||||||
|
min-width: 220px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-page-button {
|
||||||
|
min-width: 84px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-modal .modal-dialog {
|
||||||
|
max-width: 980px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-modal-title {
|
||||||
|
color: #2f353b;
|
||||||
|
display: block;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-modal-description {
|
||||||
|
color: #4b555d;
|
||||||
|
display: block;
|
||||||
|
font-size: 13px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-modal-meta {
|
||||||
|
color: #8b969e;
|
||||||
|
display: block;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-error {
|
||||||
|
background: #f9ecec;
|
||||||
|
border: 1px solid #eed3d7;
|
||||||
|
color: #a94442;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-empty {
|
||||||
|
color: #7d8790;
|
||||||
|
padding: 18px 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-table > thead > tr > th {
|
||||||
|
background: #f7f8fa;
|
||||||
|
color: #6f7a83;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-table > tbody > tr > td {
|
||||||
|
font-size: 12px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-detail-table > thead > tr > th:first-child,
|
||||||
|
.sig-bitacora-grid-detail-table > tbody > tr > td:first-child {
|
||||||
|
width: 28%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 991px) {
|
||||||
|
.sig-bitacora-grid-header {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-toolbar {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-description {
|
||||||
|
margin-left: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-scroll {
|
||||||
|
max-height: 480px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sig-bitacora-grid-table {
|
||||||
|
min-width: 980px;
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SIG.Web/proyecto.zip
Normal file
BIN
SIG.Web/proyecto.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user