CambiarEstArbCE.vb 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. Public Class CambiarEstArbCE
  2. Private CambiarEstArb As New CambiarEstArbDAO
  3. Public Function ProcesarCambio(ByVal CodigoInversion As String, ByVal Accion As String, ByRef cn As Object, ByRef Transaccion As Object)
  4. Dim TerminadoCompleto As String = String.Empty
  5. Dim InicioAprobacion As String = String.Empty
  6. Dim Respuesta As String = "NO"
  7. TerminadoCompleto = CambiarEstArb.CambiatEstArb(CodigoInversion, "TerminadoCreado", cn, Transaccion)
  8. InicioAprobacion = CambiarEstArb.CambiatEstArb(CodigoInversion, "InicioAprobacion", cn, Transaccion)
  9. If TerminadoCompleto = "SI" Then
  10. If InicioAprobacion = "NO" Then
  11. If (Accion = "CambiarRechazado") Then
  12. Respuesta = CambiarEstArb.CambiatEstArb(CodigoInversion, "Cancelar", cn, Transaccion)
  13. ElseIf (Accion = "CambiarAprobacion") Then
  14. Respuesta = "SI"
  15. End If
  16. Else
  17. If (Accion = "CambiarAprobacion") Then
  18. Respuesta = "SI"
  19. End If
  20. End If
  21. ElseIf TerminadoCompleto = "Continuar" Then
  22. Respuesta = "SI"
  23. End If
  24. Return Respuesta
  25. End Function
  26. End Class