valida guardar ajuste

This commit is contained in:
2023-02-28 12:27:18 -07:00
parent a89266d1e5
commit 9026cc33e2

View File

@@ -3368,6 +3368,8 @@ Partial Class Inventarios_RecepcionUsados
End Sub End Sub
Protected Sub BtnAgregarProductoAjuste_Click(sender As Object, e As EventArgs) Protected Sub BtnAgregarProductoAjuste_Click(sender As Object, e As EventArgs)
Dim ErrorAjuste As Boolean = False
Dim CvePS As Integer = DdlPSAjuste.SelectedValue.ToEntero Dim CvePS As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(CvePS, DdlFolioGarantia.SelectedValue.ToEntero()) Dim FolioGarantia As MFolioGarantiaMensaje = ValidaFolioGarantia(CvePS, DdlFolioGarantia.SelectedValue.ToEntero())
@@ -3418,15 +3420,20 @@ Partial Class Inventarios_RecepcionUsados
"", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño) "", "-1", "-1", "-1", "", "", -1, "", "", CveTamaño)
End If End If
Else Else
ErrorAjuste = True
Alert("No se pudo cargar el producto", TipoMensaje.MsgError) Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
End If End If
Catch ex As Exception Catch ex As Exception
ErrorAjuste = True
OnError("Ocurrió un error al agregar el producto", ex) OnError("Ocurrió un error al agregar el producto", ex)
End Try End Try
ObjPS.Dispose() ObjPS.Dispose()
GuardaAjuste() If Not ErrorAjuste Then
GuardaAjuste()
End If
'If TmpDTPolizaVirtual Is Nothing Then 'If TmpDTPolizaVirtual Is Nothing Then
' CreaDTmpDTPolizaVirtual() ' CreaDTmpDTPolizaVirtual()