MS_23112015

This commit is contained in:
SchreiberM 2015-11-24 09:42:44 +01:00
parent c1941a3230
commit 764d667b39
10 changed files with 520 additions and 18 deletions

View File

@ -259,6 +259,9 @@ Public Class ClassControlValues
Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE FORM_ID = {0} AND NAME = '{1}'", CURRENT_FORM_ID, C.Name) Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE FORM_ID = {0} AND NAME = '{1}'", CURRENT_FORM_ID, C.Name)
Dim SQL2 As String = ClassDatabase.Execute_Scalar(SQL) Dim SQL2 As String = ClassDatabase.Execute_Scalar(SQL)
If SQL2 = "" Then
Exit Sub
End If
Dim DT_Combobox As DataTable = ClassDatabase.Return_Datatable(SQL2) Dim DT_Combobox As DataTable = ClassDatabase.Return_Datatable(SQL2)
If DT_Combobox Is Nothing = False Then If DT_Combobox Is Nothing = False Then
If DT_Combobox.Rows.Count > 0 Then If DT_Combobox.Rows.Count > 0 Then

View File

@ -1,5 +1,4 @@
Public Class ClassControlValuesConverter Public Class ClassControlValuesConverter
Public Shared Function ToBooleanOrDefault(value As Object, Optional defaultValue As Boolean = False) Public Shared Function ToBooleanOrDefault(value As Object, Optional defaultValue As Boolean = False)
Try Try
If IsDBNull(value) OrElse value = "" Then If IsDBNull(value) OrElse value = "" Then
@ -36,5 +35,4 @@
Return defaultValue Return defaultValue
End Try End Try
End Function End Function
End Class End Class

View File

@ -0,0 +1,48 @@
Imports DLLLicenseManager
Public Class ClassLicence
Public Shared License_Date As Date
Private Shared _lizenzManager As ClassLicenseManager
Public Shared Sub Refresh_Licence()
Try
_lizenzManager = New ClassLicenseManager("#DigitalData35452!#", "")
Dim sql As String = "SELECT LICENSE FROM TBDD_MODULES WHERE UPPER(NAME) = UPPER('Record-Organizer')"
Dim lic As String = ClassDatabase.Execute_Scalar(sql, True)
Dim licString = _lizenzManager.DecodeLicenseKey(lic)
Dim split() = licString.ToString.Split("#")
If lic <> "" Then
LICENSE_COUNT = split(0)
Else
LICENSE_COUNT = 0
End If
License_Date = CDate(split(1))
If CDate(split(1)) < CDate(Now.ToShortDateString) Then
MsgBox("Ihre Lizenz ist abgelaufen!" & vbNewLine & "Letztes Gültigkeitsdatum: " & split(1) & vbNewLine & "Bitte setzen Sie sich mit Digital Data in Verbindung", MsgBoxStyle.Exclamation)
LICENSE_EXPIRED = True
LICENSE_COUNT = 0
End If
'Die Anzahl der Userlizenzen
LICENSE_COUNT = split(1)
Try
LICENSE_DOSSIER_COUNT = split(2)
Catch ex As Exception
LICENSE_DOSSIER_COUNT = 0
End Try
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Licensemanager:")
End Try
End Sub
Public Shared Function license_is_Valid()
If LICENSE_EXPIRED Then
MsgBox("Ihre Lizenz ist abgelaufen!" & vbNewLine & "Letztes Gültigkeitsdatum: " & License_Date & vbNewLine & "Bitte setzen Sie sich mit Digital Data in Verbindung", MsgBoxStyle.Exclamation)
Return False
Else : Return True
End If
End Function
End Class

View File

@ -237,6 +237,7 @@
<Import Include="System.Threading.Tasks" /> <Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ClassControlValuesConverter.vb" />
<Compile Include="ClassLicence.vb" /> <Compile Include="ClassLicence.vb" />
<Compile Include="frmAbout.designer.vb"> <Compile Include="frmAbout.designer.vb">
<DependentUpon>frmAbout.vb</DependentUpon> <DependentUpon>frmAbout.vb</DependentUpon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View File

