validacion para bloquear contabilidad
This commit is contained in:
@@ -6366,8 +6366,10 @@ 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, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Boolean, Mes2 As Boolean, Mes3 As Boolean, Mes4 As Boolean, Mes5 As Boolean,
|
||||
Mes6 As Boolean, Mes7 As Boolean, Mes8 As Boolean, Mes9 As Boolean, Mes10 As Boolean, Mes11 As Boolean, Mes12 As Boolean,
|
||||
CveUsuario As Integer) As String
|
||||
Dim Retorno = ""
|
||||
|
||||
DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -6386,16 +6388,19 @@ Public Class ClsContabilidad
|
||||
.Add("@Mes11", SqlDbType.Bit).Value = Mes11
|
||||
.Add("@Mes12", SqlDbType.Bit).Value = Mes12
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@MensajeError", SqlDbType.VarChar, 500).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@MensajeError").Value.ToString
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al actualizar el Periodo de Bloqueo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Retorno = ""
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
Public Function RemovePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -129,8 +128,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
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, UsuarioActual.CveUsuario) Then
|
||||
Dim AplicarBloqueso As String = 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)
|
||||
If AplicarBloqueso.Length = 0 Then
|
||||
|
||||
CargadatosGvPeriodosBloqueo()
|
||||
UpModalPeriodosBloqueo.Update()
|
||||
@@ -140,7 +139,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
UpGral.Update()
|
||||
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
|
||||
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo " & Environment.NewLine & mensajeAlerta, TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user