Index: ActiviteitenOpvolging/ProductiePitching/screens/DataGridViewUserControl.vb =================================================================== diff -u -r1764 -r1784 --- ActiviteitenOpvolging/ProductiePitching/screens/DataGridViewUserControl.vb (.../DataGridViewUserControl.vb) (revision 1764) +++ ActiviteitenOpvolging/ProductiePitching/screens/DataGridViewUserControl.vb (.../DataGridViewUserControl.vb) (revision 1784) @@ -295,12 +295,12 @@ End If 'Set status image based on timestamps. - If activity.StartBeforeTimestamp < DateTime.Now Then - cell.Figure = ConfigsLoader.ActivityBeforeStatusImage + If activity.StartTimeStamp < DateTime.Now Then + cell.Figure = ConfigsLoader.ActivityLateStatusImage ElseIf activity.StartAlmostTimeStamp < DateTime.Now Then cell.Figure = ConfigsLoader.ActivityAlmostStatusImage - ElseIf activity.StartTimeStamp < DateTime.Now Then - cell.Figure = ConfigsLoader.ActivityLateStatusImage + ElseIf activity.StartBeforeTimestamp < DateTime.Now Then + cell.Figure = ConfigsLoader.ActivityBeforeStatusImage Else 'Default. cell.Figure = Nothing Index: ActiviteitenOpvolging/ProductiePitching/ProductiePitchingForm.vb =================================================================== diff -u -r1759 -r1784 --- ActiviteitenOpvolging/ProductiePitching/ProductiePitchingForm.vb (.../ProductiePitchingForm.vb) (revision 1759) +++ ActiviteitenOpvolging/ProductiePitching/ProductiePitchingForm.vb (.../ProductiePitchingForm.vb) (revision 1784) @@ -21,7 +21,7 @@ Size = New System.Drawing.Size(ConfigsLoader.AppWidth, ConfigsLoader.AppHeight) StartPosition = FormStartPosition.CenterScreen 'Set the title name of the form from the config. - Text = $"RDB - Productie pitching - {ConfigsLoader.AppName}" + Text = $"Productie pitching - {ConfigsLoader.AppName}" GridLabel.Text = ConfigsLoader.AppName 'Load the user controls with the data grids. @@ -32,9 +32,6 @@ PauseActivitiesFromApp() - 'Load all the data. Not done with the general method, because we want to catch the exceptions. - RefreshAllData() - 'Set the timer's value in miliseconds. RefreshTimer.Interval = ConfigsLoader.RefreshIntervalSeconds * 1000 'Start the times. @@ -225,5 +222,12 @@ RefreshAllData() End Sub + Private Sub ProductiePitchingForm_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown + + 'Load all the data. Not done with the general method, because we want to catch the exceptions. + RefreshAllData() + + End Sub + #End Region End Class Index: ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt =================================================================== diff -u -r1763 -r1784 --- ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt (.../GeneralConfigs.txt) (revision 1763) +++ ActiviteitenOpvolging/ProductiePitching/GeneralConfigs.txt (.../GeneralConfigs.txt) (revision 1784) @@ -9,7 +9,7 @@ CacheWebserviceURL=http://cache01:57772/csp/admin1/WS.Halux.Planning.ActiviteitPerBatchService.CLS % Start vooraf tijdstip drempel (in minuten) -StartBeforeTimeThreshold=15 +StartBeforeTimeThreshold=20 % Start bijna tijdstip drempel (in minuten) StartAlmostTimeThreshold=10 Index: ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb =================================================================== diff -u -r1764 -r1784 --- ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb (.../CacheMapper.vb) (revision 1764) +++ ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb (.../CacheMapper.vb) (revision 1784) @@ -166,7 +166,11 @@ Dim employeeInitials = ExtractItemFromDataReader(dr, $"Gebruiker_{i}", String.Empty) Dim employee As IEmployee = If(employeeInitials.Equals(String.Empty), Nothing, employees.FirstOrDefault(Function(employeeToCheck) employeeToCheck.Initials.Equals(employeeInitials))) 'Set the current state based on the enum value. If the quantity is 0, the status is automatically zero. - .State = ConvertEnumValueToActivityState(If(.QuantityToProduce = 0, ActivityStateEnum.Zero, ActivityStateEnumMapper.GetActivityStateFromLetter(ExtractItemFromDataReader(Of Char)(dr, $"Status_{i}"))), activity, employee) + Dim stateValue = ActivityStateEnum.Zero + If (.QuantityToProduce > 0) And (employee IsNot Nothing) Then + stateValue = ActivityStateEnumMapper.GetActivityStateFromLetter(ExtractItemFromDataReader(Of Char)(dr, $"Status_{i}")) + End If + .State = ConvertEnumValueToActivityState(stateValue, activity, employee) End With 'Add to collection of activities. activities.Add(activity) Index: ActiviteitenOpvolging/ProductiePitching/KCA-W10_DynamicConfigs.txt =================================================================== diff -u -r1759 -r1784 --- ActiviteitenOpvolging/ProductiePitching/KCA-W10_DynamicConfigs.txt (.../KCA-W10_DynamicConfigs.txt) (revision 1759) +++ ActiviteitenOpvolging/ProductiePitching/KCA-W10_DynamicConfigs.txt (.../KCA-W10_DynamicConfigs.txt) (revision 1784) @@ -1,35 +1,45 @@ % Zichtbare naam van de applicatie (Voormontage, Matten, Karton, Zijkanten, Onderdelen, ...) -AppName=Voormontage +AppName=Lijnen LBX&TBX % Gebruikt voor webservice (Voormontage, Matten, Karton, Zijkanten, Onderdelen, ...) -AppID=Voormontage LBX&TBX +AppID=Lijnen LBX&TBX % Grootte scherm van de applicatie breedte x hoogte (in pixels) AppDimension=1280x1024 % Aantal grids -NumberOfGrids=2 +NumberOfGrids=4 % Zichtbare naam voor grid 1 tot AantalGrid -GridLabel1=Lijn -GridLabel2=Klantorder +GridLabel1=Lijn 1 +GridLabel2=Lijn 2 +GridLabel3=Lijn 3 +GridLabel4=Lijn 4 % Afmetingen grids breedte x hoogte (in pixels) -DimensionsGrid1=725x550 -DimensionsGrid2=500x550 +DimensionsGrid1=300x550 +DimensionsGrid2=300x550 +DimensionsGrid3=300x550 +DimensionsGrid4=300x550 % Kolom header namen voor elke grid. '-' betekent onzichtbaar. % De kolommen zijn: Batch, DueOut, Product, Naar, Opmerking -ColumnHeaderGrid1=Batch,DueOut,Product,Naar,- -ColumnHeaderGrid2=Batch,Tijd,Product,Naar,- +ColumnHeaderGrid1=Batch,DueOut,Product,-,- +ColumnHeaderGrid2=Batch,Tijd,-,-,- +ColumnHeaderGrid3=Batch,Tijd,-,-,- +ColumnHeaderGrid4=Batch,Tijd,-,-,- % Aantal activiteiten per grid -NumberOfActivitiesGrid1=5 -NumberOfActivitiesGrid2=2 +NumberOfActivitiesGrid1=1 +NumberOfActivitiesGrid2=1 +NumberOfActivitiesGrid3=1 +NumberOfActivitiesGrid4=1 % Definitie van de SQL query voor grid 1 tot AantalGrid -SQL1=SQL1 -SQL2=SQL2 +SQL1=LIJN1 +SQL2=LIJN2 +SQL3=LIJN3 +SQL4=LIJN4 % Aantal gebruikers die acties kunnen uitvoeren -NumberOfEmployees=2 \ No newline at end of file +NumberOfEmployees=0 \ No newline at end of file