@ -22,13 +22,12 @@ Partial Class frmForm_Constructor_Main
'Das Bearbeiten mit dem Code-Editor ist nicht möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode() Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmForm_Constructor_Main)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmForm_Constructor_Main))
Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView() Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.GridControlMain = New DevExpress.XtraGrid.GridControl() Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip()
Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@ -52,7 +51,7 @@ Partial Class frmForm_Constructor_Main
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl()
Me.TreeViewMain = New System.Windows.Forms.TreeView() Me.TreeViewMain = New System.Windows.Forms.TreeView()
Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip()
Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@ -96,19 +95,19 @@ Partial Class frmForm_Constructor_Main
Me.VerknüpfungenAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.VerknüpfungenAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.tsButtonShowTaskOverview = New System.Windows.Forms.ToolStripButton() Me.tsButtonShowTaskOverview = New System.Windows.Forms.ToolStripButton()
Me.tsButtonShowWorkflowTasks = New System.Windows.Forms.ToolStripButton() Me.tsButtonShowWorkflowTasks = New System.Windows.Forms.ToolStripButton()
Me.BindingSource_Entity = New System.Windows.Forms.BindingSource(Me.components) Me.BindingSource_Entity = New System.Windows.Forms.BindingSource()
Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin() Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin()
Me.ImageCollection1 = New DevExpress.Utils.ImageCollection(Me.components) Me.ImageCollection1 = New DevExpress.Utils.ImageCollection()
Me.ttToolTip = New System.Windows.Forms.ToolTip(Me.components) Me.ttToolTip = New System.Windows.Forms.ToolTip()
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip()
Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet() Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet()
Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_USER_ACTIVETableAdapter() Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_USER_ACTIVETableAdapter()
Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager() Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager()
Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter() Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter()
Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter() Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource()
CType(Me.grvwGrid, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.grvwGrid, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlMain, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControlMain, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ContextMenuGrid.SuspendLayout() Me.ContextMenuGrid.SuspendLayout()
@ -457,6 +456,7 @@ Partial Class frmForm_Constructor_Main
' '
'pnlDetails 'pnlDetails
' '
Me.pnlDetails.AllowDrop = True
Me.pnlDetails.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlDetails.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlDetails.Location = New System.Drawing.Point(0, 0) Me.pnlDetails.Location = New System.Drawing.Point(0, 0)
Me.pnlDetails.Name = "pnlDetails" Me.pnlDetails.Name = "pnlDetails"
@ -469,7 +469,7 @@ Partial Class frmForm_Constructor_Main
Me.TabWindream.Controls.Add(Me.ToolStripDokumente) Me.TabWindream.Controls.Add(Me.ToolStripDokumente)
Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954 Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954
Me.TabWindream.Name = "TabWindream" Me.TabWindream.Name = "TabWindream"
Me.TabWindream.Size = New System.Drawing.Size(1063, 316) Me.TabWindream.Size = New System.Drawing.Size(1060, 312)
Me.TabWindream.Text = "windream-Dateien" Me.TabWindream.Text = "windream-Dateien"
' '
'AxObjectListControl 'AxObjectListControl
@ -480,7 +480,7 @@ Partial Class frmForm_Constructor_Main
Me.AxObjectListControl.Location = New System.Drawing.Point(0, 25) Me.AxObjectListControl.Location = New System.Drawing.Point(0, 25)
Me.AxObjectListControl.Name = "AxObjectListControl" Me.AxObjectListControl.Name = "AxObjectListControl"
Me.AxObjectListControl.OcxState = CType(resources.GetObject("AxObjectListControl.OcxState"), System.Windows.Forms.AxHost.State) Me.AxObjectListControl.OcxState = CType(resources.GetObject("AxObjectListControl.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxObjectListControl.Size = New System.Drawing.Size(1063, 291) Me.AxObjectListControl.Size = New System.Drawing.Size(1060, 287)
Me.AxObjectListControl.TabIndex = 6 Me.AxObjectListControl.TabIndex = 6
Me.AxObjectListControl.TabStop = False Me.AxObjectListControl.TabStop = False
' '
@ -489,7 +489,7 @@ Partial Class frmForm_Constructor_Main
Me.ToolStripDokumente.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblWindreamView, Me.ToolStripDropDownButton2}) Me.ToolStripDokumente.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblWindreamView, Me.ToolStripDropDownButton2})
Me.ToolStripDokumente.Location = New System.Drawing.Point(0, 0) Me.ToolStripDokumente.Location = New System.Drawing.Point(0, 0)
Me.ToolStripDokumente.Name = "ToolStripDokumente" Me.ToolStripDokumente.Name = "ToolStripDokumente"
Me.ToolStripDokumente.Size = New System.Drawing.Size(1063, 25) Me.ToolStripDokumente.Size = New System.Drawing.Size(1060, 25)
Me.ToolStripDokumente.TabIndex = 2 Me.ToolStripDokumente.TabIndex = 2
Me.ToolStripDokumente.Text = "ToolStrip2" Me.ToolStripDokumente.Text = "ToolStrip2"
' '
@ -523,7 +523,7 @@ Partial Class frmForm_Constructor_Main
Me.TabFollowUp.Controls.Add(Me.ListViewFollowUp) Me.TabFollowUp.Controls.Add(Me.ListViewFollowUp)
Me.TabFollowUp.Image = Global.DD_Record_Organiser.My.Resources.Resources.Task_16xMD Me.TabFollowUp.Image = Global.DD_Record_Organiser.My.Resources.Resources.Task_16xMD
Me.TabFollowUp.Name = "TabFollowUp" Me.TabFollowUp.Name = "TabFollowUp"
Me.TabFollowUp.Size = New System.Drawing.Size(1063, 316) Me.TabFollowUp.Size = New System.Drawing.Size(1060, 312)
Me.TabFollowUp.Text = "Wiedervorlage" Me.TabFollowUp.Text = "Wiedervorlage"
' '
'grpbxFU_Profile 'grpbxFU_Profile

