This commit is contained in:
SchreiberM
2016-08-17 16:02:55 +02:00
parent fc9940031f
commit fd0e907262
4 changed files with 23 additions and 16 deletions

View File

@@ -142,19 +142,25 @@ Public Class frmConfiguration_Basic
End Sub
Private Sub btnTest_Anmeldung_Click(sender As Object, e As EventArgs) Handles btnTest_Anmeldung.Click
Dim session = DD_Rights.ClassRights.GetWMSessionAsUser(Me.txtDomäne.Text, Me.txtServername.Text, Me.txtUser.Text, Me.txtPW.Text)
If Not IsNothing(session) Then
MsgBox("The persionalized connection to windream was created successfully!", MsgBoxStyle.Information)
Dim wrapper As New ClassEncryption("!35452didalog=")
Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
Dim pw As String = cipherText
Try
DD_Rights.ClassLogger.Init(Application.UserAppDataPath() & "\Log", Environment.UserName)
Dim session = DD_Rights.ClassRights.GetWMSessionAsUser(Me.txtDomäne.Text, Me.txtServername.Text, Me.txtUser.Text, Me.txtPW.Text)
If Not IsNothing(session) Then
MsgBox("The persionalized connection to windream was created successfully!", MsgBoxStyle.Information)
Dim wrapper As New ClassEncryption("!35452didalog=")
Dim cipherText As String = wrapper.EncryptData(Me.txtPW.Text)
Dim pw As String = cipherText
Dim upd = String.Format("UPDATE TBPMO_KONFIGURATION SET AD_DOMAIN = '{0}', AD_USER = '{1}', AD_USER_PW = '{2}', AD_SERVER = '{3}', CHANGED_WHO = '{4}' WHERE GUID = 1", Me.txtDomäne.Text, Me.txtUser.Text, pw, Me.txtServername.Text, Environment.UserName)
ClassDatabase.Execute_non_Query(upd)
btnsave.Enabled = False
Else
MsgBox("The persionalized connection to windream could NOT be created." & vbNewLine & "Please check the User-Data!", MsgBoxStyle.Critical)
End If
Dim upd = String.Format("UPDATE TBPMO_KONFIGURATION SET AD_DOMAIN = '{0}', AD_USER = '{1}', AD_USER_PW = '{2}', AD_SERVER = '{3}', CHANGED_WHO = '{4}' WHERE GUID = 1", Me.txtDomäne.Text, Me.txtUser.Text, pw, Me.txtServername.Text, Environment.UserName)
ClassDatabase.Execute_non_Query(upd)
btnsave.Enabled = False
Else
MsgBox("The persionalized connection to windream could NOT be created." & vbNewLine & "Please check the User-Data!", MsgBoxStyle.Critical)
End If
Catch ex As Exception
MsgBox("Error in Check windream login: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub txtDomäne_TextChanged(sender As Object, e As EventArgs) Handles txtDomäne.TextChanged

View File

@@ -1,4 +1,4 @@
Imports DD_Rights
Imports DD
Imports System.ComponentModel
Public Class frmCheckRightsEntity

View File

@@ -7,6 +7,7 @@ Public Class frmReworkUsers
Private GUID_WORKING As Integer = 0
Private COUNT_ENTITIES As Integer = 0
Private ENTITIES_WORKED As Integer = 0
Private CURR_ENTITY As Integer = 0
Private Sub frmCheckRightsEntity_Load(sender As Object, e As EventArgs) Handles Me.Load
Refresh_Combo()
End Sub
@@ -39,6 +40,7 @@ Public Class frmReworkUsers
Dim DT_ENTITY As DataTable = ClassDatabase.Return_Datatable(sql)
COUNT_ENTITIES = DT_ENTITY.Rows.Count
For Each row As DataRow In DT_ENTITY.Rows
CURR_ENTITY = row.Item("ENTITY_ID")
sql = String.Format("SELECT * FROM VWPMO_WD_DOC_SEARCH where DocID in (SELECT [dwObjectID] FROM VWPMO_WD_OBJECT_RIGHTS WHERE dwUserOrGroupID = {0}) AND ENTITY_ID = {1}", ECM_USER_ID, row.Item("ENTITY_ID"))
DT_FILES = ClassDatabase.Return_Datatable(sql)
If DD_Rights.ClassRights.Init(row.Item("ENTITY_ID"), chklogging.Checked, DT_FILES.Rows.Count) = False Then
@@ -128,8 +130,7 @@ Public Class frmReworkUsers
End If
Else
MsgBox("Some errors occured while checking and setting the rights...please check the log!" & vbNewLine & ">> " & ClassRights.COUNT_FILES.ToString & " files schould be worked." & _
">> " & ClassRights.WORKED_FILES.ToString & " were worked successfully.", MsgBoxStyle.Exclamation)
MsgBox("Some errors occured while checking and setting the rights...please check the log!" & vbNewLine & "Current Entity: " & CURR_ENTITY.ToString, MsgBoxStyle.Exclamation)
End If
Catch ex As Exception

View File

@@ -86,7 +86,6 @@
<!-- Programmordner bei Deinstallation entfernen-->
<util:RemoveFolderEx Id="RemoveApplicationFolder" On="uninstall" Property="APPLICATIONFOLDER" />
</Component>
<!-- WINDREAM Bibliotheken -->
<Component Id="WindreamLibs" Guid="4D11FC99-50D9-4E54-B18A-8885C9112646">
<File Id="INDEXLibDLL" Name="AxInterop.INDEXLib.dll" Source="AxInterop.INDEXLib.dll" KeyPath="yes" />
@@ -112,6 +111,7 @@
<Component Id="DDLibs" Guid="BA2979E3-3778-48B8-B0D8-4B77825B9293">
<File Id="SnapPanelLib" Name="SnapPanelControl.dll" Source="SnapPanelControl.dll" KeyPath="yes" />
<File Id="DLLLicenseManager" Name="DLLLicenseManager.dll" Source="DLLLicenseManager.dll" KeyPath="no" />
<File Id="DD_Rights" Name="DD_Rights.dll" Source="E:\SchreiberM\Visual Studio\GIT\DDLibraries\DD_Libraries\bin\Debug\DD_Rights.dll" KeyPath="no" />
</Component>
<!-- DD Bibliotheken -->
<Component Id="BasicLibs" Guid="37238CB0-6DC3-4B1B-9438-52FA7D478897">