Merge branch 'master' of http://172.24.11.74:90/scm/git/DDMonorepo
This commit is contained in:
commit
063bdea7d4
@ -65,14 +65,14 @@
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.Firebird, Version=6.3.0.0, Culture=neutral, PublicKeyToken=42d22d092898e5f8, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.Firebird.6.3.0\lib\net452\EntityFramework.Firebird.dll</HintPath>
|
||||
<Reference Include="EntityFramework.Firebird, Version=6.4.0.0, Culture=neutral, PublicKeyToken=42d22d092898e5f8, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.Firebird.6.4.0\lib\net452\EntityFramework.Firebird.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=6.3.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.6.3.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=6.4.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.6.4.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
|
||||
<package id="EntityFramework.Firebird" version="6.3.0" targetFramework="net461" />
|
||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.3.0" targetFramework="net461" />
|
||||
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net461" />
|
||||
<package id="FirebirdSql.Data.FirebirdClient" version="6.4.0" targetFramework="net461" />
|
||||
<package id="NLog" version="4.5.10" targetFramework="net461" />
|
||||
</packages>
|
||||
@ -10,6 +10,7 @@ Public Class LookupControl
|
||||
Public Property AllowAddNewValues As Boolean
|
||||
<Category("Einstellungen"), Description("Gibt an, ob das Hinzufügen von identischen Werten erlaubt ist"), DefaultValue(False)>
|
||||
Public Property PreventDuplicates As Boolean
|
||||
|
||||
<Browsable(False)>
|
||||
Public Property DataSource As DataTable
|
||||
<Browsable(False)>
|
||||
@ -36,8 +37,6 @@ Public Class LookupControl
|
||||
Return oForm
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub Grid_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If MultiSelect = False Then
|
||||
_lookupControlSingle = New ButtonEdit With {
|
||||
@ -69,6 +68,17 @@ Public Class LookupControl
|
||||
|
||||
Controls.Add(_lookupControlMulti)
|
||||
End If
|
||||
|
||||
UpdateSelectedValues(SelectedValues)
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSelectedValues(Values As List(Of String))
|
||||
If MultiSelect = True Then
|
||||
_lookupControlMulti.Properties.DataSource = Values
|
||||
_lookupControlMulti.Properties.NullText = IIf(Values.Count = 0, TEXT_NO_RECORDS, String.Format(TEXT_N_RECORDS, Values.Count))
|
||||
Else
|
||||
_lookupControlSingle.Text = Values.FirstOrDefault()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lookupControlMulti_EditValueChanging(sender As Object, e As ChangingEventArgs)
|
||||
@ -85,8 +95,8 @@ Public Class LookupControl
|
||||
|
||||
If oResult = Windows.Forms.DialogResult.OK Then
|
||||
Dim oValues = oForm.SelectedValues
|
||||
_lookupControlMulti.Properties.DataSource = oValues
|
||||
_lookupControlMulti.Properties.NullText = IIf(oValues.Count = 0, TEXT_NO_RECORDS, String.Format(TEXT_N_RECORDS, oValues.Count))
|
||||
|
||||
UpdateSelectedValues(oValues)
|
||||
|
||||
SelectedValues = oValues
|
||||
End If
|
||||
@ -100,7 +110,8 @@ Public Class LookupControl
|
||||
|
||||
If oResult = Windows.Forms.DialogResult.OK Then
|
||||
Dim oValues = oForm.SelectedValues
|
||||
_lookupControlSingle.Text = oValues.FirstOrDefault()
|
||||
|
||||
UpdateSelectedValues(oValues)
|
||||
|
||||
SelectedValues = oValues
|
||||
End If
|
||||
|
||||
2
LookupGrid/frmLookupGrid.Designer.vb
generated
2
LookupGrid/frmLookupGrid.Designer.vb
generated
@ -87,7 +87,7 @@ Partial Class frmLookupGrid
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
|
||||
Me.MinimumSize = New System.Drawing.Size(400, 300)
|
||||
Me.Name = "frmLookupGrid"
|
||||
Me.Text = "frmLookupGrid"
|
||||
Me.Text = "Wählen Sie einen Wert:"
|
||||
CType(Me.gridLookup, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.viewLookup, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
|
||||
@ -51,6 +51,35 @@ Public Class Form1
|
||||
SecondLogger.Warn("WANRING!!!")
|
||||
SecondLogger.Info("INFO!!!")
|
||||
SecondLogger.Debug("DEBUG!!!")
|
||||
|
||||
|
||||
|
||||
Dim datatable As New DataTable("FOO")
|
||||
datatable.Columns.Add(New DataColumn("TEST1", GetType(String)))
|
||||
datatable.Columns.Add(New DataColumn("TEST2", GetType(String)))
|
||||
datatable.Columns.Add(New DataColumn("TEST3", GetType(String)))
|
||||
|
||||
Dim dr As DataRow = datatable.NewRow()
|
||||
dr.Item("TEST1") = "foo"
|
||||
dr.Item("TEST2") = "bar"
|
||||
dr.Item("TEST3") = "baz"
|
||||
|
||||
Dim dr2 As DataRow = datatable.NewRow()
|
||||
dr2.Item("TEST1") = "foo2"
|
||||
dr2.Item("TEST2") = "bar2"
|
||||
dr2.Item("TEST3") = "baz2"
|
||||
|
||||
Dim dr3 As DataRow = datatable.NewRow()
|
||||
dr3.Item("TEST1") = "foo3"
|
||||
dr3.Item("TEST2") = "bar3"
|
||||
dr3.Item("TEST3") = "baz3"
|
||||
|
||||
datatable.Rows.Add(dr)
|
||||
datatable.Rows.Add(dr2)
|
||||
datatable.Rows.Add(dr3)
|
||||
|
||||
LookupControl1.DataSource = datatable
|
||||
LookupControl1.SelectedValues = New List(Of String) From {"foo"}
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles GetValue.Click
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user