How do you manage to detect changes in a details form, so when the user press the cancel button you ask him if he wants to save changes?
this is what im doing:
vb Code:
''' <summary> ''' Determines whether this instance has changed. ''' </summary> ''' <returns> ''' <c>true</c> if this instance has changed; otherwise, <c>false</c>. ''' </returns> Private Function hasChanged() As Boolean Dim objCArHabLit As New CARHabLit With objCArHabLit .Id = Me.txtId.Text .Designacao = Me.txtDesignacao.Text End With If objCArHabLit.CompareTo(_objCARHabLit) <> 0 Then Return True End If Return False End Function
comments please...




Reply With Quote