Index: ActiviteitenOpvolging/ProductiePitching/mappers/EmployeesDatabaseMapper.vb =================================================================== diff -u -r1760 -r1763 --- ActiviteitenOpvolging/ProductiePitching/mappers/EmployeesDatabaseMapper.vb (.../EmployeesDatabaseMapper.vb) (revision 1760) +++ ActiviteitenOpvolging/ProductiePitching/mappers/EmployeesDatabaseMapper.vb (.../EmployeesDatabaseMapper.vb) (revision 1763) @@ -1,4 +1,5 @@ Imports System.Data.SqlClient +Imports ProductiePitching.configs Imports ProductiePitching.ServiceAgents Imports ProductiePitching.ServiceAgents.Implementations @@ -85,9 +86,9 @@ Dim employee As New Employee With employee .PersonelNumber = ExtractItemFromDataReader(Of Integer)(dataReader, "PersNr", True) - .Picture = ExtractItemFromDataReader(Of String)(dataReader, "Foto", True, String.Empty) .FirstName = ExtractItemFromDataReader(Of String)(dataReader, "Voornaam", False, String.Empty) .LastName = ExtractItemFromDataReader(Of String)(dataReader, "Achternaam", False, String.Empty) + .Picture = ConfigsLoader.EmployeePhotoPath + .LastName + " " + .FirstName + ".jpg" .Initials = ExtractItemFromDataReader(Of String)(dataReader, "Initialen", True) End With Index: ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb =================================================================== diff -u -r1759 -r1763 --- ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1759) +++ ActiviteitenOpvolging/ProductiePitching/configs/ConfigsLoader.vb (.../ConfigsLoader.vb) (revision 1763) @@ -266,7 +266,10 @@ Return New Dictionary(Of ActivityStateEnum, Color)(_colorsActivityReadOnly) End Get End Property - Public ReadOnly Property AllFinishedActivitiesColor As color + Public ReadOnly Property AllFinishedActivitiesColor As Color + + Public ReadOnly Property EmployeePhotoPath As String + Private ReadOnly _colorsEmployees As New List(Of Color) Public ReadOnly Property ColorsEmployees As List(Of Color) Get @@ -325,6 +328,8 @@ _AllFinishedActivitiesColor = GetColorFromHexStringValue(value) ElseIf identifier.Contains("ColorEmployee") Then _colorsEmployees.Add(GetColorFromHexStringValue(value)) + ElseIf identifier.Equals("EmployeePhotoPath") Then + _EmployeePhotoPath = value Else Throw New Exception($"Unknown configuration: '{line}'.") End If @@ -451,6 +456,11 @@ If _colorsEmployees.Count < NumberOfEmployees Then Throw New ConfigurationException($"The colors for the employees are not defined or are fewer than the amount of users {NumberOfEmployees}.") End If + + If _EmployeePhotoPath Is String.Empty Then + Throw New ConfigurationException("The path to employeephoto's is not defined.") + End If + End Sub #End Region Index: ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt =================================================================== diff -u -r1759 -r1763 --- ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt (.../GeneralConfigs.txt) (revision 1759) +++ ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt (.../GeneralConfigs.txt) (revision 1763) @@ -44,4 +44,7 @@ ColorEmployee1=#72190E ColorEmployee2=#4EB625 ColorEmployee3=#1965B0 -ColorEmployee4=#882E72 \ No newline at end of file +ColorEmployee4=#882E72 + +% Foto's werknemers +EmployeePhotoPath=\\dam01\dam\Bedrijf-intern\Personeel pasfoto\ \ No newline at end of file