View File

@ -796,7 +796,12 @@ Public Class frmForm_Constructor_Main
EBENE2_RECID = recid EBENE2_RECID = recid
For Each row As DataRow In DT_SELECTION.Rows For Each row As DataRow In DT_SELECTION.Rows
If row.Item("Record-ID") = SELECTED_RECORD_ID Then If row.Item("Record-ID") = SELECTED_RECORD_ID Then
EBENE2_GRID_RESULT = row.Item(EBENE2_COLUMNNAME) If EBENE2_COLUMNNAME = "" Then
EBENE2_GRID_RESULT = "No Column configured"
Else
EBENE2_GRID_RESULT = row.Item(EBENE2_COLUMNNAME)
End If
End If End If
Next Next
End Select End Select
@ -985,6 +990,7 @@ Public Class frmForm_Constructor_Main
If EBENE1_RECID > 0 Then If EBENE1_RECID > 0 Then
PARENT_RECORDID = EBENE1_RECID PARENT_RECORDID = EBENE1_RECID
CURRENT_PARENTID = EBENE1_RECID CURRENT_PARENTID = EBENE1_RECID
Console.WriteLine("PARENT_RECORDID: " & PARENT_RECORDID)
If GRID_TYPE = GridType.Grid Then If GRID_TYPE = GridType.Grid Then
CURRENT_ENTITYSQL = "SELECT T.* FROM VWTEMP_PMO_FORM" & CURRENT_FORM_ID.ToString & " T, TBPMO_RECORD_CONNECT t1 where T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = " & CURRENT_PARENTID CURRENT_ENTITYSQL = "SELECT T.* FROM VWTEMP_PMO_FORM" & CURRENT_FORM_ID.ToString & " T, TBPMO_RECORD_CONNECT t1 where T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = " & CURRENT_PARENTID
Else Else
@ -1027,7 +1033,7 @@ Public Class frmForm_Constructor_Main
'Parent-ID setzen 'Parent-ID setzen
PARENT_RECORDID = EBENE2_RECID PARENT_RECORDID = EBENE2_RECID
CURRENT_PARENTID = EBENE2_RECID CURRENT_PARENTID = EBENE2_RECID
Console.WriteLine("PARENT_RECORDID: " & PARENT_RECORDID)
Try Try
If GRID_TYPE = GridType.Grid Then If GRID_TYPE = GridType.Grid Then
CURRENT_ENTITYSQL = "SELECT T.* FROM VWTEMP_PMO_FORM" & CURRENT_FORM_ID.ToString & " T, TBPMO_RECORD_CONNECT t1 where T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = " & CURRENT_PARENTID CURRENT_ENTITYSQL = "SELECT T.* FROM VWTEMP_PMO_FORM" & CURRENT_FORM_ID.ToString & " T, TBPMO_RECORD_CONNECT t1 where T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = " & CURRENT_PARENTID

