IDB Conform Step1
This commit is contained in:
@@ -111,7 +111,7 @@ Public Class frmMain
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
LOGGER.Info(">> Username: " & Environment.UserName, False)
|
||||
LOGGER.Info(">> Username: " & USER_USERNAME, False)
|
||||
'Wenn license abgelaufen und der User nicht admin ist!
|
||||
If LICENSE_EXPIRED = True Then
|
||||
If USER_IS_ADMIN = False Then
|
||||
@@ -138,7 +138,7 @@ Public Class frmMain
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Fehler bei User Check:")
|
||||
End Try
|
||||
tsstlblUser.Text = Environment.UserName
|
||||
tsstlblUser.Text = USER_USERNAME
|
||||
|
||||
|
||||
Try
|
||||
@@ -173,21 +173,23 @@ Public Class frmMain
|
||||
End Try
|
||||
Check_Timer_Notification()
|
||||
Restore_Form_Position()
|
||||
If IDB_ACTIVE = False Then
|
||||
Try
|
||||
WINDREAM = New ClassPMWindream
|
||||
WINDREAM.Start_WMCC_andCo()
|
||||
|
||||
Try
|
||||
WINDREAM = New ClassPMWindream
|
||||
WINDREAM.Start_WMCC_andCo()
|
||||
'_windreamPM = New ClassPMWindream
|
||||
'_windreamPM.Start_WMCC_andCo()
|
||||
If WINDREAM.oSession.aLoggedin = False Then
|
||||
MsgBox("Login on windream was not possible. Please check the log." & vbNewLine & "Application will close now!", MsgBoxStyle.Critical)
|
||||
Me.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
End Try
|
||||
End If
|
||||
|
||||
'_windreamPM = New ClassPMWindream
|
||||
'_windreamPM.Start_WMCC_andCo()
|
||||
If WINDREAM.oSession.aLoggedin = False Then
|
||||
MsgBox("Login on windream was not possible. Please check the log." & vbNewLine & "Application will close now!", MsgBoxStyle.Critical)
|
||||
Me.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected Error in windream-login - Step 5: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
End Try
|
||||
|
||||
LOGGER.Debug("MainForm initialized!")
|
||||
End If
|
||||
@@ -370,7 +372,7 @@ Public Class frmMain
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Load_Profile_items - Error: " & ex.Message)
|
||||
MsgBox("Unexpected Error in Load_Profile_items - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
'MsgBox("Unexpected Error in Load_Profile_items - Error: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@@ -620,7 +622,7 @@ Public Class frmMain
|
||||
sql = clsPatterns.ReplaceUserValues(sql, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
sql = sql.Replace("@USER_ID", USER_ID)
|
||||
sql = sql.Replace("@USERNAME", Environment.UserName)
|
||||
sql = sql.Replace("@USERNAME", USER_USERNAME)
|
||||
sql = sql.Replace("@MACHINE_NAME", Environment.MachineName)
|
||||
sql = sql.Replace("@DATE", Now.ToShortDateString)
|
||||
sql = sql.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
||||
@@ -771,14 +773,14 @@ Public Class frmMain
|
||||
|
||||
' ' this needs to stay for backwards compatibility
|
||||
' sql = sql.Replace("@USER_ID", USER_ID)
|
||||
' sql = sql.Replace("@USERNAME", Environment.UserName) '{#INT#USERNAME}
|
||||
' sql = sql.Replace("@USERNAME", USER_USERNAME) '{#INT#USERNAME}
|
||||
' sql = sql.Replace("@MACHINE_NAME", Environment.MachineName) '{#INT#machineName}
|
||||
' sql = sql.Replace("@DATE", Now.ToShortDateString)
|
||||
' sql = sql.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
' 'String.Format("SELECT '1' TL_STATE,T.PROFIL_ID,T1.TITLE, T.DOC_ID, T.FILE_PATH, T.DMS_ERSTELLT_DATE,[dbo].[FNPM_LAST_WORKUSER_DOC] (T.PROFIL_ID,T.DOC_ID) AS 'Last User',[dbo].[FNPM_LAST_EDITED_DOC] (T.PROFIL_ID,T.DOC_ID) as 'Last edited' FROM TBPM_PROFILE_FILES T, VWPM_PROFILE_USER T1 " &
|
||||
' ' "WHERE T.PROFIL_ID = T1.PROFIL_ID " &
|
||||
' ' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", Environment.UserName)
|
||||
' ' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", USER_USERNAME)
|
||||
' CURR_DT_PROFILEGRID = ClassDatabase.Return_Datatable(sql, True)
|
||||
|
||||
' If Not IsNothing(CURR_DT_PROFILEGRID) Then
|
||||
@@ -893,12 +895,10 @@ Public Class frmMain
|
||||
ElseIf GRID_LOAD_TYPE.StartsWith("PROFILE#") Then
|
||||
Load_single_Profile()
|
||||
End If
|
||||
If WORKING_MODE <> "" Then
|
||||
If WORKING_MODE.Contains("PM#NO_MASS_VALIDATOR") Then
|
||||
GridView_Docs.OptionsSelection.MultiSelect = False
|
||||
tsmiMarkedFilesFinish.Visible = False
|
||||
ToolStripSeparator4.Visible = False
|
||||
End If
|
||||
If SHOW_MASS_VALIDATOR = False Then
|
||||
GridView_Docs.OptionsSelection.MultiSelect = False
|
||||
tsmiMarkedFilesFinish.Visible = False
|
||||
ToolStripSeparator4.Visible = False
|
||||
Else
|
||||
tsmiMarkedFilesFinish.Visible = True
|
||||
ToolStripSeparator4.Visible = True
|
||||
@@ -967,9 +967,9 @@ Public Class frmMain
|
||||
|
||||
|
||||
Sub Load_Profil_from_Grid(ID As Integer)
|
||||
Try
|
||||
Me.Visible = False
|
||||
CURRENT_ProfilGUID = ID
|
||||
'Try
|
||||
'Me.Visible = False
|
||||
CURRENT_ProfilGUID = ID
|
||||
CURRENT_ProfilName = ClassDatabase.Execute_Scalar("SELECT NAME FROM TBPM_PROFILE WHERE GUID = " & CURRENT_ProfilGUID, CONNECTION_STRING)
|
||||
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
||||
CURRENT_DT_PROFILE_SEARCHES_DOC = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_SEARCH where PROFILE_ID = {0} AND TYPE = 'DOC' AND ACTIVE = 1 ORDER BY TAB_INDEX", CURRENT_ProfilGUID))
|
||||
@@ -981,11 +981,11 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
frmValidator.ShowDialog()
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Profil_from_Grid: ")
|
||||
End Try
|
||||
Me.Visible = True
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in Load_Profil_from_Grid: ")
|
||||
'End Try
|
||||
' Me.Visible = True
|
||||
Decide_Load()
|
||||
|
||||
End Sub
|
||||
@@ -1020,9 +1020,9 @@ Public Class frmMain
|
||||
Item_Scope("CMROW")
|
||||
End Sub
|
||||
Private Sub Item_Scope(startedFrom As String)
|
||||
Try
|
||||
'GridView_Docs.EndSelection()
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
'Try
|
||||
'GridView_Docs.EndSelection()
|
||||
CURRENT_JUMP_DOC_GUID = 0
|
||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||
|
||||
Dim groupRowText
|
||||
@@ -1102,11 +1102,23 @@ Public Class frmMain
|
||||
MsgBox("Could not get the ProfileID of file! - Check Your configuration of MainView!", MsgBoxStyle.Critical)
|
||||
|
||||
End If
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical)
|
||||
'End Try
|
||||
End Sub
|
||||
Private Function Init_IDB()
|
||||
Try
|
||||
IDBData = New ClassIDBData()
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
MsgBox("Unexpected error in Item_Scope: " & ex.Message, MsgBoxStyle.Critical)
|
||||
MsgBox("Error Init_IDB:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
LOGGER.Info(">> Unexpected error in Init_IDB: " & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Sub
|
||||
End Function
|
||||
Private Function Init_windream()
|
||||
Try
|
||||
'_windream = New ClassWindream_allgemein
|
||||
@@ -1150,7 +1162,16 @@ Public Class frmMain
|
||||
MsgBox("Could not select a profile!", MsgBoxStyle.Exclamation, "Mass Validation")
|
||||
Exit Sub
|
||||
End If
|
||||
If Init_windream() Then
|
||||
|
||||
If IDB_ACTIVE = False Then
|
||||
SOURCE_INIT = Init_windream()
|
||||
|
||||
Else
|
||||
SOURCE_INIT = Init_IDB()
|
||||
End If
|
||||
|
||||
|
||||
If SOURCE_INIT = True Then
|
||||
|
||||
CURRENT_ProfilGUID = oProfileId
|
||||
CURRENT_DT_FINAL_INDEXING = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_FINAL_INDEXING where PROFIL_ID = {0}", CURRENT_ProfilGUID))
|
||||
@@ -1230,7 +1251,7 @@ Public Class frmMain
|
||||
tslblmessage.Text = ""
|
||||
|
||||
If CURRENT_DT_VW_PROFILE_USER.Rows.Count = 0 Then
|
||||
LOGGER.Info(" >> no profiles for user: '" & Environment.UserName & "' configured!", False)
|
||||
LOGGER.Info(" >> no profiles for user: '" & USER_USERNAME & "' configured!", False)
|
||||
NO_WORKFLOWITEMS = True
|
||||
tslblmessage.Text = "Keine Profile für Ihren User hinterlegt"
|
||||
|
||||
@@ -1251,14 +1272,14 @@ Public Class frmMain
|
||||
oSQLOverview = clsPatterns.ReplaceUserValues(oSQLOverview, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
oSQLOverview = oSQLOverview.Replace("@USER_ID", USER_ID)
|
||||
oSQLOverview = oSQLOverview.Replace("@USERNAME", Environment.UserName)
|
||||
oSQLOverview = oSQLOverview.Replace("@USERNAME", USER_USERNAME)
|
||||
oSQLOverview = oSQLOverview.Replace("@MACHINE_NAME", Environment.MachineName)
|
||||
oSQLOverview = oSQLOverview.Replace("@DATE", Now.ToShortDateString)
|
||||
oSQLOverview = oSQLOverview.Replace("@PROFILE_ID", CURRENT_CLICKED_PROFILE_ID)
|
||||
|
||||
'String.Format("SELECT '1' TL_STATE,T.PROFIL_ID,T1.TITLE, T.DOC_ID, T.FILE_PATH, T.DMS_ERSTELLT_DATE,[dbo].[FNPM_LAST_WORKUSER_DOC] (T.PROFIL_ID,T.DOC_ID) AS 'Last User',[dbo].[FNPM_LAST_EDITED_DOC] (T.PROFIL_ID,T.DOC_ID) as 'Last edited' FROM TBPM_PROFILE_FILES T, VWPM_PROFILE_USER T1 " &
|
||||
' "WHERE T.PROFIL_ID = T1.PROFIL_ID " &
|
||||
' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", Environment.UserName)
|
||||
' "AND T1.ACTIVE = 1 And (UPPER(T1.USERNAME) = UPPER('{0}')) Order By T1.PRIORITY", USER_USERNAME)
|
||||
CURR_DT_PROFILEGRID = ClassDatabase.Return_Datatable(oSQLOverview, True)
|
||||
Dim DTGRID_GROUPS As DataTable
|
||||
Try
|
||||
@@ -1606,7 +1627,7 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Timer5Mins_Tick(sender As Object, e As EventArgs) Handles Timer5Mins.Tick
|
||||
Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", Environment.UserName, CLIENT_SELECTED)
|
||||
Dim sql = String.Format("SELECT * FROM [dbo].[FNDD_CHECK_USER_MODULE] ('{0}','PM',{1})", USER_USERNAME, CLIENT_SELECTED)
|
||||
Dim DT_CHECKUSER_MODULE As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
ClassParamRefresh.Refresh_Params(DT_CHECKUSER_MODULE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user