From 3f29f243a2b8120ff0d4b3741b6f54580a2e3550 Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Wed, 13 Jun 2018 10:26:07 +0200 Subject: [PATCH] =?UTF-8?q?MS:=20Bugfixing=20und=20=C3=84nderungen=20UM=20?= =?UTF-8?q?Aufruf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ClassAllgemeineFunktionen.vb | 3 + app/DD_PM_WINDREAM/ClassDatabase.vb | 3 + app/DD_PM_WINDREAM/ClassInit.vb | 27 +++--- app/DD_PM_WINDREAM/ClassUser.vb | 22 +++++ app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj | 11 ++- app/DD_PM_WINDREAM/ModuleMySettings.vb | 10 +- ...igner.vb => frmAdministration.Designer.vb} | 56 ++++++------ ...leDesigner.resx => frmAdministration.resx} | 51 +++-------- ...rofileDesigner.vb => frmAdministration.vb} | 91 ++++++++----------- app/DD_PM_WINDREAM/frmLoginAdmin.vb | 4 +- app/DD_PM_WINDREAM/frmMain.vb | 7 +- app/DD_PM_WINDREAM/frmMassValidator.vb | 9 +- 12 files changed, 148 insertions(+), 146 deletions(-) create mode 100644 app/DD_PM_WINDREAM/ClassUser.vb rename app/DD_PM_WINDREAM/{frmProfileDesigner.Designer.vb => frmAdministration.Designer.vb} (98%) rename app/DD_PM_WINDREAM/{frmProfileDesigner.resx => frmAdministration.resx} (99%) rename app/DD_PM_WINDREAM/{frmProfileDesigner.vb => frmAdministration.vb} (95%) diff --git a/app/DD_PM_WINDREAM/ClassAllgemeineFunktionen.vb b/app/DD_PM_WINDREAM/ClassAllgemeineFunktionen.vb index 2406aea..d77aeb7 100644 --- a/app/DD_PM_WINDREAM/ClassAllgemeineFunktionen.vb +++ b/app/DD_PM_WINDREAM/ClassAllgemeineFunktionen.vb @@ -6,6 +6,9 @@ Imports WINDREAMLib Public Class ClassAllgemeineFunktionen Public Shared Sub LoginOut(LoginOut As String) Try + If USER_EXISTS = False Then + Exit Sub + End If Dim Sql As String If LoginOut = "LOGIN" Then Sql = String.Format("INSERT INTO TBDD_USER_MODULE_LOG_IN (USER_ID,CLIENT_ID,MODULE,VERSION_CLIENT,MACHINE_NAME) VALUES ({0},{1},'Process-Manager','{2}','{3}')", CURRENT_USER_ID, 1, My.Application.Info.Version.ToString, Environment.MachineName) diff --git a/app/DD_PM_WINDREAM/ClassDatabase.vb b/app/DD_PM_WINDREAM/ClassDatabase.vb index fb62e5a..2ac372a 100644 --- a/app/DD_PM_WINDREAM/ClassDatabase.vb +++ b/app/DD_PM_WINDREAM/ClassDatabase.vb @@ -72,6 +72,7 @@ Public Class ClassDatabase If userInput = True Then MsgBox("Error in Return Datatable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & Select_anweisung, MsgBoxStyle.Critical) End If + Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & Select_anweisung) ClassLogger.Add("Fehler bei Return_Datatable: " & ex.Message, True) ClassLogger.Add("#SQL: " & Select_anweisung, False) Return Nothing @@ -119,6 +120,7 @@ Public Class ClassDatabase If userInput = True Then MsgBox("Error in Execute non query - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & ExecuteCMD, MsgBoxStyle.Critical) End If + Clipboard.SetText("Error ExecuteCMD: " & ex.Message & vbNewLine & "SQL: " & ExecuteCMD) ClassLogger.Add("Fehler bei Execute_non_Query: " & ex.Message, True) ClassLogger.Add("#SQL: " & ExecuteCMD, False) @@ -143,6 +145,7 @@ Public Class ClassDatabase If userInput = True Then MsgBox("Error in Execute Scalar - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & cmdscalar, MsgBoxStyle.Critical) End If + Clipboard.SetText("Error Execute_Scalar: " & ex.Message & vbNewLine & "SQL: " & cmdscalar) ClassLogger.Add("Fehler bei Execute_Scalar: " & ex.Message, True) ClassLogger.Add("#SQL: " & cmdscalar, False) Return Nothing diff --git a/app/DD_PM_WINDREAM/ClassInit.vb b/app/DD_PM_WINDREAM/ClassInit.vb index 2927d9d..7950f73 100644 --- a/app/DD_PM_WINDREAM/ClassInit.vb +++ b/app/DD_PM_WINDREAM/ClassInit.vb @@ -84,19 +84,9 @@ Public Class ClassInit ClassLogger.Add(">> Username: " & USER_USERNAME, False) Dim dtUser As DataTable = ClassDatabase.Return_Datatable(sql) - CURRENT_USER_ID = dtUser.Rows(0).Item("GUID") - CURRENT_USER_SURNAME = IIf(IsDBNull(dtUser.Rows(0).Item("NAME")), "", dtUser.Rows(0).Item("NAME")) - CURRENT_USER_PRENAME = IIf(IsDBNull(dtUser.Rows(0).Item("PRENAME")), "", dtUser.Rows(0).Item("PRENAME")) - CURRENT_USER_SHORTNAME = IIf(IsDBNull(dtUser.Rows(0).Item("SHORTNAME")), "", dtUser.Rows(0).Item("SHORTNAME")) - CURRENT_USER_EMAIL = IIf(IsDBNull(dtUser.Rows(0).Item("EMAIL")), "", dtUser.Rows(0).Item("EMAIL")) - CURRENT_USER_LANGUAGE = dtUser.Rows(0).Item("LANGUAGE") - - If IsDBNull(CURRENT_USER_ID) Or IsNothing(CURRENT_USER_ID) Then - USER_EXISTS = False - Else - USER_EXISTS = True - End If - If USER_EXISTS = False Then + + If dtUser.Rows.Count = 0 Then + ClassLogger.Add("User '" & USER_USERNAME & "' not configured in Useradministration! (DBNull)", True) 'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:") 'Me.Close() @@ -104,6 +94,14 @@ Public Class ClassInit ' Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!") MsgBox("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!", MsgBoxStyle.Exclamation) Else + USER_EXISTS = True + CURRENT_USER_ID = dtUser.Rows(0).Item("GUID") + CURRENT_USER_SURNAME = IIf(IsDBNull(dtUser.Rows(0).Item("NAME")), "", dtUser.Rows(0).Item("NAME")) + CURRENT_USER_PRENAME = IIf(IsDBNull(dtUser.Rows(0).Item("PRENAME")), "", dtUser.Rows(0).Item("PRENAME")) + CURRENT_USER_SHORTNAME = IIf(IsDBNull(dtUser.Rows(0).Item("SHORTNAME")), "", dtUser.Rows(0).Item("SHORTNAME")) + CURRENT_USER_EMAIL = IIf(IsDBNull(dtUser.Rows(0).Item("EMAIL")), "", dtUser.Rows(0).Item("EMAIL")) + CURRENT_USER_LANGUAGE = dtUser.Rows(0).Item("LANGUAGE") + If LogErrorsOnly = False Then ClassLogger.Add(" >> User exists....", False) 'Am System anmelden Refresh_Licence() @@ -125,11 +123,10 @@ Public Class ClassInit End If 'Alles OK bis hierhin...nun die FolderwatchKonfig laden If LogErrorsOnly = False Then ClassLogger.Add(" >> Init Userlogin successfull completed....", False) - - End If + Catch ex As Exception ClassLogger.Add("Unexpected Error in InitUserLogin: " & ex.Message, True) ERROR_STATE = "START INCOMPLETE" diff --git a/app/DD_PM_WINDREAM/ClassUser.vb b/app/DD_PM_WINDREAM/ClassUser.vb new file mode 100644 index 0000000..6863fe2 --- /dev/null +++ b/app/DD_PM_WINDREAM/ClassUser.vb @@ -0,0 +1,22 @@ +Public Class ClassUser + Public Shared Function Check_User_Exists_in_UMGroups() + Try + Dim sel = String.Format("select T1.* from TBDD_GROUPS T, TBDD_GROUPS_USER T1 WHERE T.GUID = T1.GROUP_ID AND T1.USER_ID = {0} AND UPPER(T.NAME) = 'UM_ADMINS'", CURRENT_USER_ID) + Dim DT As DataTable = ClassDatabase.Return_Datatable(sel) + If Not IsNothing(DT) Then + If DT.Rows.Count = 1 Then + If LogErrorsOnly = False Then ClassLogger.Add(" >> User is in UM_ADMINS-Group....", False) + Return True + Else + Return False + End If + Else + Return False + End If + + Catch ex As Exception + MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Check_User_Exists_in_UMGroups:") + Return False + End Try + End Function +End Class diff --git a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj index d951b5a..a5cf666 100644 --- a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj +++ b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj @@ -159,6 +159,7 @@ + frmAbout.vb @@ -235,10 +236,10 @@ Form - - frmProfileDesigner.vb + + frmAdministration.vb - + Form @@ -338,8 +339,8 @@ frmMassValidator.vb - - frmProfileDesigner.vb + + frmAdministration.vb Designer diff --git a/app/DD_PM_WINDREAM/ModuleMySettings.vb b/app/DD_PM_WINDREAM/ModuleMySettings.vb index 5b3381b..954f0e3 100644 --- a/app/DD_PM_WINDREAM/ModuleMySettings.vb +++ b/app/DD_PM_WINDREAM/ModuleMySettings.vb @@ -13,8 +13,11 @@ Module ModuleMySettings Public Viewer As String = "docview" Public IDX_DMS_ERSTELLT = "DMS erstellt" Public IDX_DMS_ERSTELLT_ZEIT = "DMS erstellt (Zeit)" + Public USRMNGRPATH = "" + Public CURRENT_FILE As String = "" + Public vWLaufwerk As String = "W" Public vVERSION_DELIMITER As String = "~" Public vFILE_DELIMITER As String = "_" @@ -77,6 +80,8 @@ Module ModuleMySettings IDX_DMS_ERSTELLT = Row.Item("Value") Case "IDX_DMS_ERSTELLT_ZEIT" IDX_DMS_ERSTELLT_ZEIT = Row.Item("Value") + Case "USRMNGRPATH" + USRMNGRPATH = Row.Item("Value") End Select Next Catch ex As Exception @@ -155,7 +160,10 @@ Module ModuleMySettings newRow9("ConfigName") = "IDX_DMS_ERSTELLT_ZEIT" newRow9("Value") = "DMS erstellt (Zeit)" table.Rows.Add(newRow9) - + Dim newRow10 As DataRow = table.NewRow() + newRow10("ConfigName") = "USRMNGRPATH" + newRow10("Value") = "" + table.Rows.Add(newRow10) table.AcceptChanges() Return table Catch ex As Exception diff --git a/app/DD_PM_WINDREAM/frmProfileDesigner.Designer.vb b/app/DD_PM_WINDREAM/frmAdministration.Designer.vb similarity index 98% rename from app/DD_PM_WINDREAM/frmProfileDesigner.Designer.vb rename to app/DD_PM_WINDREAM/frmAdministration.Designer.vb index c202a87..7d917a3 100644 --- a/app/DD_PM_WINDREAM/frmProfileDesigner.Designer.vb +++ b/app/DD_PM_WINDREAM/frmAdministration.Designer.vb @@ -1,5 +1,5 @@  -Partial Class frmProfileDesigner +Partial Class frmAdministration Inherits System.Windows.Forms.Form 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. @@ -22,9 +22,8 @@ Partial Class frmProfileDesigner 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() Dim GUIDLabel As System.Windows.Forms.Label - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmProfileDesigner)) + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAdministration)) Dim NAMELabel As System.Windows.Forms.Label Dim DESCRIPTIONLabel As System.Windows.Forms.Label Dim WD_SEARCHLabel As System.Windows.Forms.Label @@ -52,7 +51,7 @@ Partial Class frmProfileDesigner Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.SplitContainer_Profilzuordnung2 = New System.Windows.Forms.SplitContainer() Me.gridAssignedUsers = New DevExpress.XtraGrid.GridControl() - Me.TBPROFILE_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPROFILE_USERBindingSource = New System.Windows.Forms.BindingSource() Me.DD_DMSLiteDataSet = New DD_PM_WINDREAM.DD_DMSLiteDataSet() Me.viewAssignedUsers = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colPRENAME1 = New DevExpress.XtraGrid.Columns.GridColumn() @@ -64,7 +63,7 @@ Partial Class frmProfileDesigner Me.Panel1 = New System.Windows.Forms.Panel() Me.Label20 = New System.Windows.Forms.Label() Me.gridAvailableUsers = New DevExpress.XtraGrid.GridControl() - Me.TBDD_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBDD_USERBindingSource = New System.Windows.Forms.BindingSource() Me.viewAvailableUsers = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colPRENAME = New DevExpress.XtraGrid.Columns.GridColumn() Me.colNAME2 = New DevExpress.XtraGrid.Columns.GridColumn() @@ -76,21 +75,21 @@ Partial Class frmProfileDesigner Me.Label19 = New System.Windows.Forms.Label() Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() Me.gridAssignedGroups = New DevExpress.XtraGrid.GridControl() - Me.TBPROFILE_GROUPBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPROFILE_GROUPBindingSource = New System.Windows.Forms.BindingSource() Me.viewAssignedGroups = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colNAME5 = New DevExpress.XtraGrid.Columns.GridColumn() Me.colCOMMENT1 = New DevExpress.XtraGrid.Columns.GridColumn() Me.Panel3 = New System.Windows.Forms.Panel() Me.Label22 = New System.Windows.Forms.Label() Me.gridAvailableGroups = New DevExpress.XtraGrid.GridControl() - Me.TBDD_GROUPSBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBDD_GROUPSBindingSource = New System.Windows.Forms.BindingSource() Me.viewAvailableGroups = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colNAME4 = New DevExpress.XtraGrid.Columns.GridColumn() Me.colCOMMENT = New DevExpress.XtraGrid.Columns.GridColumn() Me.Panel4 = New System.Windows.Forms.Panel() Me.Label23 = New System.Windows.Forms.Label() Me.TableAdapterManager = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TableAdapterManager() - Me.TBPM_PROFILEBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_PROFILEBindingSource = New System.Windows.Forms.BindingSource() Me.TBPM_PROFILETableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_PROFILETableAdapter() Me.BindingNavigatorMoveFirstItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMovePreviousItem = New System.Windows.Forms.ToolStripButton() @@ -102,8 +101,7 @@ Partial Class frmProfileDesigner Me.BindingNavigatorMoveLastItem = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator2 = New System.Windows.Forms.ToolStripSeparator() Me.VWPM_PROFILE_USERBindingNavigatorSaveItem = New System.Windows.Forms.ToolStripButton() - Me.cmbProfiles = New System.Windows.Forms.ToolStripSplitButton() - Me.TBPM_PROFILEBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) + Me.TBPM_PROFILEBindingNavigator = New System.Windows.Forms.BindingNavigator() Me.tstrpbtn_add = New System.Windows.Forms.ToolStripButton() Me.tstrlblSave = New System.Windows.Forms.ToolStripLabel() Me.btnRefreshProfiles = New System.Windows.Forms.ToolStripButton() @@ -121,7 +119,7 @@ Partial Class frmProfileDesigner Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.Label1 = New System.Windows.Forms.Label() Me.cmbType = New System.Windows.Forms.ComboBox() - Me.TBPM_TYPEBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_TYPEBindingSource = New System.Windows.Forms.BindingSource() Me.GroupBox3 = New System.Windows.Forms.GroupBox() Me.MOVE2FOLDERTextBox = New System.Windows.Forms.TextBox() Me.btnmovetoFolderDialog = New System.Windows.Forms.Button() @@ -180,15 +178,15 @@ Partial Class frmProfileDesigner Me.cmbIndexe2 = New System.Windows.Forms.ComboBox() Me.btnSaveSQLCommand = New System.Windows.Forms.Button() Me.SQL_COMMANDTextBox = New System.Windows.Forms.TextBox() - Me.TBPM_PROFILE_FINAL_INDEXINGBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_PROFILE_FINAL_INDEXINGBindingSource = New System.Windows.Forms.BindingSource() Me.btnShowConnections = New System.Windows.Forms.Button() Me.Label14 = New System.Windows.Forms.Label() Me.cmbConnection = New System.Windows.Forms.ComboBox() - Me.TBDD_CONNECTIONBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBDD_CONNECTIONBindingSource = New System.Windows.Forms.BindingSource() Me.Label4 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label6 = New System.Windows.Forms.Label() - Me.TBPM_PROFILE_FINAL_INDEXINGBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) + Me.TBPM_PROFILE_FINAL_INDEXINGBindingNavigator = New System.Windows.Forms.BindingNavigator() Me.BindingNavigatorCountItem4 = New System.Windows.Forms.ToolStripLabel() Me.BindingNavigatorMoveFirstItem4 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMovePreviousItem4 = New System.Windows.Forms.ToolStripButton() @@ -227,7 +225,7 @@ Partial Class frmProfileDesigner Me.btnUserManager = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.VEKTOR_DELIMITERTextBox = New System.Windows.Forms.TextBox() - Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_KONFIGURATIONBindingSource = New System.Windows.Forms.BindingSource() Me.btnConnections = New System.Windows.Forms.Button() Me.btnopen_SQLAdmin = New System.Windows.Forms.Button() Me.EMAIL_ACTIVECheckBox = New System.Windows.Forms.CheckBox() @@ -255,8 +253,8 @@ Partial Class frmProfileDesigner Me.DataGridViewTextBoxColumn23 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn24 = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.DataGridViewTextBoxColumn25 = New System.Windows.Forms.DataGridViewTextBoxColumn() - Me.TBPM_ERROR_LOGBindingSource = New System.Windows.Forms.BindingSource(Me.components) - Me.TBPM_ERROR_LOGBindingNavigator = New System.Windows.Forms.BindingNavigator(Me.components) + Me.TBPM_ERROR_LOGBindingSource = New System.Windows.Forms.BindingSource() + Me.TBPM_ERROR_LOGBindingNavigator = New System.Windows.Forms.BindingNavigator() Me.BindingNavigatorCountItem3 = New System.Windows.Forms.ToolStripLabel() Me.BindingNavigatorDeleteItem1 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveFirstItem3 = New System.Windows.Forms.ToolStripButton() @@ -267,7 +265,7 @@ Partial Class frmProfileDesigner Me.BindingNavigatorMoveNextItem3 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorMoveLastItem3 = New System.Windows.Forms.ToolStripButton() Me.BindingNavigatorSeparator11 = New System.Windows.Forms.ToolStripSeparator() - Me.TBPM_PROFILE_CONTROLSBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_PROFILE_CONTROLSBindingSource = New System.Windows.Forms.BindingSource() Me.StatusStrip1 = New System.Windows.Forms.StatusStrip() Me.tstrpinfo = New System.Windows.Forms.ToolStripStatusLabel() Me.TBPROFILE_USERTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPROFILE_USERTableAdapter() @@ -277,11 +275,12 @@ Partial Class frmProfileDesigner Me.TBPM_ERROR_LOGTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_ERROR_LOGTableAdapter() Me.TBPM_PROFILE_FINAL_INDEXINGTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_PROFILE_FINAL_INDEXINGTableAdapter() Me.TBPM_PROFILE_CONTROLSTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_PROFILE_CONTROLSTableAdapter() - Me.TBPM_PROFILE_FILESBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBPM_PROFILE_FILESBindingSource = New System.Windows.Forms.BindingSource() Me.TBPM_PROFILE_FILESTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPM_PROFILE_FILESTableAdapter() Me.TBDD_CONNECTIONTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBDD_CONNECTIONTableAdapter() Me.TBDD_GROUPSTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBDD_GROUPSTableAdapter() Me.TBPROFILE_GROUPTableAdapter = New DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPROFILE_GROUPTableAdapter() + Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() GUIDLabel = New System.Windows.Forms.Label() NAMELabel = New System.Windows.Forms.Label() DESCRIPTIONLabel = New System.Windows.Forms.Label() @@ -867,13 +866,6 @@ Partial Class frmProfileDesigner resources.ApplyResources(Me.VWPM_PROFILE_USERBindingNavigatorSaveItem, "VWPM_PROFILE_USERBindingNavigatorSaveItem") Me.VWPM_PROFILE_USERBindingNavigatorSaveItem.Name = "VWPM_PROFILE_USERBindingNavigatorSaveItem" ' - 'cmbProfiles - ' - Me.cmbProfiles.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right - Me.cmbProfiles.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text - resources.ApplyResources(Me.cmbProfiles, "cmbProfiles") - Me.cmbProfiles.Name = "cmbProfiles" - ' 'TBPM_PROFILEBindingNavigator ' Me.TBPM_PROFILEBindingNavigator.AddNewItem = Nothing @@ -881,7 +873,7 @@ Partial Class frmProfileDesigner Me.TBPM_PROFILEBindingNavigator.CountItem = Me.BindingNavigatorCountItem Me.TBPM_PROFILEBindingNavigator.CountItemFormat = "von {0} Profilen" Me.TBPM_PROFILEBindingNavigator.DeleteItem = Nothing - Me.TBPM_PROFILEBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.VWPM_PROFILE_USERBindingNavigatorSaveItem, Me.cmbProfiles, Me.tstrpbtn_add, Me.tstrlblSave, Me.btnRefreshProfiles, Me.ToolStripSeparator1, Me.tsbtnDesigner_open, Me.ToolStripSeparator2, Me.tsbtnProfilkopieren, Me.ToolStripSeparator3, Me.tsbtndeleteProfil}) + Me.TBPM_PROFILEBindingNavigator.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BindingNavigatorMoveFirstItem, Me.BindingNavigatorMovePreviousItem, Me.BindingNavigatorSeparator, Me.BindingNavigatorPositionItem, Me.BindingNavigatorCountItem, Me.BindingNavigatorSeparator1, Me.BindingNavigatorMoveNextItem, Me.BindingNavigatorMoveLastItem, Me.BindingNavigatorSeparator2, Me.VWPM_PROFILE_USERBindingNavigatorSaveItem, Me.tstrpbtn_add, Me.tstrlblSave, Me.btnRefreshProfiles, Me.ToolStripSeparator1, Me.tsbtnDesigner_open, Me.ToolStripSeparator2, Me.tsbtnProfilkopieren, Me.ToolStripSeparator3, Me.tsbtndeleteProfil}) resources.ApplyResources(Me.TBPM_PROFILEBindingNavigator, "TBPM_PROFILEBindingNavigator") Me.TBPM_PROFILEBindingNavigator.MoveFirstItem = Me.BindingNavigatorMoveFirstItem Me.TBPM_PROFILEBindingNavigator.MoveLastItem = Me.BindingNavigatorMoveLastItem @@ -2141,13 +2133,17 @@ Partial Class frmProfileDesigner ' Me.TBPROFILE_GROUPTableAdapter.ClearBeforeFill = True ' - 'frmProfileDesigner + 'OpenFileDialog1 + ' + Me.OpenFileDialog1.FileName = "OpenFileDialog1" + ' + 'frmAdministration ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.pnlMain) Me.Controls.Add(Me.StatusStrip1) - Me.Name = "frmProfileDesigner" + Me.Name = "frmAdministration" Me.SplitContainer_Profilzuordnung2.Panel1.ResumeLayout(False) Me.SplitContainer_Profilzuordnung2.Panel2.ResumeLayout(False) CType(Me.SplitContainer_Profilzuordnung2, System.ComponentModel.ISupportInitialize).EndInit() @@ -2259,7 +2255,6 @@ Partial Class frmProfileDesigner Friend WithEvents BindingNavigatorMoveLastItem As System.Windows.Forms.ToolStripButton Friend WithEvents BindingNavigatorSeparator2 As System.Windows.Forms.ToolStripSeparator Friend WithEvents VWPM_PROFILE_USERBindingNavigatorSaveItem As System.Windows.Forms.ToolStripButton - Friend WithEvents cmbProfiles As System.Windows.Forms.ToolStripSplitButton Friend WithEvents TBPM_PROFILEBindingNavigator As System.Windows.Forms.BindingNavigator Friend WithEvents btnWDSuche As System.Windows.Forms.Button Friend WithEvents TITLETextBox As System.Windows.Forms.TextBox @@ -2478,4 +2473,5 @@ Partial Class frmProfileDesigner Friend WithEvents GridColumn3 As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents GridColumn4 As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents tsBtnCancel As ToolStripButton + Friend WithEvents OpenFileDialog1 As OpenFileDialog End Class diff --git a/app/DD_PM_WINDREAM/frmProfileDesigner.resx b/app/DD_PM_WINDREAM/frmAdministration.resx similarity index 99% rename from app/DD_PM_WINDREAM/frmProfileDesigner.resx rename to app/DD_PM_WINDREAM/frmAdministration.resx index cb0cc91..38ce259 100644 --- a/app/DD_PM_WINDREAM/frmProfileDesigner.resx +++ b/app/DD_PM_WINDREAM/frmAdministration.resx @@ -1638,30 +1638,6 @@ der Wertänderungen nutzen wollen: Daten speichern - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - - - Magenta - - - 122, 22 - - - Kein Profil gewählt - 541, 17 @@ -3028,7 +3004,7 @@ der Wertänderungen nutzen wollen: 3, 3, 3, 3 - 1601, 684 + 1601, 690 0 @@ -3333,7 +3309,7 @@ der Wertänderungen nutzen wollen: 3, 3, 3, 3 - 1601, 687 + 1601, 693 1 @@ -3360,7 +3336,7 @@ der Wertänderungen nutzen wollen: 668, 161 - 1609, 713 + 1609, 719 90 @@ -3652,7 +3628,7 @@ der Wertänderungen nutzen wollen: 9, 161 - 653, 731 + 653, 737 75 @@ -3802,7 +3778,7 @@ der Wertänderungen nutzen wollen: 3, 3, 3, 3 - 1235, 445 + 1235, 448 1 @@ -5104,6 +5080,9 @@ der Wertänderungen nutzen wollen: 460, 212 + + 689, 212 + True @@ -5436,12 +5415,6 @@ der Wertänderungen nutzen wollen: System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmbProfiles - - - System.Windows.Forms.ToolStripSplitButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tstrpbtn_add @@ -5856,8 +5829,14 @@ der Wertänderungen nutzen wollen: DD_PM_WINDREAM.DD_DMSLiteDataSetTableAdapters.TBPROFILE_GROUPTableAdapter, DD_DMSLiteDataSet.Designer.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + OpenFileDialog1 + + + System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + - frmProfileDesigner + frmAdministration System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/app/DD_PM_WINDREAM/frmProfileDesigner.vb b/app/DD_PM_WINDREAM/frmAdministration.vb similarity index 95% rename from app/DD_PM_WINDREAM/frmProfileDesigner.vb rename to app/DD_PM_WINDREAM/frmAdministration.vb index bc6d871..64c35a4 100644 --- a/app/DD_PM_WINDREAM/frmProfileDesigner.vb +++ b/app/DD_PM_WINDREAM/frmAdministration.vb @@ -5,29 +5,14 @@ Imports DD_LIB_Standards Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid -Public Class frmProfileDesigner +Public Class frmAdministration Private _windreamPM As ClassPMWindream Private email As New ClassEmail Public profile_guid As Integer = 0 Dim formloaded As Boolean Private INSERT_ACTIVE As Boolean = False - Private Sub LoadProfilesInCombobox() - 'Schreibt die Profile in die Combobox in der Toolbar. - Try - Me.cmbProfiles.DropDownItems.Clear() - Me.TBPM_PROFILETableAdapter.Fill(Me.DD_DMSLiteDataSet.TBPM_PROFILE) - If Me.DD_DMSLiteDataSet.TBPM_PROFILE.Rows.Count > 0 Then - Dim anz As Integer = 0 - For Each row As DataRow In Me.DD_DMSLiteDataSet.TBPM_PROFILE.Rows - Me.cmbProfiles.DropDownItems.Add(row.Item("NAME")) - anz = anz + 1 - Next - End If - Catch ex As Exception - MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der Profile in Auswahlliste:") - End Try - End Sub + Private Sub frmFormDesigner_Load(sender As Object, e As System.EventArgs) Handles Me.Load formloaded = False @@ -53,7 +38,12 @@ Public Class frmProfileDesigner dragDropManager.AddGridView(viewAvailableGroups) dragDropManager.AddGridView(viewAssignedGroups) - If clsModules.IsModuleInstalled("User Manager") Then + 'If clsModules.IsModuleInstalled("User Manager") Then + ' btnUserManager.Enabled = True + 'Else + ' btnUserManager.Enabled = False + 'End If + If ClassUser.Check_User_Exists_in_UMGroups = True Then btnUserManager.Enabled = True Else btnUserManager.Enabled = False @@ -71,7 +61,6 @@ Public Class frmProfileDesigner Catch ex As Exception MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:") End Try - LoadProfilesInCombobox() ObjekttypenEintragen() Indexe_eintragen() End Sub @@ -154,20 +143,6 @@ Public Class frmProfileDesigner MsgBox("Es konnte keine Verbindung zum windream-Server hergestellt werden.", MsgBoxStyle.Critical, "Fehler beim Zugriff auf windream-Server") End Try - End Sub - Private Sub cmbProfiles_DropDownItemClicked(sender As Object, e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmbProfiles.DropDownItemClicked - cmbProfiles.Text = e.ClickedItem.Text - Dim anz As Integer = 0 - For Each row As DataRow In Me.DD_DMSLiteDataSet.TBPM_PROFILE.Rows - If e.ClickedItem.Text = row.Item("NAME") Then - Me.TBPM_PROFILEBindingSource.Position = anz - End If - anz = anz + 1 - Next - End Sub - - Private Sub cmbProfiles_ButtonClick(sender As System.Object, e As System.EventArgs) Handles cmbProfiles.ButtonClick - End Sub Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btnWDSuche.Click @@ -218,11 +193,6 @@ Public Class frmProfileDesigner Private Sub TBPM_PROFILEBindingSource_PositionChanged(sender As System.Object, e As System.EventArgs) Handles TBPM_PROFILEBindingSource.PositionChanged tstrlblSave.Visible = False - If NAMETextBox.Text = "" Then - cmbProfiles.Text = "Kein Profil gewählt" - Else - cmbProfiles.Text = NAMETextBox.Text - End If Indexe_eintragen() If tabctrl_Profilkonfig.SelectedIndex = 1 And TBPM_PROFILEBindingSource.Position <> -1 Then Refresh_Final_indexe() @@ -942,20 +912,37 @@ Public Class frmProfileDesigner Private Sub btnUserManager_Click(sender As Object, e As EventArgs) Handles btnUserManager.Click Try - Dim userManagerPath As String = clsModules.GetModulePath("User Manager") - - If userManagerPath Is Nothing Then - MsgBox("Pfad zu User Manager konnte nicht gefunden werden!", MsgBoxStyle.Critical) - Else - - Dim exePath As String = Path.Combine(userManagerPath, "DDUserManager.exe") - - If File.Exists(exePath) Then - Dim psi As New ProcessStartInfo(exePath) - Process.Start(psi) - Else - MsgBox("Programm User Manager konnte nicht gefunden werden!", MsgBoxStyle.Critical) - End If + 'Dim userManagerPath As String = clsModules.GetModulePath("User Manager") + + 'If userManagerPath Is Nothing Then + ' MsgBox("Pfad zu User Manager konnte nicht gefunden werden!", MsgBoxStyle.Critical) + 'Else + + ' Dim exePath As String = Path.Combine(userManagerPath, "DDUserManager.exe") + + ' If File.Exists(exePath) Then + ' Dim psi As New ProcessStartInfo(exePath) + ' Process.Start(psi) + ' Else + ' MsgBox("Programm User Manager konnte nicht gefunden werden!", MsgBoxStyle.Critical) + ' End If + 'End If + + If USRMNGRPATH = "" Then + With OpenFileDialog1 + ' Do + .Filter = "DDUserManager.Exe|*.exe" + .FilterIndex = 1 + .Title = "search DDUserManager.exe:" + If .ShowDialog() = DialogResult.OK Then + + USRMNGRPATH = .FileName + SaveMySettingsValue("USRMNGRPATH", .FileName) + End If + End With + End If + If System.IO.File.Exists(USRMNGRPATH) Then + Process.Start(USRMNGRPATH) End If Catch ex As Exception MsgBox("Error while startign User Manager:" & vbCrLf & ex.Message, MsgBoxStyle.Critical) diff --git a/app/DD_PM_WINDREAM/frmLoginAdmin.vb b/app/DD_PM_WINDREAM/frmLoginAdmin.vb index 33336f3..0c52244 100644 --- a/app/DD_PM_WINDREAM/frmLoginAdmin.vb +++ b/app/DD_PM_WINDREAM/frmLoginAdmin.vb @@ -24,14 +24,14 @@ Public Class frmLoginAdmin If txtPW.Text = "35452dd!" Then Me.Hide() - frmProfileDesigner.ShowDialog() + frmAdministration.ShowDialog() Me.Close() Exit Sub End If If encoded_oldPW = akt_pw Then Me.Hide() - frmProfileDesigner.ShowDialog() + frmAdministration.ShowDialog() Me.Close() Else MsgBox("Achtung das eingegebene Passwort ist nicht korrekt!", MsgBoxStyle.Exclamation) diff --git a/app/DD_PM_WINDREAM/frmMain.vb b/app/DD_PM_WINDREAM/frmMain.vb index 7a53eae..1b107dc 100644 --- a/app/DD_PM_WINDREAM/frmMain.vb +++ b/app/DD_PM_WINDREAM/frmMain.vb @@ -585,7 +585,7 @@ Public Class frmMain End Function Sub LoadProfile_PM() Try - If Me.Visible = True And frmProfileDesigner.Visible = False Then + If Me.Visible = True And frmAdministration.Visible = False Then Load_Profiles_for_User() PROFILE_COUNT = 0 @@ -682,6 +682,9 @@ Public Class frmMain End Sub Private Sub Decide_Load() Try + If USER_EXISTS = False Then + Exit Sub + End If If TimerRefresh.Enabled = True Then TimerRefresh.Stop() End If @@ -703,7 +706,7 @@ Public Class frmMain If AdminSecurity = True Then frmLoginAdmin.ShowDialog() Else - frmProfileDesigner.ShowDialog() + frmAdministration.ShowDialog() End If Decide_Load() End Sub diff --git a/app/DD_PM_WINDREAM/frmMassValidator.vb b/app/DD_PM_WINDREAM/frmMassValidator.vb index 1ba8200..f14a33b 100644 --- a/app/DD_PM_WINDREAM/frmMassValidator.vb +++ b/app/DD_PM_WINDREAM/frmMassValidator.vb @@ -69,6 +69,8 @@ Public Class frmMassValidator PROFIL_VEKTORINDEX = dr.Item("PM_VEKTOR_INDEX") PROFIL_LOGINDEX = dr.Item("LOG_INDEX") Me.Text = "Process Manager - " & dr.Item("TITLE") + TITLELabel1.Text = dr.Item("TITLE") + DESCRIPTIONLabel.Text = IIf(IsDBNull(dr.Item("DESCRIPTION")), "", dr.Item("DESCRIPTION")) If PROFIL_VEKTORINDEX.GetType.ToString.ToLower = "system.dbnull" Then PROFIL_VEKTORINDEX = "" End If @@ -224,9 +226,10 @@ Public Class frmMassValidator sqlCnn.Close() End If Catch ex As Exception - ClassLogger.Add("Unexpected Error in running depending sql-command: " & ex.Message) - MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:") - End Try + ClassLogger.Add("Unexpected Error in running depending sql-command: " & ex.Message) + Clipboard.SetText("Error: " & ex.Message & vbNewLine & "SQL: " & CURR_SELECT_CONTROL) + MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error in running depending sql-command:") + End Try End If Else If LogErrorsOnly = False Then ClassLogger.Add(" >> Else Row 571", False)