MS Globix DLL ControlCreator

This commit is contained in:
2021-03-19 14:05:46 +01:00
parent e62bed993e
commit 12348d6894
13 changed files with 296 additions and 94 deletions

View File

@@ -55,7 +55,7 @@ Public Class GlobixPatterns
result = ReplaceInternalValues(result)
result = ReplaceControlValues(result, panel)
result = ReplaceIDBAttributes(My.Application.Globix.CURRENT_IDB_OBJ_ID, result, pissql)
result = ReplaceUserValues(result, prename, surname, shortname, language, email, userId, profileId)
result = ReplaceUserValues(result, profileId)
_Logger.Debug($"inputString AFTER replacing: [{result}]")
Return result
Catch ex As Exception
@@ -95,34 +95,33 @@ Public Class GlobixPatterns
End Try
End Function
Public Function ReplaceUserValues(input As String, prename As Object, surname As Object, shortname As Object, language As String, email As Object, userId As Object, profileId As Object) As String
Public Function ReplaceUserValues(input As String, profileId As Object) As String
Try
Dim result = input
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_PRENAME)
result = ReplacePattern(result, PATTERN_USER, prename)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.GivenName)
End While
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_USER_ID)
result = ReplacePattern(result, PATTERN_USER, userId)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.UserId)
End While
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_SURNAME)
result = ReplacePattern(result, PATTERN_USER, surname)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.Surname)
End While
If IsDBNull(shortname) Then
shortname = ""
If IsDBNull(My.Application.User.ShortName) Then
My.Application.User.ShortName = ""
End If
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_SHORTNAME)
result = ReplacePattern(result, PATTERN_USER, shortname)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.ShortName)
End While
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_LANGUAGE)
result = ReplacePattern(result, PATTERN_USER, language)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.Language)
End While
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_EMAIL)
result = ReplacePattern(result, PATTERN_USER, email)
result = ReplacePattern(result, PATTERN_USER, My.Application.User.Email)
End While
While ContainsPatternAndValue(result, PATTERN_USER, USER_VALUE_PROFILE_ID)