This commit is contained in:
Jonathan Jenne 2019-02-11 10:52:44 +01:00
commit b49b4df36f
7 changed files with 315 additions and 263 deletions

View File

@ -65,15 +65,8 @@ Public Class ClassInit
Else
LICENSE_COUNT = 0
End If
Dim oLicDateString As String = split(1)
Dim cultureInfo As System.Globalization.CultureInfo
cultureInfo = New System.Globalization.CultureInfo("de-DE")
cultureInfo.DateTimeFormat.ShortDatePattern = "dd.MM.yyyy"
Dim oLicDate As Date = Convert.ToDateTime(oLicDateString, cultureInfo)
Dim oMyDate As Date = Convert.ToDateTime(Now.ToShortDateString, cultureInfo)
If oLicDate <= oMyDate Then
If LICENSE_VALID = False Then
MsgBox("Your license has expired!" & vbNewLine & "Last valid date: " & split(1) & vbNewLine & "Please contact Your sysadmin", MsgBoxStyle.Exclamation)
LICENSE_EXPIRED = True
LICENSE_COUNT = 0
@ -194,6 +187,7 @@ Public Class ClassInit
vWLaufwerk = DT.Rows(0).Item("STRING1")
vVERSION_DELIMITER = DT.Rows(0).Item("VERSION_DELIMITER")
vFILE_DELIMITER = DT.Rows(0).Item("FILE_DELIMITER")
LICENSE_VALID = DT.Rows(0).Item("LICENSE_VALID")
Try
WMSESSION_STARTSTOP_STARTUP = DT.Rows(0).Item("WMSESSION_STARTSTOP_STARTUP")
Catch ex As Exception

View File

@ -35,6 +35,7 @@ Module ModuleRuntimeVariables
Public LICENSE_COUNT As Integer = 0
Public LICENSE_EXPIRED As Boolean = False
Public LICENSE_PROFILES As Integer = 0
Public LICENSE_VALID As Boolean = False
Public USERCOUNT_LOGGED_IN As Integer = 0
Public CURRENT_INDEX_ID As Integer
Public CURRENT_OBJECTTYPE As String

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.5.4")>
<Assembly: AssemblyVersion("1.9.5.5")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@ -22,7 +22,7 @@ Public Class frmLicense
Private Sub btnnewLicenses_Click(sender As System.Object, e As System.EventArgs) Handles btnnewLicenses.Click
Try
If Me.txtNewlizences.Text <> "" And txtProfile.Text <> "" Then
Dim dt As Date = CDate(dtp_Gültigkeit.Text)
Dim dt As Date = CDate(dtp_Gültigkeit.Value)
Dim oDateddMMyyyy = dt.ToString("dd.MM.yyyy", CultureInfo.InvariantCulture)
Dim result As String = Me._lizenzManager.EncodeLicenseKey(txtNewlizences.Text & "#" & oDateddMMyyyy & "#" & txtProfile.Text, "#DigitalData35452!#")
txtlicensekey.Text = result
@ -48,17 +48,34 @@ Public Class frmLicense
Else
lizenzzahl = "0"
End If
dtp_Gültigkeit.Value = split(1)
Try
dtp_Gültigkeit.Value = CDate(split(1))
Catch ex As Exception
Dim oLicDateString As String = split(1)
Dim cultureInfo As System.Globalization.CultureInfo
cultureInfo = New System.Globalization.CultureInfo("de-DE")
cultureInfo.DateTimeFormat.ShortDatePattern = "dd.MM.yyyy"
Dim oLicDate As Date = Convert.ToDateTime(oLicDateString, cultureInfo)
Try
dtp_Gültigkeit.Value = oLicDate
Catch ex1 As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Unexpected error in Setting DTP-Value:")
End Try
End Try
txtProfile.Text = split(2)
LICENSE_PROFILES = split(2)
Me.lblAktuelleLizenzen.Text = "Aktuelle Anzahl Lizenzen: " & lizenzzahl
If Neu = True Then
If CInt(lizenzzahl) > 0 Then
MsgBox("Die Lizenz wurde aktualisiert!", MsgBoxStyle.Information, "Erfolgsmeldung:")
MsgBox("License was refreshed!", MsgBoxStyle.Information, "Success:")
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Licensemanager:")
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Unexpected error in LicenseManager-RefreshLicense:")
End Try
End Sub

View File

