'Declaration Public Event TransactionStateChanged As TransactionStateChangedEventHandler
public event TransactionStateChangedEventHandler TransactionStateChanged
'Declaration Public Event TransactionStateChanged As TransactionStateChangedEventHandler
public event TransactionStateChangedEventHandler TransactionStateChanged
ZohoDeskConnection connection = new ZohoDeskConnection( Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f); connection.TransactionStateChanged += new TransactionStateChangedEventHandler(connection_TransactionStateChanged); connection.TransactionStateChanging += new TransactionStateChangingEventHandler(connection_TransactionStateChanging); connection.Open(); // ... ZohoDeskTransaction tr = connection.BeginTransaction(); // ... tr.Commit(); // ... void connection_TransactionStateChanging(object sender, TransactionStateChangingEventArgs e) { if (e.Action == TransactionAction.Commit) { // do somthing... } } void connection_TransactionStateChanged(object sender, TransactionStateChangedEventArgs e) { if (e.Action == TransactionAction.Commit) { // do somthing... } }
Dim connection As New ZohoDeskConnection( _ Refresh Token=1000.a6fde76542bfbb5244a7e539d4390e72.87e34ea57023c2d0e7dcb9ce55e3e7f) AddHandler connection.TransactionStateChanged, New TransactionStateChangedEventHandler(AddressOf &_ Me.connection_TransactionStateChanged) AddHandler connection.TransactionStateChanging, New TransactionStateChangingEventHandler(AddressOf &_ Me.connection_TransactionStateChanging) connection.Open() '... Dim Transaction As ZohoDeskTransaction Transaction = connection.BeginTransaction() '... Transaction.Commit() '... Private Sub connection_TransactionStateChanged(ByVal sender As Object, ByVal e As TransactionStateChangedEventArgs) If (e.Action = TransactionAction.Commit) Then '... End If End Sub Private Sub connection_TransactionStateChanging(ByVal sender As Object, ByVal e As TransactionStateChangingEventArgs) If (e.Action = TransactionAction.Commit) Then '... End If End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2