View File

@ -0,0 +1,224 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmLicense
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.btnPW_check = New System.Windows.Forms.Button()
Me.txtPW = New System.Windows.Forms.TextBox()
Me.lblPW = New System.Windows.Forms.Label()
Me.grbBoxlicense = New System.Windows.Forms.GroupBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.dtpGueltig_GI = New System.Windows.Forms.DateTimePicker()
Me.txtDossierCount = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.txtlicensekey = New System.Windows.Forms.TextBox()
Me.lblReadKey = New System.Windows.Forms.Label()
Me.txtNewlicences = New System.Windows.Forms.TextBox()
Me.lblnewlicenses = New System.Windows.Forms.Label()
Me.lblAktuelleLizenzen = New System.Windows.Forms.Label()
Me.btnnewLicenses = New System.Windows.Forms.Button()
Me.grbBoxlicense.SuspendLayout
Me.SuspendLayout
'
'btnPW_check
'
Me.btnPW_check.Location = New System.Drawing.Point(318, 2)
Me.btnPW_check.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.btnPW_check.Name = "btnPW_check"
Me.btnPW_check.Size = New System.Drawing.Size(193, 32)
Me.btnPW_check.TabIndex = 29
Me.btnPW_check.Text = "Open License Manager"
Me.btnPW_check.UseVisualStyleBackColor = true
'
'txtPW
'
Me.txtPW.Location = New System.Drawing.Point(120, 7)
Me.txtPW.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.txtPW.Name = "txtPW"
Me.txtPW.Size = New System.Drawing.Size(192, 23)
Me.txtPW.TabIndex = 28
Me.txtPW.UseSystemPasswordChar = true
'
'lblPW
'
Me.lblPW.AutoSize = true
Me.lblPW.Location = New System.Drawing.Point(8, 10)
Me.lblPW.Name = "lblPW"
Me.lblPW.Size = New System.Drawing.Size(108, 16)
Me.lblPW.TabIndex = 27
Me.lblPW.Text = "Master Passwort:"
'
'grbBoxlicense
'
Me.grbBoxlicense.Controls.Add(Me.Label5)
Me.grbBoxlicense.Controls.Add(Me.dtpGueltig_GI)
Me.grbBoxlicense.Controls.Add(Me.txtDossierCount)
Me.grbBoxlicense.Controls.Add(Me.Label2)
Me.grbBoxlicense.Controls.Add(Me.txtlicensekey)
Me.grbBoxlicense.Controls.Add(Me.lblReadKey)
Me.grbBoxlicense.Controls.Add(Me.btnnewLicenses)
Me.grbBoxlicense.Controls.Add(Me.txtNewlicences)
Me.grbBoxlicense.Controls.Add(Me.lblnewlicenses)
Me.grbBoxlicense.Controls.Add(Me.lblAktuelleLizenzen)
Me.grbBoxlicense.Location = New System.Drawing.Point(11, 42)
Me.grbBoxlicense.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.grbBoxlicense.Name = "grbBoxlicense"
Me.grbBoxlicense.Padding = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.grbBoxlicense.Size = New System.Drawing.Size(520, 308)
Me.grbBoxlicense.TabIndex = 26
Me.grbBoxlicense.TabStop = false
Me.grbBoxlicense.Text = "Lizenzanzahl ändern (nur Administrator):"
Me.grbBoxlicense.Visible = false
'
'Label5
'
Me.Label5.AutoSize = true
Me.Label5.Location = New System.Drawing.Point(325, 65)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(65, 16)
Me.Label5.TabIndex = 16
Me.Label5.Text = "Gültigkeit:"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'dtpGueltig_GI
'
Me.dtpGueltig_GI.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.dtpGueltig_GI.Location = New System.Drawing.Point(396, 62)
Me.dtpGueltig_GI.Name = "dtpGueltig_GI"
Me.dtpGueltig_GI.Size = New System.Drawing.Size(104, 23)
Me.dtpGueltig_GI.TabIndex = 15
Me.dtpGueltig_GI.Value = New Date(2099, 12, 31, 0, 0, 0, 0)
'
'txtDossierCount
'
Me.txtDossierCount.Location = New System.Drawing.Point(222, 91)
Me.txtDossierCount.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.txtDossierCount.Name = "txtDossierCount"
Me.txtDossierCount.Size = New System.Drawing.Size(31, 23)
Me.txtDossierCount.TabIndex = 11
Me.txtDossierCount.Text = "5"
'
'Label2
'
Me.Label2.AutoSize = true
Me.Label2.Location = New System.Drawing.Point(7, 94)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(127, 16)
Me.Label2.TabIndex = 10
Me.Label2.Text = "Anzahl Aktensichten:"
'
'txtlicensekey
'
Me.txtlicensekey.Location = New System.Drawing.Point(10, 221)
Me.txtlicensekey.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.txtlicensekey.Multiline = true
Me.txtlicensekey.Name = "txtlicensekey"
Me.txtlicensekey.Size = New System.Drawing.Size(490, 67)
Me.txtlicensekey.TabIndex = 7
'
'lblReadKey
'
Me.lblReadKey.AutoSize = true
Me.lblReadKey.Location = New System.Drawing.Point(7, 201)
Me.lblReadKey.Name = "lblReadKey"
Me.lblReadKey.Size = New System.Drawing.Size(105, 16)
Me.lblReadKey.TabIndex = 6
Me.lblReadKey.Text = "Neuer Lizenzkey:"
'
'txtNewlicences
'
Me.txtNewlicences.Location = New System.Drawing.Point(222, 62)
Me.txtNewlicences.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.txtNewlicences.Name = "txtNewlicences"
Me.txtNewlicences.Size = New System.Drawing.Size(31, 23)
Me.txtNewlicences.TabIndex = 4
Me.txtNewlicences.Text = "1"
'
'lblnewlicenses
'
Me.lblnewlicenses.AutoSize = true
Me.lblnewlicenses.Location = New System.Drawing.Point(7, 65)
Me.lblnewlicenses.Name = "lblnewlicenses"
Me.lblnewlicenses.Size = New System.Drawing.Size(209, 16)
Me.lblnewlicenses.TabIndex = 3
Me.lblnewlicenses.Text = "Anzahl Record-Organizer Lizenzen:"
'
'lblAktuelleLizenzen
'
Me.lblAktuelleLizenzen.AutoSize = true
Me.lblAktuelleLizenzen.Font = New System.Drawing.Font("Verdana", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
Me.lblAktuelleLizenzen.Location = New System.Drawing.Point(7, 31)
Me.lblAktuelleLizenzen.Name = "lblAktuelleLizenzen"
Me.lblAktuelleLizenzen.Size = New System.Drawing.Size(65, 16)
Me.lblAktuelleLizenzen.TabIndex = 2
Me.lblAktuelleLizenzen.Text = "Label13"
'
'btnnewLicenses
'
Me.btnnewLicenses.Image = Global.DD_Record_Organiser.My.Resources.Resources.key_go1
Me.btnnewLicenses.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnnewLicenses.Location = New System.Drawing.Point(359, 175)
Me.btnnewLicenses.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.btnnewLicenses.Name = "btnnewLicenses"
Me.btnnewLicenses.Size = New System.Drawing.Size(141, 38)
Me.btnnewLicenses.TabIndex = 5
Me.btnnewLicenses.Text = "Erzeuge Key"
Me.btnnewLicenses.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnnewLicenses.UseVisualStyleBackColor = true
'
'frmLicense
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7!, 16!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(542, 363)
Me.Controls.Add(Me.btnPW_check)
Me.Controls.Add(Me.txtPW)
Me.Controls.Add(Me.lblPW)
Me.Controls.Add(Me.grbBoxlicense)
Me.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
Me.KeyPreview = True
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.Name = "frmLicense"
Me.Text = "Lizenzmanager"
Me.grbBoxlicense.ResumeLayout(false)
Me.grbBoxlicense.PerformLayout
Me.ResumeLayout(false)
Me.PerformLayout
End Sub
Friend WithEvents btnPW_check As System.Windows.Forms.Button
Friend WithEvents txtPW As System.Windows.Forms.TextBox
Friend WithEvents lblPW As System.Windows.Forms.Label
Friend WithEvents grbBoxlicense As System.Windows.Forms.GroupBox
Friend WithEvents txtlicensekey As System.Windows.Forms.TextBox
Friend WithEvents lblReadKey As System.Windows.Forms.Label
Friend WithEvents btnnewLicenses As System.Windows.Forms.Button
Friend WithEvents txtNewlicences As System.Windows.Forms.TextBox
Friend WithEvents lblnewlicenses As System.Windows.Forms.Label
Friend WithEvents lblAktuelleLizenzen As System.Windows.Forms.Label
Friend WithEvents txtDossierCount As System.Windows.Forms.TextBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents dtpGueltig_GI As System.Windows.Forms.DateTimePicker
End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,102 @@
Imports DLLLicenseManager
Public Class frmLicense
Public _lizenzManager As ClassLicenseManager
Private Sub btnPW_check_Click(sender As System.Object, e As System.EventArgs) Handles btnPW_check.Click
OpenLicenseManager()
End Sub
Sub OpenLicenseManager()
If Me.txtPW.Text <> "" Then
If Me.txtPW.Text = "35452dd!" Then
Me.grbBoxlicense.Visible = True
Refresh_Licence(False)
Me.lblPW.Visible = False
Me.txtPW.Visible = False
Me.btnPW_check.Visible = False
Else
Me.grbBoxlicense.Visible = False
MsgBox("Das eingegebene Passwort stimmt nicht überein!", MsgBoxStyle.Critical, "Falsche Eingabe:")
Me.txtPW.Text = ""
Me.txtPW.Focus()
End If
End If
End Sub
Private Sub btnnewLicenses_Click(sender As System.Object, e As System.EventArgs) Handles btnnewLicenses.Click
Try
If Me.txtNewlicences.Text <> "" And txtDossierCount.Text <> "" Then
'Encode the license
Dim result As String = Me._lizenzManager.EncodeLicenseKey(txtNewlicences.Text & "#" & dtpGueltig_GI.Text & "#" & txtDossierCount.Text, "#DigitalData35452!#")
Dim sql As String = "UPDATE TBDD_MODULES SET LICENSE = '" & result & "' WHERE UPPER(NAME) = UPPER('Record-Organizer')"
If ClassDatabase.Execute_non_Query(sql, True) = True Then
txtlicensekey.Text = result
Refresh_Licence(True)
End If
'MsgBox("Die Lizenzen wurden erfolgreich aktualisiert!", MsgBoxStyle.Exclamation, "Erfolgsmeldung:")
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei New Licenses:")
End Try
End Sub
Sub Refresh_Licence(Neu As Boolean)
Dim lizenzzahl As Integer
Try
Me._lizenzManager = New ClassLicenseManager("#DigitalData35452!#", "")
Dim sql As String = "SELECT LICENSE FROM TBDD_MODULES WHERE UPPER(NAME) = UPPER('Record-Organizer')"
Dim lic As String = ClassDatabase.Execute_Scalar(sql, True)
Dim licString = Me._lizenzManager.DecodeLicenseKey(lic)
Dim split() = licString.ToString.Split("#")
If lic <> "" Then
lizenzzahl = split(0)
LICENSE_COUNT = lizenzzahl
Else
lizenzzahl = "0"
End If
txtNewlicences.Text = lizenzzahl
dtpGueltig_GI.Value = split(1)
If CDate(split(1)) < CDate(Now.ToShortDateString) Then
License_Expired = True
Else
License_Expired = False
End If
txtDossierCount.Text = split(2)
LICENSE_COUNT = CInt(txtNewlicences.Text)
LICENSE_DOSSIER_COUNT = split(2)
txtDossierCount.Text = 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:")
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Licensemanager:")
End Try
End Sub
Private Sub frmLicense_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Try
grbBoxlicense.Visible = False
Me.lblPW.Visible = True
Me.txtPW.Visible = True
Me.btnPW_check.Visible = True
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei Formular Load:")
End Try
End Sub
Private Sub frmLicense_KeyUp(sender As Object, e As KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode = Keys.Return Then
If Me.txtPW.Focus = True Then
OpenLicenseManager()
End If
End If
End Sub
End Class