@ -22,6 +22,7 @@ Public Class frmMain
Private GridCursorLocation As Point
Private GRID_LOAD_TYPE As String = "OVERVIEW"
Private GRID_INV_COL_REMOVED As Boolean = False
Private NO_WORKFLOWITEMS As Boolean = False
'Private _windream As New ClassWindream_allgemein
Private Sub frmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
@ -209,6 +210,9 @@ Public Class frmMain
End Function
Private Sub SaveGridLayout()
If NO_WORKFLOWITEMS = True Then
Exit Sub
End If
Try
Dim xml As String = GetXML_LayoutName()
GridView_Docs.SaveLayoutToXml(xml, OptionsLayoutBase.FullLayout)
@ -218,6 +222,10 @@ Public Class frmMain
End Sub
Private Sub RestoreLayout()
If NO_WORKFLOWITEMS = True Then
Exit Sub
End If
Try
Dim xml As String = GetXML_LayoutName()
GridView_Docs.RestoreLayoutFromXml(xml, OptionsLayoutBase.FullLayout)
@ -532,7 +540,11 @@ Public Class frmMain
sql = sql.Replace("@DATE", Now.ToShortDateString)
sql = sql.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
CURR_DT_PROFILEGRID = ClassDatabase.Return_Datatable(sql, True)
If CURR_DT_PROFILEGRID.Rows.Count = 0 Then
NO_WORKFLOWITEMS = True
Else
NO_WORKFLOWITEMS = False
End If
Create_Basic_View()
Dim Columns_Removed = GridView_CheckInvalidColumns()
@ -657,7 +669,11 @@ Public Class frmMain
CURR_DT_PROFILEGRID = ClassDatabase.Return_Datatable(sql, True)
If Not IsNothing(CURR_DT_PROFILEGRID) Then
If CURR_DT_PROFILEGRID.Rows.Count = 0 Then
NO_WORKFLOWITEMS = True
Else
NO_WORKFLOWITEMS = False
End If
Create_Basic_View()
Try
@ -670,8 +686,6 @@ Public Class frmMain
GridView_Docs.GroupedColumns(I).Tag = GridView_Docs.Columns.Item("PROFILE_ID")
Next
GridView_Docs.OptionsBehavior.AutoExpandAllGroups = True
GridView_Docs.OptionsView.ShowGroupedColumns = False
Catch ex As Exception
@ -1072,8 +1086,12 @@ Public Class frmMain
CURR_DT_PROFILEGRID = ClassDatabase.Return_Datatable(sql, True)
If Not IsNothing(CURR_DT_PROFILEGRID) Then
NO_WORKFLOWITEMS = False
If CURR_DT_PROFILEGRID.Rows.Count = 0 Then
lblViewType.Text = "Aktuell keine Workflowdaten vorhanden!"
NO_WORKFLOWITEMS = True
'MsgBox("Aktuell keine Workflowdaten vorhanden!", MsgBoxStyle.Information)
GridControl_Docs.Visible = False
pnlNavigator.Visible = False

View File

@ -12,6 +12,7 @@ Imports System.Text.RegularExpressions
Imports System.ComponentModel
Imports DD_LIB_Standards
Imports DigitalData.Controls.LookupGrid
Imports System.Data.SqlClient
Public Class frmValidator
Dim viewerID
@ -1669,7 +1670,7 @@ Public Class frmValidator
Private Function Return_VektorArray(ByVal oDocument As WMObject, vktIndexName As String, NIIndexe As Object, CheckDuplikat As Boolean, vType As Object)
Dim ValueArray()
Try
' Try
Dim missing As Boolean = False
Dim Anzahl As Integer = 0
@ -1760,9 +1761,9 @@ Public Class frmValidator
End If
Return ValueArray
Catch ex As Exception
Return valueArray
End Try
'Catch ex As Exception
' Return ValueArray
'End Try
End Function
@ -2130,6 +2131,27 @@ Public Class frmValidator
End If
End If
Case "DigitalData.Controls.LookupGrid.LookupControl"
Try
Dim lookup As LookupControl = inctrl
Dim wertWD = aktivesDokument.GetVariableValue(idxname)
If wertWD.GetType.ToString.Contains("System.Object") Then
Dim oArrlist As New List(Of String)
For Each oVectorRow As Object In wertWD
oArrlist.Add(oVectorRow.ToString)
Next
lookup.SelectedValues = oArrlist
Else
End If
Catch ex As Exception
ClassLogger.Add(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl:")
End Try
Case "System.Windows.Forms.DateTimePicker"
controltype = "DateTimePicker"
Dim DTP As DateTimePicker = inctrl
@ -2239,7 +2261,7 @@ Public Class frmValidator
'Eingaben auf Form überprüfen
If Check_UpdateIndexe() = False Then
'lblerror.Visible = False
'Try
Try
Dim _error As Boolean = False
Me.TBPM_PROFILE_FINAL_INDEXINGTableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING, CURRENT_ProfilName)
Dim dtfinal As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_FINAL_INDEXING
@ -2499,12 +2521,12 @@ Public Class frmValidator
End If
'Catch ex As Exception
' errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
' My.Settings.Save()
' frmError.ShowDialog()
' ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
'End Try
Catch ex As Exception
errormessage = "Unvorhergesehener Fehler bei Abschluss:" & ex.Message
My.Settings.Save()
frmError.ShowDialog()
ClassLogger.Add(">> Unvorhergesehener Fehler bei Abschluss: " & ex.Message, True)
End Try
Else
'lblerror.Visible = True
'lblerror.Text = errmessage