MS Init Git

This commit is contained in:
SchreiberM 2019-10-16 17:26:52 +02:00
parent 557861d92f
commit 38e056ffe7
5 changed files with 31 additions and 9 deletions

View File

@ -194,8 +194,8 @@ Public Class ClassInit
'sql = String.Format("SELECT COUNT(*) AS Expr1 FROM TBDD_USER_MODULE_LOG_IN WHERE UPPER(MODULE) = UPPER('Process-Manager') AND CLIENT_ID = {0}", 1)
' USERCOUNT_LOGGED_IN = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE = 'Process-Manager'"
ClassDatabase.Execute_non_Query(sql, True)
'sql = "DELETE FROM TBDD_USER_MODULE_LOG_IN WHERE USER_ID = " & USER_ID & " AND MODULE = 'Process-Manager'"
'ClassDatabase.Execute_non_Query(sql, True)
LOGGER.Debug("Count Users logged in: " & USERCOUNT_LOGGED_IN.ToString)
If LICENSE_COUNT < USERCOUNT_LOGGED_IN And LICENSE_EXPIRED = False Then
MsgBox("Die Anzahl der aktuell angemeldeten User (" & USERCOUNT_LOGGED_IN.ToString & ") überschreitet die Anzahl der aktuellen Lizenzen!" & vbNewLine & "Anzahl der Lizenzen: " & LICENSE_COUNT.ToString & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")

View File

@ -161,6 +161,8 @@ Public Module ModuleControlProperties
<Category("Daten")>
<TypeConverter(GetType(ChoiceListConverter))>
Public Property ChoiceList() As String
<Category("SpecialBehaviour")>
Public Property DisplayAsLookUpControl As Boolean
Public Class ChoiceListConverter
Inherits TypeConverter
@ -209,6 +211,9 @@ Public Module ModuleControlProperties
Public Property AllowAddNewValues As Boolean
<Category("Einstellungen")>
Public Property PreventDuplicates As Boolean
Public Property ChoiceList() As String
<Category("SpecialBehaviour")>
Public Property DisplayAsComboBox As Boolean
End Class
Public Class LineLabelProperties

View File

@ -769,6 +769,7 @@ Public Class frmFormDesigner
cmbProps.ChoiceList = NotNull(row.Item("CHOICE_LIST"), String.Empty)
props = cmbProps
cmbProps.DisplayAsLookUpControl = False
ElseIf TypeOf sender Is DateTimePicker Then
Dim dtp As DateTimePicker = sender
@ -788,7 +789,7 @@ Public Class frmFormDesigner
lookupProps.MultiSelect = StrToBool(row.Item("MULTISELECT"))
lookupProps.PreventDuplicates = StrToBool(row.Item("VKT_PREVENT_MULTIPLE_VALUES"))
lookupProps.AllowAddNewValues = StrToBool(row.Item("VKT_ADD_ITEM"))
lookupProps.DisplayAsComboBox = False
props = lookupProps
ElseIf TypeOf sender Is GridControl Then
@ -812,6 +813,16 @@ Public Class frmFormDesigner
Dim prop As String = e.ChangedItem.Label
Select Case prop
Case "DisplayAsLookUpControl"
If UpdateSingleValue("CTRL_TYPE", "LOOKUP") = True Then
MsgBox("Type has been changed. Controls will be reloaded!", MsgBoxStyle.Information, "")
LoadControls()
End If
Case "DisplayAsComboBox"
If UpdateSingleValue("CTRL_TYPE", "CMB") = True Then
MsgBox("Type has been changed. Controls will be reloaded!", MsgBoxStyle.Information, "")
LoadControls()
End If
Case "Location"
UpdateSingleValue("X_LOC", DirectCast(newValue, Point).X)
UpdateSingleValue("Y_LOC", DirectCast(newValue, Point).Y)
@ -904,7 +915,7 @@ Public Class frmFormDesigner
End Select
End Sub
Private Sub UpdateSingleValue(columnName As String, value As Object)
Private Function UpdateSingleValue(columnName As String, value As Object)
Dim guid As Integer = CURRENT_CONTROL_ID
Dim escapedValue = value
@ -920,6 +931,7 @@ Public Class frmFormDesigner
If ClassDatabase.Execute_non_Query($"UPDATE TBPM_PROFILE_CONTROLS SET {columnName} = {escapedValue}, CHANGED_WHO = '{Environment.UserName}' WHERE GUID = {guid}", True) = True Then
tslblAenderungen.Visible = True
tslblAenderungen.Text = "Änderungen gespeichert - " & Now
Return True
End If
@ -928,8 +940,9 @@ Public Class frmFormDesigner
Dim msg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}, column: {columnName}): {vbCrLf}{ex.Message}"
MsgBox(msg)
LOGGER.Info(msg)
Return False
End Try
End Sub
End Function
Private Sub MenuItemAddColumn_Click(sender As Object, e As EventArgs) Handles MenuItemAddColumn.Click
Try

View File

@ -396,7 +396,7 @@ Public Class frmMassValidator
Catch ex As Exception
LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}")
LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}: " & ex.Message)
_dependingControl_in_action = False
End Try
SendKeys.Send("{TAB}")

View File

@ -1050,8 +1050,12 @@ Public Class frmValidator
For Each oControl As Control In pnldesigner.Controls
If oControl.Tag = oDEPENDING_GUID Then
Dim oDependingLookup As LookupControl2 = oControl
oDependingLookup.DataSource = oDTDEPENDING_RESULT
If oControl.GetType.ToString = "System.Windows.Forms.TextBox" Then
oControl.Text = oDTDEPENDING_RESULT.Rows(0).Item(0)
Else
Dim oDependingLookup As LookupControl2 = oControl
oDependingLookup.DataSource = oDTDEPENDING_RESULT
End If
_dependingControl_in_action = False
Exit For
End If
@ -1060,7 +1064,7 @@ Public Class frmValidator
Catch ex As Exception
LOGGER.Warn($"Could not get the lookupconbtrol for name {oDEPENDING_CtrlName}")
LOGGER.Warn($"Error while setting depending control-value for [{oDEPENDING_CtrlName}]: " & ex.Message)
_dependingControl_in_action = False
End Try
SendKeys.Send("{TAB}")