3 Commits

Author SHA1 Message Date
5ce027cb07 MS merge commit 2023-04-24 16:45:27 +02:00
bd3f3e22d0 MS BackColor 2023-04-24 16:44:38 +02:00
f2ed8c14d2 FNDD_CHECK_USER_MODULE 2023-04-13 11:51:09 +02:00
3 changed files with 61 additions and 9 deletions

View File

@@ -313,7 +313,7 @@ Public Class ClassInit
LOGGER.Debug("Username: " & USER_USERNAME)
Dim oFnct As New RefreshHelper.SW("FNDD_CHECK_USER_MODULE")
oSQL = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1},'')", USER_USERNAME, CLIENT_SELECTED)
oSQL = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", USER_USERNAME, CLIENT_SELECTED)
Dim DT_CHECKUSER_MODULE As DataTable

View File

@@ -2326,7 +2326,7 @@ Public Class frmMain
Sub GetBaseData(pMode As String)
Dim oStopWatch As New RefreshHelper.SW("GetBaseData")
Try
Dim oSQL = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1},'')", USER_USERNAME, CLIENT_SELECTED)
Dim oSQL = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", USER_USERNAME, CLIENT_SELECTED)
Dim DT_CHECKUSER_MODULE As DataTable
DT_CHECKUSER_MODULE = DatabaseFallback.GetDatatable("TBDD_USER_MODULE", New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
.FilterExpression = $"USERNAME = '{USER_USERNAME.ToLower}' AND MODULE_SHORT = 'PM'"
@@ -2719,7 +2719,7 @@ where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NU
If USER_GHOST_MODE_ACTIVE = True And USER_GHOST_MODE_USRNAME <> String.Empty Then
LOGGER.Info($"GHOST MODE for User {USER_GHOST_MODE_USRNAME} will now be initialized!")
Dim oUserLanguage = User.Language
'BarButtonItemGhostMode.Caption = $"{ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("CaptionDeactivateDebugMode")} ({USER_GHOST_MODE_USRNAME})"
BarButtonItemGhostMode.Caption = String.Format(S.Ghost_Modus___0___deaktivieren, USER_GHOST_MODE_USRNAME)
BarButtonItemGhostMode.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
_Init.InitBasics()
@@ -2760,7 +2760,6 @@ where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NU
Timer_Inactivity_Reset_Disable("GridView_Docs.ColumnFilterChanged")
Create_View_Caption()
If Ev_Filter_Panel_Closed = False Then
'Dim objectCount_Descr As String = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("DescFilterActive")
Dim objectCount_Descr As String = S.Filter_aktiv
GridView_Docs.ViewCaption += $"|{objectCount_Descr}"
@@ -2793,7 +2792,6 @@ where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NU
oRowCount = oRowCount '- oGroupCount
Dim objectCount_Descr = $"[{oRowCount.ToString}]"
'objectCount_Descr = $"{objectCount_Descr} {ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("Workflows")}"
objectCount_Descr = String.Format(S.__0___Workflows, objectCount_Descr)
bsiRowCount.Caption = objectCount_Descr
@@ -2804,7 +2802,6 @@ where (CONVERT(DATE,GETDATE()) <= NOTE.DISPLAY_UNTIL or NOTE.DISPLAY_UNTIL IS NU
End Sub
Sub Create_View_Caption()
Try
' GridView_Docs.ViewCaption = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("GridView_Docs.ViewCaption")
GridView_Docs.ViewCaption = S.Gesamtübersicht
Catch ex As Exception

View File

@@ -17,6 +17,7 @@ Imports DigitalData.Modules.ZooFlow
Imports DigitalData.Modules.ZooFlow.Constants
Imports DigitalData.GUIs.Common
Imports DevExpress.XtraGrid.Columns
Imports System.Globalization
Public Class frmValidator
Private Property Current_Document As DocumentResultList.Document = Nothing
@@ -3115,6 +3116,7 @@ Public Class frmValidator
End If
Dim oValueFromSource
Dim oFormattedValue As String = ""
Dim oControlId = DirectCast(oControl.Tag, ClassControlCreator.ControlMetadata).Guid
Dim oControlRow = (From form In DTVWCONTROL_INDEX.AsEnumerable()
Select form
@@ -3134,7 +3136,9 @@ Public Class frmValidator
oControName = oControl.Name
Dim oLoadIndex As Boolean = oControlRow.Item("LOAD_IDX_VALUE")
If oSourceIndexName = "Netto" Then
Console.WriteLine("Bing Netto")
End If
LOGGER.Debug("INDEX: " & oSourceIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & oLoadIndex.ToString)
Select Case oType
@@ -3183,14 +3187,65 @@ Public Class frmValidator
End If
Try
oControl.Text = NotNull(oValueFromSource, oDefaultValue)
Dim oFormatString As String = oControlRow.Item("CTRL_FORMAT_STRING")
If oFormatString <> String.Empty Then
Try
Dim oSPlit = Split(oFormatString, ";")
If oSPlit(0) = "Decimal" Then
oFormattedValue = oValueFromSource
Dim oFormattedDec As Decimal = oValueFromSource
If oSPlit.Length = 3 Then
oFormattedValue = $"{oFormattedDec.ToString(oSPlit(1))} {oSPlit(2)}"
ElseIf oSPlit.Length = 4 Then
oFormattedValue = $"{oFormattedDec.ToString(oSPlit(1), New CultureInfo(oSPlit(2)))} {oSPlit(3)}"
Else
oFormatString = oFormatString.Replace("Decimal;", "")
End If
End If
Catch ex As Exception
LOGGER.Warn($"Unexpected error in Format String [{oControl.Name}]: {ex.Message}")
LOGGER.Error(ex)
End Try
End If
If Not IsNothing(oFormattedValue) And oFormattedValue <> String.Empty Then
oControl.Text = NotNull(oFormattedValue, oDefaultValue)
Else
oControl.Text = NotNull(oValueFromSource, oDefaultValue)
End If
Try
Dim oBackColor As String = oControlRow.Item("CTRL_BACKCOLOR_IF")
If oBackColor <> String.Empty Then
Dim oSPlit = Split(oBackColor, ";")
If oSPlit.Length = 3 Then
Dim oValueConverted
If IsNumeric(oValueFromSource) Then
oValueConverted = oValueFromSource.ToString.Replace(",", ".")
Else
oValueConverted = oValueFromSource
End If
Dim oExpression = $"{oValueConverted} {oSPlit(0)}"
Dim oSQl = $"SELECT CASE WHEN {oExpression} THEN CONVERT(BIT,1) ELSE CONVERT(BIT,0) END "
Dim oColorName = IIf(DatabaseECM.GetScalarValue(oSQl), oSPlit(1), oSPlit(2))
oControl.BackColor = Color.FromName(oColorName)
End If
End If
Catch ex As Exception
LOGGER.Warn($"Unexpected error in Set Backcolor [{oControl.Name}]: {ex.Message}")
LOGGER.Error(ex)
End Try
ClassControlCreator.GridTables_HandleControlValueChange(PanelValidatorControl, DT_COLUMNS_GRID_WITH_SQL_WITH_CTRL_PLACEHOLDER)
Catch ex As Exception
LOGGER.Info("ERROR while converting defaultValue [" & oDefaultValue & "]: " & ex.Message)
LOGGER.Info("Error While converting defaultValue [" & oDefaultValue & "]: " & ex.Message)
oControl.Text = ""
End Try