MS ChangesLicenseDate
This commit is contained in:
parent
33c867325c
commit
93a36a5cc2
@ -1,4 +1,5 @@
|
|||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
|
Imports System.Globalization
|
||||||
Imports DLLLicenseManager
|
Imports DLLLicenseManager
|
||||||
|
|
||||||
Public Class ClassInit
|
Public Class ClassInit
|
||||||
@ -64,8 +65,16 @@ Public Class ClassInit
|
|||||||
Else
|
Else
|
||||||
LICENSE_COUNT = 0
|
LICENSE_COUNT = 0
|
||||||
End If
|
End If
|
||||||
If CDate(split(1)) <= CDate(Now.ToShortDateString) Then
|
Dim oLicDateString As String = split(1)
|
||||||
MsgBox("Ihre Lizenz ist abgelaufen!" & vbNewLine & "Letztes Gültigkeitsdatum: " & split(1) & vbNewLine & "Die Lizenzanzahl wird auf 0 gesetzt" & vbNewLine & "Bitte setzen Sie sich mit Digital Data in Verbindung", MsgBoxStyle.Exclamation)
|
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
|
||||||
|
MsgBox("Your license has expired!" & vbNewLine & "Last valid date: " & split(1) & vbNewLine & "Please contact Your sysadmin", MsgBoxStyle.Exclamation)
|
||||||
LICENSE_EXPIRED = True
|
LICENSE_EXPIRED = True
|
||||||
LICENSE_COUNT = 0
|
LICENSE_COUNT = 0
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
Imports DLLLicenseManager
|
Imports System.Globalization
|
||||||
|
Imports DLLLicenseManager
|
||||||
Public Class frmLicense
|
Public Class frmLicense
|
||||||
Public _lizenzManager As ClassLicenseManager
|
Public _lizenzManager As ClassLicenseManager
|
||||||
Private Sub btnPW_check_Click(sender As System.Object, e As System.EventArgs) Handles btnPW_check.Click
|
Private Sub btnPW_check_Click(sender As System.Object, e As System.EventArgs) Handles btnPW_check.Click
|
||||||
@ -21,7 +22,9 @@ Public Class frmLicense
|
|||||||
Private Sub btnnewLicenses_Click(sender As System.Object, e As System.EventArgs) Handles btnnewLicenses.Click
|
Private Sub btnnewLicenses_Click(sender As System.Object, e As System.EventArgs) Handles btnnewLicenses.Click
|
||||||
Try
|
Try
|
||||||
If Me.txtNewlizences.Text <> "" And txtProfile.Text <> "" Then
|
If Me.txtNewlizences.Text <> "" And txtProfile.Text <> "" Then
|
||||||
Dim result As String = Me._lizenzManager.EncodeLicenseKey(txtNewlizences.Text & "#" & dtp_Gültigkeit.Text & "#" & txtProfile.Text, "#DigitalData35452!#")
|
Dim dt As Date = CDate(dtp_Gültigkeit.Text)
|
||||||
|
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
|
txtlicensekey.Text = result
|
||||||
Me.TBPM_KONFIGURATIONTableAdapter.CmdUpdateLizenz(Environment.UserName, CStr(result))
|
Me.TBPM_KONFIGURATIONTableAdapter.CmdUpdateLizenz(Environment.UserName, CStr(result))
|
||||||
Refresh_Licence(True)
|
Refresh_Licence(True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user