jj: fix mass validation
This commit is contained in:
parent
c5ff6c5769
commit
37d945f0b7
@ -904,38 +904,57 @@ Public Class frmMain
|
|||||||
Dim selectedRows As Integer() = GridView_Docs.GetSelectedRows()
|
Dim selectedRows As Integer() = GridView_Docs.GetSelectedRows()
|
||||||
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
Dim hitInfo As GridHitInfo = GridView_Docs.CalcHitInfo(GridCursorLocation)
|
||||||
Dim workedFiles As Integer = 0
|
Dim workedFiles As Integer = 0
|
||||||
Dim dt As New DataTable
|
|
||||||
dt.Columns.Add("DOC_ID")
|
|
||||||
dt.Columns.Add("DOC_GUID")
|
|
||||||
dt.Columns.Add("FULL_PATH")
|
|
||||||
|
|
||||||
|
|
||||||
If Init_windream() = True Then
|
Dim profileId = 0
|
||||||
CURRENT_ProfilGUID = 0
|
|
||||||
Dim i As Integer = 0
|
If selectedRows.Count = 0 Then
|
||||||
|
If CURRENT_USER_LANGUAGE = "de-DE" Then
|
||||||
|
MsgBox("Bitte selektieren Sie einige 1 oder mehr Dokumente", MsgBoxStyle.Exclamation, "Massenabschluss")
|
||||||
|
Else
|
||||||
|
MsgBox("Please select some documents!", MsgBoxStyle.Exclamation, "Mass Validation")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If GridView_Docs.IsGroupRow(hitInfo.RowHandle) Then
|
||||||
|
Dim groupRowHandle = hitInfo.RowHandle
|
||||||
|
|
||||||
|
Dim childRows As Integer = GridView_Docs.GetChildRowCount(groupRowHandle)
|
||||||
|
|
||||||
|
If childRows > 0 Then
|
||||||
|
Dim childRowHandle = GridView_Docs.GetChildRowHandle(groupRowHandle, 0)
|
||||||
|
|
||||||
|
profileId = GridView_Docs.GetRowCellValue(childRowHandle, "PROFILE_ID")
|
||||||
|
Else
|
||||||
|
MsgBox("This profile has no documents!")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim parentRowHandle = GridView_Docs.GetParentRowHandle(hitInfo.RowHandle)
|
||||||
|
Dim dataRowHandle = GridView_Docs.GetDataRowHandleByGroupRowHandle(parentRowHandle)
|
||||||
|
|
||||||
|
profileId = GridView_Docs.GetRowCellValue(dataRowHandle, "PROFILE_ID")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Init_windream() Then
|
||||||
|
|
||||||
|
CURRENT_ProfilGUID = profileId
|
||||||
|
CURRENT_DT_FINAL_INDEXING = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_FINAL_INDEXING where PROFIL_ID = {0}", CURRENT_ProfilGUID))
|
||||||
|
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
||||||
|
CURRENT_PROFILE_VEKTOR_LOG = CURRENT_DT_PROFILE.Rows(0).Item("PM_VEKTOR_INDEX")
|
||||||
|
If CURRENT_PROFILE_VEKTOR_LOG = "" Then
|
||||||
|
CURRENT_PROFILE_VEKTOR_LOG = CURRENT_DT_PROFILE.Rows(0).Item("LOG_INDEX")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt.Columns.Add("DOC_ID")
|
||||||
|
dt.Columns.Add("DOC_GUID")
|
||||||
|
dt.Columns.Add("FULL_PATH")
|
||||||
|
|
||||||
For Each rowhandle As Integer In selectedRows
|
For Each rowhandle As Integer In selectedRows
|
||||||
Dim R As DataRow = dt.NewRow
|
Dim R As DataRow = dt.NewRow
|
||||||
Dim PROFILE_ID As Integer = 0
|
|
||||||
PROFILE_ID = GridView_Docs.GetRowCellValue(GridView_Docs.GetDataRowHandleByGroupRowHandle(GridView_Docs.GetParentRowHandle(hitInfo.RowHandle)), GridView_Docs.Columns("PROFILE_ID"))
|
|
||||||
If i = 0 And CURRENT_ProfilGUID = 0 Then
|
|
||||||
CURRENT_ProfilGUID = PROFILE_ID
|
|
||||||
CURRENT_DT_FINAL_INDEXING = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE_FINAL_INDEXING where PROFIL_ID = {0}", CURRENT_ProfilGUID))
|
|
||||||
CURRENT_DT_PROFILE = ClassDatabase.Return_Datatable(String.Format("select * from TBPM_PROFILE where GUID = {0}", CURRENT_ProfilGUID))
|
|
||||||
CURRENT_PROFILE_VEKTOR_LOG = CURRENT_DT_PROFILE.Rows(0).Item("PM_VEKTOR_INDEX")
|
|
||||||
If CURRENT_PROFILE_VEKTOR_LOG = "" Then
|
|
||||||
CURRENT_PROFILE_VEKTOR_LOG = CURRENT_DT_PROFILE.Rows(0).Item("LOG_INDEX")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If PROFILE_ID <> CURRENT_ProfilGUID Then
|
|
||||||
If CURRENT_USER_LANGUAGE <> "de_DE" Then
|
|
||||||
MsgBox("Sorry but You can only mass-validate docs which belong to he same profile!", MsgBoxStyle.Exclamation)
|
|
||||||
Else
|
|
||||||
MsgBox("Bitte bachten Sie dass Sie nur Dokumente, welche zum gleichen Profil gehören, mit der Massenfunktion bearbeiten können!", MsgBoxStyle.Exclamation)
|
|
||||||
End If
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Dim DOC_ID = GridView_Docs.GetRowCellValue(rowhandle, "DOC_ID")
|
Dim DOC_ID = GridView_Docs.GetRowCellValue(rowhandle, "DOC_ID")
|
||||||
CURRENT_DOC_ID = DOC_ID
|
CURRENT_DOC_ID = DOC_ID
|
||||||
Dim DOC_PATH = GridView_Docs.GetRowCellValue(rowhandle, "FULL_FILE_PATH")
|
Dim DOC_PATH = GridView_Docs.GetRowCellValue(rowhandle, "FULL_FILE_PATH")
|
||||||
@ -945,18 +964,22 @@ Public Class frmMain
|
|||||||
R("FULL_PATH") = CURRENT_DOC_PATH
|
R("FULL_PATH") = CURRENT_DOC_PATH
|
||||||
R("DOC_GUID") = GridView_Docs.GetRowCellValue(rowhandle, "GUID")
|
R("DOC_GUID") = GridView_Docs.GetRowCellValue(rowhandle, "GUID")
|
||||||
dt.Rows.Add(R)
|
dt.Rows.Add(R)
|
||||||
CURRENT_DT_MASS_CHANGE_DOCS = Nothing
|
|
||||||
CURRENT_DT_MASS_CHANGE_DOCS = dt
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
CURRENT_DT_MASS_CHANGE_DOCS = Nothing
|
||||||
|
CURRENT_DT_MASS_CHANGE_DOCS = dt
|
||||||
|
|
||||||
|
frmMassValidator.ShowDialog()
|
||||||
|
|
||||||
|
Load_Profile_items()
|
||||||
|
Decide_Load()
|
||||||
|
Else
|
||||||
|
If CURRENT_USER_LANGUAGE = "de-DE" Then
|
||||||
|
MsgBox("Massenabschluss konnte nicht ausgeführt werden, weil windream nicht initialisiert werden konnte!", MsgBoxStyle.Critical, "Massenabschluss")
|
||||||
|
Else
|
||||||
|
MsgBox("Massvalidation could not be completed because of an error in windream", MsgBoxStyle.Critical, "Massvalidation")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
frmMassValidator.ShowDialog()
|
|
||||||
|
|
||||||
|
|
||||||
Load_Profile_items()
|
|
||||||
Decide_Load()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CMGroupStart_Click(sender As Object, e As EventArgs) Handles CMGroupStart.Click
|
Private Sub CMGroupStart_Click(sender As Object, e As EventArgs) Handles CMGroupStart.Click
|
||||||
Item_Scope()
|
Item_Scope()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user