Framework EDI Reference. Events in FREDI .NET Hybrid
ediDocument. EventNotify

The event handler that gets called when an error or other notable incident has occurred in Framework EDI.

Syntax: 

Parameters:

Example:

The following is an example that shows how to listen to notifications, warnings and errors from FREDI.

' Set up FREDI to receive events in the module
Private WithEvents m_oEdiDoc As ediDocument
         :
   ' In the main routine start an instance of FREDI
   m_oEdiDoc = New ediDocument

         :

         :

' This is an event handler for EventNotify that captures all errors discovered
' by FREDI.
Private Sub m_oEdiDoc_EventNotify(ByVal EventNotify As Edidev.FrameworkEDI.ediEventNotify) Handles m_oEdiDoc.EventNotify

If EventNotify.Severity = EventIDConstants.Event_Notify Then
' Any general notifications sent by FREDI is captured here.
TextBox1.Text = TextBox1.Text & "Code: " & CStr(EventNotify.ErrorCode) & ", Notification: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()
ElseIf EventNotify.Severity = EventIDConstants.Event_Warning Then
' Any warnings sent by FREDI is captured here.
TextBox1.Text = TextBox1.Text & "Warning Code: " & CStr(EventNotify.ErrorCode) & ", Warning Description: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()
ElseIf EventNotify.Severity = EventIDConstants.Event_Severe Then
' Any severe errors sent by FREDI is captured here.
TextBox1.Text = TextBox1.Text & "Severe Code: " & CStr(EventNotify.ErrorCode) & ", Severe Description: " & EventNotify.ErrorDescription & vbCrLf
Application.DoEvents()
End If
End Sub