-validacion de mensaje de cliente repetido
This commit is contained in:
@@ -1581,6 +1581,22 @@ Public Class ClsClientes
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El Nuevo Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
ElseIf Ex1.Message.Contains("Número: 2601;") Then
|
||||
If Ex1.Message.Contains("UN_ClientesRFCEmpresa") Then
|
||||
Alert("Ya existe un cliente registrado con el mismo RFC.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Ex1.Message.Contains("IND_Clientes_Codigo") Then
|
||||
Alert("Ya existe un cliente registrado con el mismo Código.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Intentar guardar el Nuevo Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el cliente", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user