Group: StrataFrame Users
Posts: 93,
Visits: 236
|
Hi,
I will write little example to display the problem
I have a class
Public class myClass1
Public pmks_BO as myBusinessObject = new myBusinessObject
Private Sub new()
' use factory method to create instance of class
End Sub
Public Shared Function CreateMyClass1(ByVal tnPkId as Integer) as myClass1
Dim loReturn as myClass1 = new myClass1
myClass1.pmks_Bo.Fillbyprimarykey(tnPkId)
Return(myClass1)
End Function
Public Function mmks_ShowWizard() As System.Windows.Forms.DialogResult
Dim loWizard As MKSDokumente_Wizard = New MKSDokumente_Wizard(Me)
Return (loWizard.ShowDialog())
End Function
End class
This class expose some complex logic but kernel of class is a business object and data manipulation
Second step.. button to create object
[Button.Click] code
Dim loMyClass1 as myClass1 = myClass1.CreateMyClass1(1)
loMyClass1. mmks_ShowWizard()
Step 3
Wizard displays a form.. and inside this form I want to make DATABINDING of pmks_BO with form controls.
[Wizard code]
Public Sub New(ByVal tomyClass1 As myClass1)
InitializeComponent()
Me.components.Add(tomyClass1.pmks_BO, "DocumenteBO")
Me._pmks_document = toMKSDokumente
Me.cboProject.BindingField = "fk_proj"
Me.cboProject.BusinessObject = CType(Me.components.Components.Item("DocumenteBO"), myBusinessObject)
Me.cboProject.BusinessObjectEvaluated = True
End Sub
As result.. my controls has no values and databinding not works.
What do I wrong?
Thanks
Denis
|