diff --git a/MultiTool.Common/Documents/Document.vb b/MultiTool.Common/Documents/Document.vb index f525463..4684ecc 100644 --- a/MultiTool.Common/Documents/Document.vb +++ b/MultiTool.Common/Documents/Document.vb @@ -19,7 +19,6 @@ Namespace Documents ''' Public Property Rows As New List(Of DocumentRow) - Public Property Selected As Boolean = False Public Property Imported As Boolean = False Public ReadOnly Property HasErrors As Boolean diff --git a/MultiTool.Common/Winline/WinlineData.vb b/MultiTool.Common/Winline/WinlineData.vb index c1c4569..8201e7f 100644 --- a/MultiTool.Common/Winline/WinlineData.vb +++ b/MultiTool.Common/Winline/WinlineData.vb @@ -701,6 +701,8 @@ Namespace Winline Where(Function(item) item.DestinationName = "MANDATOR" And item.DestinationValue = oMandator.Id And item.SourceName = "ARTICLE"). ToList() + Logger.Debug("Processing [{0}] Mappings for Articlenumber [{1}]", oMappingConfigItems.Count, oArticleNumber) + ' If not match was found, continune to next mandator. ' For a catch all mandator, a regex like ".+" is needed. For Each oItem In oMappingConfigItems diff --git a/MultiTool.Form/frmImportMain.vb b/MultiTool.Form/frmImportMain.vb index 5a0c36d..abbbede 100644 --- a/MultiTool.Form/frmImportMain.vb +++ b/MultiTool.Form/frmImportMain.vb @@ -136,17 +136,36 @@ Public Class frmImportMain #Region "Grid Events" Private Sub GridViewFiles_CustomDrawCell(sender As Object, e As Views.Base.RowCellCustomDrawEventArgs) Handles GridViewFiles.CustomDrawCell - Dim oDocument As Document = GridViewFiles.GetRow(e.RowHandle) + Try + Dim oDocument As Document = GridViewFiles.GetRow(e.RowHandle) - If oDocument.HasErrors Then - e.Appearance.Options.UseBackColor = True - e.Appearance.BackColor = Color.LightCoral - End If + If oDocument.Equals(CurrentDocument) Then + e.Appearance.Options.UseBackColor = True + e.Appearance.BackColor = Color.LightYellow + End If - If oDocument.Imported Then - e.Appearance.Options.UseBackColor = True - e.Appearance.BackColor = Color.LightGreen - End If + If oDocument.HasErrors Then + e.Appearance.Options.UseBackColor = True + e.Appearance.BackColor = Color.LightCoral + End If + + If oDocument.HasErrors And oDocument.Equals(CurrentDocument) Then + e.Appearance.Options.UseBackColor = True + e.Appearance.BackColor = Color.Coral + End If + + If oDocument.Imported Then + e.Appearance.Options.UseBackColor = True + e.Appearance.BackColor = Color.LightGreen + End If + + If oDocument.Imported And oDocument.Equals(CurrentDocument) Then + e.Appearance.Options.UseBackColor = True + e.Appearance.BackColor = Color.Green + End If + Catch ex As Exception + Logger.Error(ex) + End Try End Sub Private Sub GridView_CustomDrawCell(sender As Object, e As Views.Base.RowCellCustomDrawEventArgs)