I use VB.NET & your latest controls of My.Direct
I have an UserControl, the Textboxes are bound to the DataLink (at DesignTime). What I want to do, is that each offer should get his own TabPage. - Therefore, I do the following code:
Code: Select all
Public Sub New(ByVal KundenID As Long)
InitializeComponent()
Dim nTab As New Janus.Windows.UI.Tab.UITabPage
Dim Brille As New VOPTBasis.ISBrilleDaten
Brille.Dock = DockStyle.Fill
nTab.Controls.Add(Brille)
Me.tabBrille.TabPages.Add(nTab)
DatenFüllen(KundenID, Brille.DtsBrille, _
Brille.DtAdapterBrille, Brille.AuftragbrilleLink)
Brille.AuftragbrilleLink.AddNew()
End Sub
Private Sub DatenFüllen(ByVal KundenID As Long, ByVal dts As CoreLab.MySql.MySqlDataSet, _
ByVal dtAdapter As CoreLab.MySql.MySqlDataAdapter, ByVal Link As CoreLab.Data.DataLink)
dtAdapter.SelectCommand.Parameters("KundenID").Value = KundenID
dtAdapter.Fill(dts)
Link.MoveFirst()
For i As Integer = 0 To Link.Count - 1
Dim dRow As CoreLab.Common.DbDataRowView = Link.Current
Dim Brille As New VOPTBasis.ISBrilleDaten
Dim nTab As New Janus.Windows.UI.Tab.UITabPage
nTab.Controls.Add(Brille)
Brille.Dock = DockStyle.Fill
Me.tabBrille.TabPages.Add(nTab)
Link.MoveNext()
Next
End Sub
Can you please tell me, how to make this correct?
THX