agregando tabla de bitacora

This commit is contained in:
Antonio Gonzalez
2019-12-26 11:00:38 -07:00
parent b4e3bb6a8b
commit fbaf51aa17
3 changed files with 46 additions and 3 deletions

View File

@@ -5901,7 +5901,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer) As Boolean
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate")
@@ -5920,6 +5920,7 @@ Public Class ClsContabilidad
.Add("@Mes10", SqlDbType.Bit).Value = Mes10
.Add("@Mes11", SqlDbType.Bit).Value = Mes11
.Add("@Mes12", SqlDbType.Bit).Value = Mes12
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
@@ -5949,5 +5950,24 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetBloqueoMesesBitacora(CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_GetBloqueoMesesBitacora")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el almacén contable", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
End Class

View File

@@ -172,7 +172,21 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="row" style="margin: 5px">
<asp:UpdatePanel ID="UPGvBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvMesesBloqueBitacora" runat="server" AutoGenerateColumns="False" DataKeyNames="FechaRealizado,Nombre,Periodo,Accion" EmptyDataText="No se encontraron registros"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-freezerows="1" GridLines="None">
<Columns>
<asp:BoundField DataField="FechaRealizado" HeaderText="Fecha realizado" />
<asp:BoundField DataField="Nombre" HeaderText="Usuario" />
<asp:BoundField DataField="Periodo" HeaderText="Periodo" />
<asp:BoundField DataField="Accion" HeaderText="Accion" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<br />
<br />

View File

@@ -68,10 +68,19 @@ Partial Class Contabilidad_CatPeriodosBloqueo
GvPeriodosBloqueo.DataSource = Nothing
End If
If ObjConta.GetBloqueoMesesBitacora(UsuarioActual.CveEmpresa) Then
GvMesesBloqueBitacora.DataSource = ObjConta.DtResultados
Else
GvMesesBloqueBitacora.DataSource = Nothing
End If
ObjConta.Dispose()
UPGvPeriodosBloqueo.DataBind()
GvMesesBloqueBitacora.DataBind()
UpGral.Update()
UPGvBitacora.Update()
End Sub
@@ -121,7 +130,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
End If
Else
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked) Then
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) Then
CargadatosGvPeriodosBloqueo()
UpModalPeriodosBloqueo.Update()