MS ÄNDerungen wegen License

This commit is contained in:
2020-01-10 14:02:24 +01:00
parent 77ee901233
commit 3c1657fa28
8 changed files with 96 additions and 44 deletions

View File

@@ -14,6 +14,8 @@ Public Class frmLicense
Me.txtPW.Visible = False
Me.btnPW_check.Visible = False
If DT_CLIENT_USER.Rows.Count > 1 Then
lblClient1.Visible = False
txtClient.Visible = False
lblClient.Visible = True
cmbClients.Visible = True
Try
@@ -24,9 +26,13 @@ Public Class frmLicense
MsgBox("Unexpected Error in Loading Clients: " & ex.Message, MsgBoxStyle.Critical)
End Try
ElseIf DT_CLIENT_USER.Rows.Count = 1 Then
lblClient1.Visible = True
txtClient.Visible = True
lblClient.Visible = False
cmbClients.Visible = False
CLIENT_ID = DT_CLIENT_USER.Rows(0).Item("CLIENT_ID")
txtClient.Text = CLIENT_ID
End If
@@ -45,9 +51,13 @@ Public Class frmLicense
'Encode the license
Dim result As String = Me._lizenzManager.EncodeLicenseKey(txtNewlicences.Text & "#" & dtpGueltig_GI.Text, "#DigitalData35452!#")
Dim sql As String = String.Format("UPDATE TBDD_CLIENT SET LICENSE_DDCBSEARCHER = '" & result & "' WHERE GUID = {0}", CLIENT_ID)
If Database.ExecuteNonQuery(sql) = True Then
Dim sql As String = String.Format("UPDATE TBDD_CLIENT SET LICENSE_CBSEARCHER = '" & result & "' WHERE GUID = {0}", CLIENT_ID)
If Database.ExecuteNonQuery(sql) = False Then
sql = $"UPDATE TBDD_MODULES SET LICENSE = '{result}' where SHORT_NAME = 'CW'"
Database.ExecuteNonQuery(sql)
Refresh_Licence(True)
Else
MsgBox("Could not renew the license!!", MsgBoxStyle.Critical)
End If
'MsgBox("Die Lizenzen wurden erfolgreich aktualisiert!", MsgBoxStyle.Exclamation, "Erfolgsmeldung:")