Childformdialog-problem


Author
Message
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi There,

there is a main form in my project, named lkunden with a BO called lkundenBO1. It contains a childformdialog-control set up to work with a child form named lkundneu, which also contains a BO named lkundenBO1. This is how I load the form:



LKundenBO1.Add()

If Me.Childlkunden.ShowDialog() = DialogResult.OK Then

Dim nLkunr As Integer = NextIDBO1.nextid("LKUNDEN") ' Another BO with a function to call a sp to get an incremented value

LKundenBO1.LKUNDENNR = nLkunr

LKundenBO1.KUNDENNR =
Me.nKundennr

If LKundenBO1.Save <> MicroFour.StrataFrame.Data.SaveUndoResult.Success Then

LKundenBO1.Undo(MicroFour.StrataFrame.Business.BusinessUndoType.CurrentRowOnly)

End If

End If



There is a new record added and I can enter values in the child form. When I leave the childform by setting

the dialog result to ok and return to the main-form, the added record is lost. For example just before exiting from the main form I can control the count-property which is still correct but when I check it in the main form after the "showdialog-line", the added record has disappeared.

Has anyboy an idea what is happening there?

Best regards

Thomas
Replies
Thomas Holste
Thomas Holste
Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)Advanced StrataFrame User (536 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Ben,

thank you for your help. I tried a bit further but did not find why the added record got lost so I dropped the childformdialog-control and replaced it by sending the BO as a parameter to the childform and set the BO and Bindings in the onload -event. A little bit more to type but now everything works as wanted.

Best regards

Thomas
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
I'm glad you got it working.
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