Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
OK, the problem was multifold, but it comes down to where the code is put which is explained not too well for us old and object disoriented ignorants (which, by the way, drives me nuts) <g>.
Here's my code that gets an encrypted code from the table when navigated.
Public Class UsersForm
Inherits mmMaintenanceForm
'Set up to store reference to business object
Private oPurUser As Pur_user
Public Sub New()
'Other setup stuff
' This call is required by the Windows Form Designer.
InitializeComponent()
'Other setup stuff
'Add a state change handler
AddHandler oPurUser.StateChange, AddressOf Me.MyStateChangeHandler
End Sub
'The handler for the state change
Public Overridable Sub MyStateChangeHandler(ByVal bizObj As
mmBaseBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
Dim lnState As Integer
Dim lcCode As String
lnState = oPurUser.State
If lnState = 8 Then 'Navigated
lcCode = Me.txtIDCode.Text
Me.txtIDCode2.Text = DecodePW(lcCode)
End If
End Sub
This code didn't give me any errors.
Maybe this will help others who might want to do something similar.
CU
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement