Merge branch 'master' of http://scmadmin@172.24.11.74:90/scm/git/record_organizer
This commit is contained in:
@@ -772,6 +772,8 @@ Public Class ClassControlBuilder
|
|||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
control.DropDownStyle = ComboBoxStyle.DropDown
|
control.DropDownStyle = ComboBoxStyle.DropDown
|
||||||
control.FormattingEnabled = True
|
control.FormattingEnabled = True
|
||||||
|
control.AutoCompleteMode = AutoCompleteMode.Append
|
||||||
|
control.AutoCompleteSource = AutoCompleteSource.ListItems
|
||||||
|
|
||||||
If (Not _designMode And read_only) Then
|
If (Not _designMode And read_only) Then
|
||||||
control.Enabled = Not read_only
|
control.Enabled = Not read_only
|
||||||
|
|||||||
68
app/DD-Record-Organiser/ClassControlValueCache.vb
Normal file
68
app/DD-Record-Organiser/ClassControlValueCache.vb
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
Public Class ClassControlValueCache
|
||||||
|
|
||||||
|
Private Shared Property Cache As New Dictionary(Of String, Dictionary(Of String, DataTable))
|
||||||
|
|
||||||
|
Public Shared Function LoadFromCache(formId As Integer, controlId As Integer) As DataTable
|
||||||
|
|
||||||
|
Dim dict As Dictionary(Of String, DataTable) = GetCachedFormDict(formId.ToString())
|
||||||
|
|
||||||
|
If IsNothing(dict) Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
|
||||||
|
Dim dt As DataTable = GetCachedControlDict(dict, controlId.ToString())
|
||||||
|
|
||||||
|
If IsNothing(dt) Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
Return dt
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function SaveToCache(formId As Integer, controlId As Integer, dt As DataTable) As DataTable
|
||||||
|
|
||||||
|
Dim dict As Dictionary(Of String, DataTable) = GetCachedFormDict(formId.ToString())
|
||||||
|
|
||||||
|
If IsNothing(dict) Then
|
||||||
|
dict = SetCachedFormDict(formId.ToString(), New Dictionary(Of String, DataTable))
|
||||||
|
End If
|
||||||
|
|
||||||
|
SetCachedControlDict(dict, controlId.ToString(), dt)
|
||||||
|
Return dt
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Private Shared Function GetCachedFormDict(formId As Integer) As Dictionary(Of String, DataTable)
|
||||||
|
|
||||||
|
If Cache.ContainsKey(formId.ToString()) Then
|
||||||
|
Return Cache.Item(formId.ToString())
|
||||||
|
Else
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function SetCachedFormDict(formId As Integer, dict As Dictionary(Of String, DataTable)) As Dictionary(Of String, DataTable)
|
||||||
|
Cache.Item(formId.ToString()) = dict
|
||||||
|
Return dict
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function GetCachedControlDict(dict As Dictionary(Of String, DataTable), controlId As Integer) As DataTable
|
||||||
|
|
||||||
|
If dict.ContainsKey(controlId.ToString()) Then
|
||||||
|
Return dict.Item(controlId.ToString())
|
||||||
|
Else
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function SetCachedControlDict(dict As Dictionary(Of String, DataTable), controlId As Integer, dt As DataTable) As DataTable
|
||||||
|
dict.Item(controlId.ToString()) = dt
|
||||||
|
Return dt
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -241,6 +241,7 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="ClassControlValueCache.vb" />
|
||||||
<Compile Include="ClassControlValuesConverter.vb" />
|
<Compile Include="ClassControlValuesConverter.vb" />
|
||||||
<Compile Include="ClassLicence.vb" />
|
<Compile Include="ClassLicence.vb" />
|
||||||
<Compile Include="frmAbout.designer.vb">
|
<Compile Include="frmAbout.designer.vb">
|
||||||
|
|||||||
@@ -1022,6 +1022,7 @@ Public Class frmForm_Constructor_Main_2
|
|||||||
NEW_RECORD_ID = 0
|
NEW_RECORD_ID = 0
|
||||||
If Not RECORD_CHANGED Then
|
If Not RECORD_CHANGED Then
|
||||||
Update_Status_Label(True, "KEINE Änderungen an Datensatz.")
|
Update_Status_Label(True, "KEINE Änderungen an Datensatz.")
|
||||||
|
Me.Cursor = Cursors.Default
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user