From fbaf51aa177f23565280d4e562bd1d076d45b74b Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 26 Dec 2019 11:00:38 -0700 Subject: [PATCH] agregando tabla de bitacora --- App_Code/ClsContabilidad.vb | 22 +++++++++++++++++++++- Contabilidad/CatPeriodosBloqueo.aspx | 16 +++++++++++++++- Contabilidad/CatPeriodosBloqueo.aspx.vb | 11 ++++++++++- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 610360c63..8f89239ca 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -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 \ No newline at end of file diff --git a/Contabilidad/CatPeriodosBloqueo.aspx b/Contabilidad/CatPeriodosBloqueo.aspx index 0892172c5..80fa6e358 100644 --- a/Contabilidad/CatPeriodosBloqueo.aspx +++ b/Contabilidad/CatPeriodosBloqueo.aspx @@ -172,7 +172,21 @@ - +
+ + + + + + + + + + + + +


diff --git a/Contabilidad/CatPeriodosBloqueo.aspx.vb b/Contabilidad/CatPeriodosBloqueo.aspx.vb index 801e7f910..090f4d1c3 100644 --- a/Contabilidad/CatPeriodosBloqueo.aspx.vb +++ b/Contabilidad/CatPeriodosBloqueo.aspx.vb @@ -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()