Advertisement
Guest User

VBA Cliente

a guest
Jul 8th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub EditorPendentes_AntesDeGravar(Cancel As Boolean)
  2.     Dim Cancela As Boolean
  3.     Dim objComp As Object
  4.     Dim docPendente As Object
  5.  
  6.     Set docPendente = BSO.Comercial.Pendentes.Edita(Me.DocumentoPendente.Filial, "M", Me.DocumentoPendente.TipoDoc, Me.DocumentoPendente.Serie, Me.DocumentoPendente.NumDocInt)
  7.  
  8.     Set objComp = CreateObject("ThrdDocSys.EditorPendentes")
  9.  
  10.     objComp.BSO = BSO
  11.     objComp.DocumentoPendente = docPendente
  12.     Cancela = objComp.TemDocAssoc(Me.DocumentoPendente.IdGDOC)
  13.     If Cancela = True Then
  14.         Cancel = True
  15.         Exit Sub
  16.     End If
  17. End Sub
  18.  
  19. Private Sub EditorPendentes_DepoisDeGravar(Filial As String, Serie As String, Tipo As String, NumDoc As Long, NumPrestacao As Integer)
  20.     Dim objPendentes As Object
  21.     Dim objDocPend As Object
  22.     Set objDocPend = BSO.Comercial.Pendentes.Edita(Filial, "M", Tipo, Serie, NumDoc, NumPrestacao)
  23.    
  24.     On Error GoTo ErroCriarOBj
  25.     Set objPendentes = CreateObject("ThrdDocSys.EditorPendentes")
  26.     On Error GoTo ErroGeral
  27.     objPendentes.BSO = BSO
  28.     objPendentes.DocumentoPendente = objDocPend
  29.  
  30.     objPendentes.DepoisGravar
  31.  
  32.     Exit Sub
  33. ErroCriarOBj:
  34.     Exit Sub
  35. ErroGeral:
  36.     Exit Sub
  37. End Sub
  38.  
  39. Private Sub EditorPendentes_TipoDocumentoIdentificado(Tipo As String, Cancel As Boolean)
  40.  
  41. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement