Save Changes Dialog


Author
Message
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
How do you force the save changes dialog box to appear?  When the user clicks the print button on my form I want to force the user to save any changes ( If BO IsDirty ).

Thanks.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You will just need to show your own message box.  That is all the "Save Messages" window is....a MessageForm window.  To do this yourself, it would look something like this:

If MyBo.IsDirty Then
     If MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage(...) = Yes Then
           MyBo.Save()
     End If
End If

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you need to cycle through all of the business objects that belong to the form and are included in the form's save then you can use this:

Dim llDirty As Boolean = False

For Each (loBO As BusinessLayer In Me.GetListOfSaveBOs())
    If loBO.IsDirty Then
        llDirty = True
        Exit For
    End If
Next

If llDirty AndAlso MicroFour.StrataFrame.Messaging.MessageForm.ShowMessage(...) = Yes Then
    MyBo.Save()
End If

The list of business objects that are included in the form's save is determined by the IncludeInForm* settings.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search