--FIX ejecucion multiple de eventos
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ Partial Class Compras_Proveedores
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private ReadOnly Property CveProveedor As Integer
|
||||
Get
|
||||
Return ViewState("CveProveedor").ToString.ToEntero
|
||||
Return IfNull(ViewState("CveProveedor"), -1).ToString.ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ProveedorID As Integer
|
||||
@@ -606,8 +606,6 @@ Partial Class Compras_Proveedores
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(88) Then BtnGuardar.Visible = True 'agregar/Nuevo proveedor
|
||||
|
||||
ScriptManager.RegisterStartupScript(Me, Me.GetType, "Ll", "pageLoad();", True)
|
||||
|
||||
If UsuarioActual.Empresa.CvePlataforma = 2 Then
|
||||
DivFiscal.Visible = False
|
||||
'divportalusuarios.Visible = False
|
||||
@@ -5932,9 +5930,19 @@ Partial Class Compras_Proveedores
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargaHistorial_Click(sender As Object, e As EventArgs) Handles BtnCargaHistorial.Click
|
||||
|
||||
If ViewState("YaEjecutadoHistorial") IsNot Nothing AndAlso CBool(ViewState("YaEjecutadoHistorial")) Then
|
||||
' Ya se ejecutó, evita doble acción
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Marca que ya se ejecutó
|
||||
ViewState("YaEjecutadoHistorial") = True
|
||||
|
||||
If CveProveedor > 0 Then
|
||||
CargaHistorial(CveProveedorSucursal) ' <-- Tu método de carga
|
||||
UpnHistorial.Update() ' <-- UpdatePanel de Historial
|
||||
UpBtnsTab.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user