Index: TAOR-rework-bugfixing/TAOR rework/Rework/Slot.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/Slot.vb (.../Slot.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/Slot.vb (.../Slot.vb) (revision 1607) @@ -1,128 +1,126 @@ -Namespace Rework - Public Class Slot - Private _type As SlotType - Private _zijkanten As List(Of Rework) - Private _zijkantenSpecial As List(Of ArdisData) - Private _nummer As Integer +Public Class Slot + Private _type As SlotType + Private _zijkanten As List(Of Rework) + Private _zijkantenSpecial As List(Of ArdisData) + Private _nummer As Integer - Public Sub New() - _zijkanten = New List(Of Rework) - _zijkantenSpecial = New List(Of ArdisData) - End Sub + Public Sub New() + _zijkanten = New List(Of Rework) + _zijkantenSpecial = New List(Of ArdisData) + End Sub - Public Sub New(nummer As Integer) - _zijkanten = New List(Of Rework) - _zijkantenSpecial = New List(Of ArdisData) - controleerNummer(nummer) - _nummer = nummer - End Sub + Public Sub New(nummer As Integer) + _zijkanten = New List(Of Rework) + _zijkantenSpecial = New List(Of ArdisData) + controleerNummer(nummer) + _nummer = nummer + End Sub - Public Property type As SlotType - Get - Return _type - End Get - Set(ByVal value As SlotType) - _type = value - End Set - End Property + Public Property type As SlotType + Get + Return _type + End Get + Set(ByVal value As SlotType) + _type = value + End Set + End Property - Public ReadOnly Property zijkanten As List(Of Rework) - Get - Return New List(Of Rework)(_zijkanten) - End Get - End Property + Public ReadOnly Property zijkanten As List(Of Rework) + Get + Return New List(Of Rework)(_zijkanten) + End Get + End Property - Public ReadOnly Property zijkantenSpeciaal As List(Of ArdisData) - Get - Return New List(Of ArdisData)(_zijkantenSpecial) - End Get - End Property + Public ReadOnly Property zijkantenSpeciaal As List(Of ArdisData) + Get + Return New List(Of ArdisData)(_zijkantenSpecial) + End Get + End Property - Public Property nummer As Integer - Get - Return _nummer - End Get - Set(value As Integer) - controleerNummer(value) - _nummer = value - End Set - End Property + Public Property nummer As Integer + Get + Return _nummer + End Get + Set(value As Integer) + controleerNummer(value) + _nummer = value + End Set + End Property - Public Sub voegZijkantToe(ByVal zijkant As Rework) - If (type = SlotType.enkel) And (zijkanten.Count < 1) Then - _zijkanten.Add(zijkant) - ElseIf _zijkanten.Count < 2 Then - _zijkanten.Add(zijkant) - Else - Throw New Exception("Het slot zit al vol") - End If - End Sub + Public Sub voegZijkantToe(ByVal zijkant As Rework) + If (type = SlotType.enkel) And (zijkanten.Count < 1) Then + _zijkanten.Add(zijkant) + ElseIf _zijkanten.Count < 2 Then + _zijkanten.Add(zijkant) + Else + Throw New Exception("Het slot zit al vol") + End If + End Sub - Public Sub voegZijkantToe(ByVal zijkant As List(Of Rework)) - If (type = SlotType.enkel) And (zijkanten.Count < 1) Then - _zijkanten.AddRange(zijkant) - ElseIf _zijkanten.Count < 2 Then - _zijkanten.AddRange(zijkant) - Else - Throw New Exception("Het slot zit al vol") - End If - End Sub + Public Sub voegZijkantToe(ByVal zijkant As List(Of Rework)) + If (type = SlotType.enkel) And (zijkanten.Count < 1) Then + _zijkanten.AddRange(zijkant) + ElseIf _zijkanten.Count < 2 Then + _zijkanten.AddRange(zijkant) + Else + Throw New Exception("Het slot zit al vol") + End If + End Sub - 'special zijkant - Public Sub voegZijkantToe(ByRef zijkant As List(Of ArdisData)) - If _zijkantenSpecial.Count < 2 Then - For Each data As ArdisData In zijkant - data.KamerfreesSlotNr = _nummer - Next - _zijkantenSpecial.AddRange(zijkant) - Else - Throw New Exception("Het slot zit al vol") - End If - End Sub - - Public Overrides Function ToString() As String - Dim returnString As String = "TYPE SLOT: " & _type & " ---ZIJKANT: " - For Each zijkant As Rework In _zijkanten - returnString += vbNewLine & vbTab & zijkant.ToString + 'special zijkant + Public Sub voegZijkantToe(ByRef zijkant As List(Of ArdisData)) + If _zijkantenSpecial.Count < 2 Then + For Each data As ArdisData In zijkant + data.KamerfreesSlotNr = _nummer Next - Return returnString - End Function + _zijkantenSpecial.AddRange(zijkant) + Else + Throw New Exception("Het slot zit al vol") + End If + End Sub - Public Sub updateReworkOnderdeel() - If _type = SlotType.dubbel Then - If _zijkanten.Count > 0 Then - 'updaten van veld opslaan ardis in beide - If Not _zijkanten(1).opslaanArdis Then - zijkanten(0).opslaanArdis = False - ElseIf Not _zijkanten(0).opslaanArdis Then - zijkanten(1).opslaanArdis = False - End If - 'duidelijk maken dat beide tot een paar behoren - _zijkanten(0).onderdeel = "ZIJKANT LR" - _zijkanten(1).onderdeel = "ZIJKANT LR" + Public Overrides Function ToString() As String + Dim returnString As String = "TYPE SLOT: " & _type & " ---ZIJKANT: " + For Each zijkant As Rework In _zijkanten + returnString += vbNewLine & vbTab & zijkant.ToString + Next + Return returnString + End Function + + Public Sub updateReworkOnderdeel() + If _type = SlotType.dubbel Then + If _zijkanten.Count > 0 Then + 'updaten van veld opslaan ardis in beide + If Not _zijkanten(1).opslaanArdis Then + zijkanten(0).opslaanArdis = False + ElseIf Not _zijkanten(0).opslaanArdis Then + zijkanten(1).opslaanArdis = False End If + 'duidelijk maken dat beide tot een paar behoren + _zijkanten(0).onderdeel = "ZIJKANT LR" + _zijkanten(1).onderdeel = "ZIJKANT LR" End If - End Sub + End If + End Sub - Public Sub verwijderTweedeVanPaar() - If _zijkanten.Count > 1 Then - _zijkanten.RemoveAt(1) - End If - End Sub + Public Sub verwijderTweedeVanPaar() + If _zijkanten.Count > 1 Then + _zijkanten.RemoveAt(1) + End If + End Sub - Private Sub controleerNummer(nummer As Integer) - If nummer <= 0 Then - Throw New Exception("Slotnummer moet groter zijn dan 0 (nummer, geen index)") - End If - End Sub + Private Sub controleerNummer(nummer As Integer) + If nummer <= 0 Then + Throw New Exception("Slotnummer moet groter zijn dan 0 (nummer, geen index)") + End If + End Sub - Public Function ShallowCopy() As Slot - Return DirectCast(Me.MemberwiseClone(), Slot) - End Function - End Class + Public Function ShallowCopy() As Slot + Return DirectCast(Me.MemberwiseClone(), Slot) + End Function +End Class - Public Enum SlotType - enkel = 0 - dubbel = 1 - End Enum -End Namespace \ No newline at end of file +Public Enum SlotType + enkel = 0 + dubbel = 1 +End Enum \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Domeincontroller.vb =================================================================== diff -u -r1604 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Domeincontroller.vb (.../Domeincontroller.vb) (revision 1604) +++ TAOR-rework-bugfixing/TAOR rework/Domeincontroller.vb (.../Domeincontroller.vb) (revision 1607) @@ -1,6 +1,5 @@ -Imports TA_OR_rework.Rework +Imports TA_OR_Rework Imports TA_OR_rework.SpecialLadenRepository -Imports TA_OR_rework.Stalen Public Class Domeincontroller Private Shared instance As Domeincontroller @@ -68,7 +67,7 @@ End Function Public Sub addRework(ByVal barcode As String, ByVal reden() As String, ByVal onderdeel As String, ByVal voorVoorraad As String) - reworkRep.addRework(New Rework.Rework(barcode, reden, onderdeel, voorVoorraad)) + reworkRep.addRework(New Rework(barcode, reden, onderdeel, voorVoorraad)) End Sub Public Sub verwijderRework(ByVal barcode As String) @@ -86,7 +85,7 @@ Public Function geefReworks() As List(Of String()) Dim reworks As List(Of String()) = New List(Of String()) - For Each reworkClass As Rework.Rework In reworkRep.getReworks + For Each reworkClass As Rework In reworkRep.getReworks Dim rework(3) As String rework(0) = reworkClass.barcode rework(1) = reworkClass.onderdeel @@ -99,7 +98,7 @@ Public Function bestaatRework(ByVal barcode As String) Dim gevonden As Boolean = False - For Each rework As Rework.Rework In reworkRep.getReworks + For Each rework As Rework In reworkRep.getReworks If rework.barcode.Equals(barcode) Then gevonden = True End If @@ -125,7 +124,7 @@ Public Sub verwerkReworks() 'de reworks die niet in een van de trays zitten (dus geen zijkant zijn) verwerken - For Each rework As Rework.Rework In reworkRep.getReworks + For Each rework As Rework In reworkRep.getReworks Dim onderdeel As String = rework.onderdeel.ToLower.Trim Select Case onderdeel Case "front" @@ -171,9 +170,9 @@ reworkRep.updateAllReworks() Try - Dim reworks As List(Of Rework.Rework) = reworkRep.getReworks() - Dim zijkanten As New List(Of Rework.Rework) - For Each rework As Rework.Rework In reworks + Dim reworks As List(Of Rework) = reworkRep.getReworks() + Dim zijkanten As New List(Of Rework) + For Each rework As Rework In reworks If rework.onderdeel.ToUpper.Contains("ZIJKANT") Then zijkanten.Add(rework) End If @@ -192,16 +191,16 @@ End Try End Sub - Private Sub handelZijkantReworkAf(ByVal reworkZijkanten As List(Of Rework.Rework)) - Dim zelfdeBatchEnDossier As New List(Of List(Of Rework.Rework)) + Private Sub handelZijkantReworkAf(ByVal reworkZijkanten As List(Of Rework)) + Dim zelfdeBatchEnDossier As New List(Of List(Of Rework)) Dim batch As String = "" Dim dossierCode As String = "" Do While reworkZijkanten.Count >= 1 batch = reworkZijkanten(0).batch dossierCode = reworkZijkanten(0).dossierCode - Dim eenBatchEnDossier As New List(Of Rework.Rework) + Dim eenBatchEnDossier As New List(Of Rework) eenBatchEnDossier.Add(reworkZijkanten(0)) reworkZijkanten.RemoveAt(0) @@ -218,18 +217,18 @@ zelfdeBatchEnDossier.Add(eenBatchEnDossier) Loop - Dim paren As New List(Of Rework.Rework()) - Dim enkelen As New List(Of Rework.Rework) + Dim paren As New List(Of Rework()) + Dim enkelen As New List(Of Rework) Do While zelfdeBatchEnDossier.Count > 0 - Dim gesplitsteReworksBatchEnDossier As List(Of Rework.Rework) = zelfdeBatchEnDossier(0) + Dim gesplitsteReworksBatchEnDossier As List(Of Rework) = zelfdeBatchEnDossier(0) zelfdeBatchEnDossier.RemoveAt(0) Do While gesplitsteReworksBatchEnDossier.Count > 0 Dim isGevonden As Boolean = False Dim type As String = gesplitsteReworksBatchEnDossier(0).barcode.Substring(5, 1) - For Each mogelijkZelfdeType As Rework.Rework In gesplitsteReworksBatchEnDossier + For Each mogelijkZelfdeType As Rework In gesplitsteReworksBatchEnDossier If Not gesplitsteReworksBatchEnDossier(0).Equals(mogelijkZelfdeType) Then Dim anderType As String = mogelijkZelfdeType.barcode.Substring(5, 1) 'kijken of de types paren vormen, in de twee richtingen @@ -245,7 +244,7 @@ (type.Equals("D") And anderType.Equals("D")) Or (type.Equals("E") And anderType.Equals("E")) Or (type.Equals("F") And anderType.Equals("F")) Then - Dim paar(1) As Rework.Rework + Dim paar(1) As Rework paar(0) = gesplitsteReworksBatchEnDossier(0) paar(1) = mogelijkZelfdeType paren.Add(paar) @@ -272,7 +271,7 @@ End Sub Dim traynummer As Integer = 0 - Private Sub verdeelParenEnEnkeleOverTrays(ByVal paren As List(Of Rework.Rework()), ByVal enkel As List(Of Rework.Rework)) + Private Sub verdeelParenEnEnkeleOverTrays(ByVal paren As List(Of Rework()), ByVal enkel As List(Of Rework)) Do While paren.Count > 0 Or enkel.Count > 0 Dim reworkTray As ReworkTray = New ReworkTray(reworkTrayslotRep.slots) Index: TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenRepository.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenRepository.vb (.../ReworkRedenenRepository.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenRepository.vb (.../ReworkRedenenRepository.vb) (revision 1607) @@ -1,4 +1,4 @@ -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Public Class ReworkRedenenRepository Private _reworkOnderdelen As List(Of ReworkOnderdeel) Index: TAOR-rework-bugfixing/TAOR rework/laden/special laden/Spoelbakladen/HoofdAansturingSpoelbakLade.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/laden/special laden/Spoelbakladen/HoofdAansturingSpoelbakLade.vb (.../HoofdAansturingSpoelbakLade.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/laden/special laden/Spoelbakladen/HoofdAansturingSpoelbakLade.vb (.../HoofdAansturingSpoelbakLade.vb) (revision 1607) @@ -1,4 +1,4 @@ -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Public Class HoofdAansturingSpoelbakLade Inherits HoofdAansturingSpecialLade Index: TAOR-rework-bugfixing/TAOR rework/formulieren/FormGrid.vb =================================================================== diff -u -r1604 -r1607 --- TAOR-rework-bugfixing/TAOR rework/formulieren/FormGrid.vb (.../FormGrid.vb) (revision 1604) +++ TAOR-rework-bugfixing/TAOR rework/formulieren/FormGrid.vb (.../FormGrid.vb) (revision 1607) @@ -257,7 +257,7 @@ Private Sub laadGridCacheMetFilter(filter As String) Try - Dim datareader As OdbcDataReader = CacheMapper.geefdatareader(_tabel, _waarde, filter) + Dim datareader As OdbcDataReader = CacheMapper.GeefdataTable(_tabel, _waarde, filter) Dim dt = New DataTable() dt.Load(datareader) Index: TAOR-rework-bugfixing/TAOR rework/Rework/Rework.vb =================================================================== diff -u -r1604 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/Rework.vb (.../Rework.vb) (revision 1604) +++ TAOR-rework-bugfixing/TAOR rework/Rework/Rework.vb (.../Rework.vb) (revision 1607) @@ -1,194 +1,193 @@ -Namespace Rework - Public Class Rework - Private _onderdeel As String - Private _barcode As String - Private _reden As String - Private _redenLabel As String - Private _batch As String - Private _kar As String - Private _dossierCode As String + +Public Class Rework + Private _onderdeel As String + Private _barcode As String + Private _reden As String + Private _redenLabel As String + Private _batch As String + Private _kar As String + Private _dossierCode As String - Private _opslaanArdis As Boolean + Private _opslaanArdis As Boolean - Private _color As String = "-" - Private _length As String = "-" - Private _height As String = "-" + Private _color As String = "-" + Private _length As String = "-" + Private _height As String = "-" - Private _voorVoorraad As String - Private _etiketTekst As String + Private _voorVoorraad As String + Private _etiketTekst As String - Public DueOut As String - Public MachineID As String - Public PartijID As String - Public ProductID As String - Public SequentieNummer As String - Public StapNummer As String - Public TijdstipCreatie As String - Public TijdstipProductie As String - Public ToeleveringID As String - Public IsRework As String - Public OrigineelOnderdeel As String + Public DueOut As String + Public MachineID As String + Public PartijID As String + Public ProductID As String + Public SequentieNummer As String + Public StapNummer As String + Public TijdstipCreatie As String + Public TijdstipProductie As String + Public ToeleveringID As String + Public IsRework As String + Public OrigineelOnderdeel As String - Public Sub New() + Public Sub New() - End Sub + End Sub - Public Sub New(ByVal barcode As String, ByVal reden() As String, ByVal onderdeel As String, ByVal voorVoorraad As Boolean) - _barcode = barcode - _reden = reden(0) - _redenLabel = reden(1) - _onderdeel = onderdeel - _voorVoorraad = voorVoorraad - _opslaanArdis = True - End Sub + Public Sub New(ByVal barcode As String, ByVal reden() As String, ByVal onderdeel As String, ByVal voorVoorraad As Boolean) + _barcode = barcode + _reden = reden(0) + _redenLabel = reden(1) + _onderdeel = onderdeel + _voorVoorraad = voorVoorraad + _opslaanArdis = True + End Sub #Region "properties" - Public Property onderdeel() As String - Get - Return _onderdeel - End Get - Set(ByVal value As String) - _onderdeel = value - End Set - End Property + Public Property onderdeel() As String + Get + Return _onderdeel + End Get + Set(ByVal value As String) + _onderdeel = value + End Set + End Property - Public Property barcode() As String - Get - Return _barcode - End Get - Set(ByVal value As String) - _barcode = value - End Set - End Property + Public Property barcode() As String + Get + Return _barcode + End Get + Set(ByVal value As String) + _barcode = value + End Set + End Property - Public Property reden() As String - Get - Return _reden - End Get - Set(ByVal value As String) - _reden = value - End Set - End Property + Public Property reden() As String + Get + Return _reden + End Get + Set(ByVal value As String) + _reden = value + End Set + End Property - Public Property redenLabel() As String - Get - Return _redenLabel - End Get - Set(ByVal value As String) - _redenLabel = value - End Set - End Property + Public Property redenLabel() As String + Get + Return _redenLabel + End Get + Set(ByVal value As String) + _redenLabel = value + End Set + End Property - Public Property batch() As String - Get - Return _batch - End Get - Set(ByVal value As String) - _batch = value - End Set - End Property + Public Property batch() As String + Get + Return _batch + End Get + Set(ByVal value As String) + _batch = value + End Set + End Property - Public Property kar() As String - Get - Return _kar - End Get - Set(ByVal value As String) - _kar = value - End Set - End Property + Public Property kar() As String + Get + Return _kar + End Get + Set(ByVal value As String) + _kar = value + End Set + End Property - Public Property color() As String - Get - Return _color - End Get - Set(ByVal value As String) - _color = value - End Set - End Property + Public Property color() As String + Get + Return _color + End Get + Set(ByVal value As String) + _color = value + End Set + End Property - Public Property length As String - Get - Return _length - End Get - Set(ByVal value As String) - _length = value - End Set - End Property + Public Property length As String + Get + Return _length + End Get + Set(ByVal value As String) + _length = value + End Set + End Property - Public Property height() As String - Get - Return _height - End Get - Set(ByVal value As String) - _height = value - End Set - End Property + Public Property height() As String + Get + Return _height + End Get + Set(ByVal value As String) + _height = value + End Set + End Property - Public Property dossierCode() As String - Get - Return _dossierCode - End Get - Set(ByVal value As String) - _dossierCode = value - End Set - End Property + Public Property dossierCode() As String + Get + Return _dossierCode + End Get + Set(ByVal value As String) + _dossierCode = value + End Set + End Property - Public Property opslaanArdis() As Boolean - Get - Return _opslaanArdis - End Get - Set(ByVal value As Boolean) - _opslaanArdis = value - End Set - End Property + Public Property opslaanArdis() As Boolean + Get + Return _opslaanArdis + End Get + Set(ByVal value As Boolean) + _opslaanArdis = value + End Set + End Property - Public Property voorVoorraad() As Boolean - Get - Return _voorVoorraad - End Get - Set(ByVal value As Boolean) - _voorVoorraad = value - End Set - End Property + Public Property voorVoorraad() As Boolean + Get + Return _voorVoorraad + End Get + Set(ByVal value As Boolean) + _voorVoorraad = value + End Set + End Property - Public Property etiketTekst() As String - Get - Return _etiketTekst - End Get - Set(ByVal value As String) - _etiketTekst = value - End Set - End Property + Public Property etiketTekst() As String + Get + Return _etiketTekst + End Get + Set(ByVal value As String) + _etiketTekst = value + End Set + End Property #End Region - Public Sub aanpassenData() - IsRework = "1" - MachineID = "Rework" - StapNummer = "0" - End Sub + Public Sub aanpassenData() + IsRework = "1" + MachineID = "Rework" + StapNummer = "0" + End Sub - Public Function geefLinksOfRechts() As String - Dim linksofrechts As String = onderdeel.ToLower.Replace("zijkant", "").Replace("i", "").Replace("e", "").Replace("s", "").Trim.ToUpper() - If Not linksofrechts.Equals("") Then - Return linksofrechts - End If - Dim linksOfRechtsLetter As String = barcode.Substring(5).Substring(0, 1) - Select Case linksOfRechtsLetter - Case "L", "C", "E", "A" - linksofrechts = "L" - Case "R", "D", "F", "B" - linksofrechts = "R" - Case Else - Throw New Exception($"Letter '{linksOfRechtsLetter}' onbekend om links of rechts te bepalen voor rework zijkant") - End Select + Public Function geefLinksOfRechts() As String + Dim linksofrechts As String = onderdeel.ToLower.Replace("zijkant", "").Replace("i", "").Replace("e", "").Replace("s", "").Trim.ToUpper() + If Not linksofrechts.Equals("") Then Return linksofrechts - End Function + End If + Dim linksOfRechtsLetter As String = barcode.Substring(5).Substring(0, 1) + Select Case linksOfRechtsLetter + Case "L", "C", "E", "A" + linksofrechts = "L" + Case "R", "D", "F", "B" + linksofrechts = "R" + Case Else + Throw New Exception($"Letter '{linksOfRechtsLetter}' onbekend om links of rechts te bepalen voor rework zijkant") + End Select + Return linksofrechts + End Function - Public Overrides Function ToString() As String - Return "ONDERDEEL: " & _onderdeel & " --- BARCODE: " & _barcode & " --- BATCH: " & _batch & " " & " --- KAR: " & _kar & " " & " --- OPSLAAN ARDIS: " & _opslaanArdis & " " & " --- COLOR: " & _color & " " & " --- LENGTH: " & _length & " --- HEIGHT: " & _height - End Function + Public Overrides Function ToString() As String + Return "ONDERDEEL: " & _onderdeel & " --- BARCODE: " & _barcode & " --- BATCH: " & _batch & " " & " --- KAR: " & _kar & " " & " --- OPSLAAN ARDIS: " & _opslaanArdis & " " & " --- COLOR: " & _color & " " & " --- LENGTH: " & _length & " --- HEIGHT: " & _height + End Function - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenMapperXML.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenMapperXML.vb (.../ReworkRedenenMapperXML.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkRedenenMapperXML.vb (.../ReworkRedenenMapperXML.vb) (revision 1607) @@ -1,6 +1,6 @@ Imports System.IO Imports System.Xml.Serialization -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Public Module ReworkRedenenMapperXML Public Sub writeToFile(reworkonderdelen As List(Of ReworkOnderdeel)) Index: TAOR-rework-bugfixing/TAOR rework/Rework/HoofdAansturingRework.vb =================================================================== diff -u -r1600 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/HoofdAansturingRework.vb (.../HoofdAansturingRework.vb) (revision 1600) +++ TAOR-rework-bugfixing/TAOR rework/Rework/HoofdAansturingRework.vb (.../HoofdAansturingRework.vb) (revision 1607) @@ -1,273 +1,272 @@ -Namespace Rework - Public Class HoofdAansturingRework - Private _productieData As ZijkamerFreesProductieData - Private ReadOnly _productieDatas As New List(Of ZijkamerFreesProductieData) + +Public Class HoofdAansturingRework + Private _productieData As ZijkamerFreesProductieData + Private ReadOnly _productieDatas As New List(Of ZijkamerFreesProductieData) - 'TODO Code opkuisen voor rework trays (normale reworks) + 'TODO Code opkuisen voor rework trays (normale reworks) #Region "Rework tray (normale reworks)" - Public Sub VerwerkTray(tray As ReworkTray) - Try - For Each slot As Slot In tray.geefNietLegeSlots - If slot.zijkanten.Count > 0 Then + Public Sub VerwerkTray(tray As ReworkTray) + Try + For Each slot As Slot In tray.geefNietLegeSlots + If slot.zijkanten.Count > 0 Then - OpslaanInAutomilling() + OpslaanInAutomilling() - For Each zijkant As Rework In slot.zijkanten - 'de opdracht resetten in de afkanter - ResetOpdrachtAfkanter(zijkant.barcode) - Next + For Each zijkant As Rework In slot.zijkanten + 'de opdracht resetten in de afkanter + ResetOpdrachtAfkanter(zijkant.barcode) + Next - 'als het een paar is de andere van het paar verwijderen - slot.verwijderTweedeVanPaar() + 'als het een paar is de andere van het paar verwijderen + slot.verwijderTweedeVanPaar() - End If - Next - Catch ex As Exception - Throw ex - End Try - End Sub - - Private Sub OpslaanInAutomilling() - For Each data As ZijkamerFreesProductieData In _productieDatas - If data Is Nothing Then - _productieDatas.Clear() - Throw New Exception("Automilling data mag niet Nothing zijn om op te slaan") End If - 'kijken of het wel moet worden opgeslagen - If Configs.geefVerwerkStatus Then - AutomillingMapper.opslaan(data) - End If Next - _productieDatas.Clear() - End Sub + Catch ex As Exception + Throw ex + End Try + End Sub - Public Sub updateTray(tray As ReworkTray) - Try - For Each slot As Slot In tray.geefNietLegeSlots - If slot.zijkanten.Count > 0 Then - Dim linksOfRechts As String = slot.zijkanten(0).geefLinksOfRechts() + Private Sub OpslaanInAutomilling() + For Each data As ZijkamerFreesProductieData In _productieDatas + If data Is Nothing Then + _productieDatas.Clear() + Throw New Exception("Automilling data mag niet Nothing zijn om op te slaan") + End If + 'kijken of het wel moet worden opgeslagen + If Configs.geefVerwerkStatus Then + AutomillingMapper.opslaan(data) + End If + Next + _productieDatas.Clear() + End Sub - 'In automilling (technologica) laten verwerken - If slot.zijkanten.Count >= 2 Then - MaakFreesOpdrachtInReworkTray(slot.zijkanten(0).barcode, linksOfRechts, tray.nummer, slot.nummer, slot.zijkanten(0).voorVoorraad, slot.zijkanten(0).etiketTekst, slot.zijkanten(1).barcode, slot.zijkanten(1).geefLinksOfRechts()) - Else - MaakFreesOpdrachtInReworkTray(slot.zijkanten(0).barcode, linksOfRechts, tray.nummer, slot.nummer, slot.zijkanten(0).voorVoorraad, slot.zijkanten(0).etiketTekst) - End If + Public Sub updateTray(tray As ReworkTray) + Try + For Each slot As Slot In tray.geefNietLegeSlots + If slot.zijkanten.Count > 0 Then + Dim linksOfRechts As String = slot.zijkanten(0).geefLinksOfRechts() - 'de naam van onderdeel naar "ONDERDEEL LR" zetten - 'als een van de twee niet in ardis wordt opgeslagen de andere automatisch ook niet! - slot.updateReworkOnderdeel() + 'In automilling (technologica) laten verwerken + If slot.zijkanten.Count >= 2 Then + MaakFreesOpdrachtInReworkTray(slot.zijkanten(0).barcode, linksOfRechts, tray.nummer, slot.nummer, slot.zijkanten(0).voorVoorraad, slot.zijkanten(0).etiketTekst, slot.zijkanten(1).barcode, slot.zijkanten(1).geefLinksOfRechts()) + Else + MaakFreesOpdrachtInReworkTray(slot.zijkanten(0).barcode, linksOfRechts, tray.nummer, slot.nummer, slot.zijkanten(0).voorVoorraad, slot.zijkanten(0).etiketTekst) + End If - 'waarden in de rework invullen - slot.zijkanten(0).color = If(slot.type = SlotType.dubbel, _productieData.colorDubbel, _productieData.colorEnkel) - slot.zijkanten(0).length = _productieData.length - slot.zijkanten(0).height = _productieData.height + 'de naam van onderdeel naar "ONDERDEEL LR" zetten + 'als een van de twee niet in ardis wordt opgeslagen de andere automatisch ook niet! + slot.updateReworkOnderdeel() - 'In ARDIS per zijkant twee planken zagen (er moet maar 1 zijkant worden meegegeven, onderdeel is naar LR gezet) - HerzaagRework(slot.zijkanten(0), tray.nummer, slot.nummer) - End If - Next - Catch ex As Exception - Throw ex - End Try - End Sub + 'waarden in de rework invullen + slot.zijkanten(0).color = If(slot.type = SlotType.dubbel, _productieData.colorDubbel, _productieData.colorEnkel) + slot.zijkanten(0).length = _productieData.length + slot.zijkanten(0).height = _productieData.height - Private Sub MaakFreesOpdrachtInReworkTray(ByVal barcodeID As String, ByVal linksOfRechts As String, ByVal nieuwTrayNummer As String, ByVal slotNr As String, ByVal voorVoorraad As Boolean, etiketTekst As String, Optional barcodeID2 As String = "", Optional andereZijkantLinksOfRechts As String = "") - Try - _productieData = AutomillingMapper.OphalenUitProductie(barcodeID) + 'In ARDIS per zijkant twee planken zagen (er moet maar 1 zijkant worden meegegeven, onderdeel is naar LR gezet) + HerzaagRework(slot.zijkanten(0), tray.nummer, slot.nummer) + End If + Next + Catch ex As Exception + Throw ex + End Try + End Sub + + Private Sub MaakFreesOpdrachtInReworkTray(ByVal barcodeID As String, ByVal linksOfRechts As String, ByVal nieuwTrayNummer As String, ByVal slotNr As String, ByVal voorVoorraad As Boolean, etiketTekst As String, Optional barcodeID2 As String = "", Optional andereZijkantLinksOfRechts As String = "") + Try + _productieData = AutomillingMapper.OphalenUitProductie(barcodeID) + If _productieData Is Nothing Then + _productieData = AutomillingMapper.OphalenUitHistoriek(barcodeID) If _productieData Is Nothing Then - _productieData = AutomillingMapper.OphalenUitHistoriek(barcodeID) - If _productieData Is Nothing Then - Throw New Exception("De productieData kon niet worden opgehaald uit automiling met barcode: " & barcodeID) - End If + Throw New Exception("De productieData kon niet worden opgehaald uit automiling met barcode: " & barcodeID) End If + End If - 'als het een uit een paar is updaten met de informatie uit de andere van het paar - If barcodeID2.Equals("") Then - _productieData.aanpassenData(linksOfRechts, nieuwTrayNummer, slotNr, voorVoorraad, etiketTekst) - Else - Dim productieDataAndere As ZijkamerFreesProductieData - productieDataAndere = AutomillingMapper.OphalenUitProductie(barcodeID2) + 'als het een uit een paar is updaten met de informatie uit de andere van het paar + If barcodeID2.Equals("") Then + _productieData.aanpassenData(linksOfRechts, nieuwTrayNummer, slotNr, voorVoorraad, etiketTekst) + Else + Dim productieDataAndere As ZijkamerFreesProductieData + productieDataAndere = AutomillingMapper.OphalenUitProductie(barcodeID2) + If productieDataAndere Is Nothing Then + productieDataAndere = AutomillingMapper.OphalenUitHistoriek(barcodeID2) If productieDataAndere Is Nothing Then - productieDataAndere = AutomillingMapper.OphalenUitHistoriek(barcodeID2) - If productieDataAndere Is Nothing Then - Throw New Exception("De productieData kon niet worden opgehaald uit automiling met barcode: " & barcodeID) - End If + Throw New Exception("De productieData kon niet worden opgehaald uit automiling met barcode: " & barcodeID) End If - _productieData.aanpassenData(linksOfRechts, nieuwTrayNummer, slotNr, voorVoorraad, etiketTekst, productieDataAndere, andereZijkantLinksOfRechts) End If - _productieDatas.Add(_productieData.ShallowCopy) - Catch ex As Exception - Throw ex - End Try - End Sub + _productieData.aanpassenData(linksOfRechts, nieuwTrayNummer, slotNr, voorVoorraad, etiketTekst, productieDataAndere, andereZijkantLinksOfRechts) + End If + _productieDatas.Add(_productieData.ShallowCopy) + Catch ex As Exception + Throw ex + End Try + End Sub #End Region #Region "Special rework" - Public Sub VerwerkRug(rug As Rework) - 'Naar Ardis sturen. - HerzaagRework(rug) - 'De opdracht resetten in de afkanter. - ResetOpdrachtAfkanter(rug.barcode) - End Sub + Public Sub VerwerkRug(rug As Rework) + 'Naar Ardis sturen. + HerzaagRework(rug) + 'De opdracht resetten in de afkanter. + ResetOpdrachtAfkanter(rug.barcode) + End Sub - Public Sub VerwerkFront(front As Rework) - 'Naar Ardis sturen. - HerzaagRework(front) - 'De opdracht resetten in de afkanter. - ResetOpdrachtAfkanter(front.barcode) - End Sub + Public Sub VerwerkFront(front As Rework) + 'Naar Ardis sturen. + HerzaagRework(front) + 'De opdracht resetten in de afkanter. + ResetOpdrachtAfkanter(front.barcode) + End Sub - Public Sub VerwerkBodem(bodem As Rework) - 'Naar Ardis sturen. - HerzaagRework(bodem) - 'Productie tabel wordt nooit gewist op stemasC en insert moet dus niet worden uitgevoerd. - End Sub + Public Sub VerwerkBodem(bodem As Rework) + 'Naar Ardis sturen. + HerzaagRework(bodem) + 'Productie tabel wordt nooit gewist op stemasC en insert moet dus niet worden uitgevoerd. + End Sub #End Region - ''' - ''' Herzagen van het de rework. - ''' - ''' De rework die zal herzaagt worden. - Private Shared Sub HerzaagRework(rework As Rework) - 'Andere functie aanroepen met lege tray- en slotnummer. - HerzaagRework(rework, String.Empty, String.Empty) - End Sub + ''' + ''' Herzagen van het de rework. + ''' + ''' De rework die zal herzaagt worden. + Private Shared Sub HerzaagRework(rework As Rework) + 'Andere functie aanroepen met lege tray- en slotnummer. + HerzaagRework(rework, String.Empty, String.Empty) + End Sub - ''' - ''' Bepalen hoe de rework verwerkt moet worden, afhankelijk of het een zijkant is of niet. - ''' Indien het een zijkant is wordt gekeken of het links of rechts is. - ''' - ''' De rework die zal herzaagt worden. - ''' De traynummer. - ''' Het slotnummer. - Private Shared Sub HerzaagRework(rework As Rework, trayNummer As String, slotNummer As String) - 'Controleer of het wel moet worden opgeslagen in Ardis. - If Not rework.opslaanArdis Then Return + ''' + ''' Bepalen hoe de rework verwerkt moet worden, afhankelijk of het een zijkant is of niet. + ''' Indien het een zijkant is wordt gekeken of het links of rechts is. + ''' + ''' De rework die zal herzaagt worden. + ''' De traynummer. + ''' Het slotnummer. + Private Shared Sub HerzaagRework(rework As Rework, trayNummer As String, slotNummer As String) + 'Controleer of het wel moet worden opgeslagen in Ardis. + If Not rework.opslaanArdis Then Return - 'Zo ja, controleer of het onderdeel geen zijkant is. - If Not rework.onderdeel.ToLower.Contains("zijkant") Then - 'Reworks van niet-zijkanten worden herzaagt aan de hand van hun barcode. - HerzaagOnderdeelMetBarcode(rework.barcode) - Else - 'Voor zijkanten wordt gekeken of het links, rechts, beide of gewoon een zijkant is. - 'Waarde ziet er uit als 'ZIJKANT', 'ZIJKANT LI' of 'ZIJKANT LIS' - Dim linksEnOfRechts As String = rework.onderdeel.ToUpper() + 'Zo ja, controleer of het onderdeel geen zijkant is. + If Not rework.onderdeel.ToLower.Contains("zijkant") Then + 'Reworks van niet-zijkanten worden herzaagt aan de hand van hun barcode. + HerzaagOnderdeelMetBarcode(rework.barcode) + Else + 'Voor zijkanten wordt gekeken of het links, rechts, beide of gewoon een zijkant is. + 'Waarde ziet er uit als 'ZIJKANT', 'ZIJKANT LI' of 'ZIJKANT LIS' + Dim linksEnOfRechts As String = rework.onderdeel.ToUpper() - 'Kijk of het een normale zijkant is. - If Not linksEnOfRechts.Contains("L") And Not linksEnOfRechts.Contains("R") Then - 'Gewone zijkant zonder type. - HerzaagZijkant(rework, "", trayNummer, slotNummer) + 'Kijk of het een normale zijkant is. + If Not linksEnOfRechts.Contains("L") And Not linksEnOfRechts.Contains("R") Then + 'Gewone zijkant zonder type. + HerzaagZijkant(rework, "", trayNummer, slotNummer) + Else + 'Kijk of het een LR zijkant is. + If linksEnOfRechts.Contains("LR") Then + 'Zo ja, Herzaag zowel voor links als voor rechts. + HerzaagZijkant(rework, "L", trayNummer, slotNummer) + HerzaagZijkant(rework, "R", trayNummer, slotNummer) + ElseIf linksEnOfRechts.Contains("L") Then + 'Herzaag links. + HerzaagZijkant(rework, "L", trayNummer, slotNummer) Else - 'Kijk of het een LR zijkant is. - If linksEnOfRechts.Contains("LR") Then - 'Zo ja, Herzaag zowel voor links als voor rechts. - HerzaagZijkant(rework, "L", trayNummer, slotNummer) - HerzaagZijkant(rework, "R", trayNummer, slotNummer) - ElseIf linksEnOfRechts.Contains("L") Then - 'Herzaag links. - HerzaagZijkant(rework, "L", trayNummer, slotNummer) - Else - 'Herzaag rechts. - HerzaagZijkant(rework, "R", trayNummer, slotNummer) - End If + 'Herzaag rechts. + HerzaagZijkant(rework, "R", trayNummer, slotNummer) End If End If - End Sub + End If + End Sub - ''' - ''' Hulpfunctie voor het herzagen van zijkant reworks. - ''' - ''' De rework. - ''' Type zijkant: L; R; LR - ''' Het traynummer. - ''' Het slotnummer. - Private Shared Sub HerzaagZijkant(rework As Rework, linksOfRechts As String, trayNummer As String, slotNummer As String) - Try - 'Ophalen van de ArdisData met de barcode. - Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) - 'Controleren of de Ardisdata niet leeg is. - If ardisData Is Nothing Then - Throw New Exception($"Ardisdata kon niet worden opgevraagd voor zijkant rework met barcode: {rework.barcode}.") - End If + ''' + ''' Hulpfunctie voor het herzagen van zijkant reworks. + ''' + ''' De rework. + ''' Type zijkant: L; R; LR + ''' Het traynummer. + ''' Het slotnummer. + Private Shared Sub HerzaagZijkant(rework As Rework, linksOfRechts As String, trayNummer As String, slotNummer As String) + Try + 'Ophalen van de ArdisData met de barcode. + Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) + 'Controleren of de Ardisdata niet leeg is. + If ardisData Is Nothing Then + Throw New Exception($"Ardisdata kon niet worden opgevraagd voor zijkant rework met barcode: {rework.barcode}.") + End If - Dim barcodes As ICollection(Of String) - 'Controleren of het een speciaal gegenereerd plankje is. - If Not (ardisData.isSpecialGegenereerd()) Then - 'Zo neen, de barcodes ophalen aan de hand van de data. - barcodes = ArdisMapper.geefBarcodes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL, linksOfRechts) - Else - 'Als het een speciale zijkant is moeten we het corresponderende plankje vinden, aka A of B - barcodes = ArdisMapper.geefBarcodeGegenereerdePlankjes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL) - End If + Dim barcodes As ICollection(Of String) + 'Controleren of het een speciaal gegenereerd plankje is. + If Not (ardisData.isSpecialGegenereerd()) Then + 'Zo neen, de barcodes ophalen aan de hand van de data. + barcodes = ArdisMapper.geefBarcodes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL, linksOfRechts) + Else + 'Als het een speciale zijkant is moeten we het corresponderende plankje vinden, aka A of B + barcodes = ArdisMapper.geefBarcodeGegenereerdePlankjes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL) + End If - 'Lijst van barcodes controleren. - If barcodes Is Nothing AndAlso Not barcodes.Count = 0 Then - 'Lijst met barcodes mag niet null of leeg zijn. - Throw New Exception("Er is iets foutgelopen bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup='{ardisData.PartGroup}', 'PartExt02={ardisData.PartExt02}', PartL='{ardisData.PartL}'.") - ElseIf barcodes.Count > 2 Then - 'Lijst met barcodes mag niet meer dan twee items bevatten. - Throw New Exception($"Er zijn teveel barcodes gevonden bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup='{ardisData.PartGroup}', 'PartExt02={ardisData.PartExt02}', PartL='{ardisData.PartL}'.") - End If + 'Lijst van barcodes controleren. + If barcodes Is Nothing AndAlso Not barcodes.Count = 0 Then + 'Lijst met barcodes mag niet null of leeg zijn. + Throw New Exception("Er is iets foutgelopen bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup='{ardisData.PartGroup}', 'PartExt02={ardisData.PartExt02}', PartL='{ardisData.PartL}'.") + ElseIf barcodes.Count > 2 Then + 'Lijst met barcodes mag niet meer dan twee items bevatten. + Throw New Exception($"Er zijn teveel barcodes gevonden bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup='{ardisData.PartGroup}', 'PartExt02={ardisData.PartExt02}', PartL='{ardisData.PartL}'.") + End If - 'Elke barcode overlopen en laten verwerken. - For Each barcode In barcodes - HerzaagOnderdeelMetBarcode(barcode, trayNummer, slotNummer) - Next - Catch ex As Exception - Throw New Exception($"Kon rework zijkant niet herzagen.{vbNewLine}{ex.Message}") - End Try - End Sub + 'Elke barcode overlopen en laten verwerken. + For Each barcode In barcodes + HerzaagOnderdeelMetBarcode(barcode, trayNummer, slotNummer) + Next + Catch ex As Exception + Throw New Exception($"Kon rework zijkant niet herzagen.{vbNewLine}{ex.Message}") + End Try + End Sub - ''' - ''' De opdracht resetten in de afkanter. - ''' - ''' De barcode van het onderdeel. - Private Shared Sub ResetOpdrachtAfkanter(ByVal barcodeId As String) - Try - 'Kijken of het wel moet worden verwerkt. - If Configs.geefVerwerkStatus Then - KantenbandMapper.resetOpdracht(barcodeId) - End If - Catch ex As Exception - Throw New Exception($"De opdracht van de rework met barcode '{barcodeId}' kon niet gereset worden in de kantenband.") - End Try - End Sub + ''' + ''' De opdracht resetten in de afkanter. + ''' + ''' De barcode van het onderdeel. + Private Shared Sub ResetOpdrachtAfkanter(ByVal barcodeId As String) + Try + 'Kijken of het wel moet worden verwerkt. + If Configs.geefVerwerkStatus Then + KantenbandMapper.resetOpdracht(barcodeId) + End If + Catch ex As Exception + Throw New Exception($"De opdracht van de rework met barcode '{barcodeId}' kon niet gereset worden in de kantenband.") + End Try + End Sub - ''' - ''' Herzagen van een onderdeel aan de hand van een barcode. - ''' - ''' De barcode van het onderdeel. - Private Shared Sub HerzaagOnderdeelMetBarcode(ByVal barcodeId As String) - 'Aanroepen functie met lege tray- en slotnummer - HerzaagOnderdeelMetBarcode(barcodeId, String.Empty, String.Empty) - End Sub + ''' + ''' Herzagen van een onderdeel aan de hand van een barcode. + ''' + ''' De barcode van het onderdeel. + Private Shared Sub HerzaagOnderdeelMetBarcode(ByVal barcodeId As String) + 'Aanroepen functie met lege tray- en slotnummer + HerzaagOnderdeelMetBarcode(barcodeId, String.Empty, String.Empty) + End Sub - ''' - ''' Herzagen van een onderdeel aan de hand van een barcode. - ''' - ''' De barcode van het onderdeel. - ''' Het traynummer. - ''' Het slotnummer. - Private Shared Sub HerzaagOnderdeelMetBarcode(ByVal barcodeId As String, trayNummer As String, slotNummer As String) - Try - 'Opvragen van de ardisdata met de barcode. - Dim ardisData As ArdisData = ArdisMapper.OphalenData(barcodeId) - 'Updaten van de data. - ardisData.aanpassenDataRework() + ''' + ''' Herzagen van een onderdeel aan de hand van een barcode. + ''' + ''' De barcode van het onderdeel. + ''' Het traynummer. + ''' Het slotnummer. + Private Shared Sub HerzaagOnderdeelMetBarcode(ByVal barcodeId As String, trayNummer As String, slotNummer As String) + Try + 'Opvragen van de ardisdata met de barcode. + Dim ardisData As ArdisData = ArdisMapper.OphalenData(barcodeId) + 'Updaten van de data. + ardisData.aanpassenDataRework() - 'Kijken of het wel moet worden opgeslagen. - If Configs.geefVerwerkStatus Then - ArdisTextMapper.opslaan(ItemType.REWORK, ardisData, trayNummer, slotNummer) - End If - Catch ex As Exception - Throw New Exception($"Kon onderdeel met barcode '{barcodeId}' niet herzagen. {vbNewLine}{ex.Message}") - End Try - End Sub + 'Kijken of het wel moet worden opgeslagen. + If Configs.geefVerwerkStatus Then + ArdisTextMapper.opslaan(ItemType.REWORK, ardisData, trayNummer, slotNummer) + End If + Catch ex As Exception + Throw New Exception($"Kon onderdeel met barcode '{barcodeId}' niet herzagen. {vbNewLine}{ex.Message}") + End Try + End Sub - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRedenen.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRedenen.vb (.../ReworkRedenen.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRedenen.vb (.../ReworkRedenen.vb) (revision 1607) @@ -1,28 +1,24 @@ -Namespace Rework - Public Class Reden - Public Code As String - Public Label As String - End Class +Public Class Reden + Public Code As String + Public Label As String +End Class - Public Class Machine - Public Label As String - Public Code As String - Public redenen As List(Of Reden) +Public Class Machine + Public Label As String + Public Code As String + Public redenen As List(Of Reden) - Public Sub New() - redenen = New List(Of Reden) - End Sub - End Class + Public Sub New() + redenen = New List(Of Reden) + End Sub +End Class - Public Class ReworkOnderdeel - Public Label As String - Public Code As String - Public Machines As List(Of Machine) +Public Class ReworkOnderdeel + Public Label As String + Public Code As String + Public Machines As List(Of Machine) - Public Sub New() - Machines = New List(Of Machine) - End Sub - End Class - - -End Namespace \ No newline at end of file + Public Sub New() + Machines = New List(Of Machine) + End Sub +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTrayRepository.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTrayRepository.vb (.../ReworkTrayRepository.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTrayRepository.vb (.../ReworkTrayRepository.vb) (revision 1607) @@ -1,79 +1,78 @@ -Namespace Rework - Public Class ReworkTrayRepository - Private _reworkTrays As List(Of ReworkTray) - Private _reworkTraysSpecialLade As List(Of ReworkTray) + +Public Class ReworkTrayRepository + Private _reworkTrays As List(Of ReworkTray) + Private _reworkTraysSpecialLade As List(Of ReworkTray) - Public Sub New() - _reworkTrays = New List(Of ReworkTray) - _reworkTraysSpecialLade = New List(Of ReworkTray) - End Sub + Public Sub New() + _reworkTrays = New List(Of ReworkTray) + _reworkTraysSpecialLade = New List(Of ReworkTray) + End Sub - Public ReadOnly Property reworkTrays As List(Of ReworkTray) - Get - Return New List(Of ReworkTray)(_reworkTrays) - End Get - End Property + Public ReadOnly Property reworkTrays As List(Of ReworkTray) + Get + Return New List(Of ReworkTray)(_reworkTrays) + End Get + End Property - Public ReadOnly Property reworkTraysSpecialLaden As List(Of ReworkTray) - Get - Return New List(Of ReworkTray)(_reworkTraysSpecialLade) - End Get - End Property + Public ReadOnly Property reworkTraysSpecialLaden As List(Of ReworkTray) + Get + Return New List(Of ReworkTray)(_reworkTraysSpecialLade) + End Get + End Property - Public Sub addReworkTray(ByVal reworkTray As ReworkTray) - _reworkTrays.Add(reworkTray) - End Sub + Public Sub addReworkTray(ByVal reworkTray As ReworkTray) + _reworkTrays.Add(reworkTray) + End Sub - Public Sub addReworkTraySpecialLade(ByVal reworkTray As ReworkTray) - _reworkTraysSpecialLade.Add(reworkTray) - End Sub + Public Sub addReworkTraySpecialLade(ByVal reworkTray As ReworkTray) + _reworkTraysSpecialLade.Add(reworkTray) + End Sub - Public Sub verwijderReworkTrays() - _reworkTrays = Nothing - _reworkTrays = New List(Of ReworkTray) - End Sub + Public Sub verwijderReworkTrays() + _reworkTrays = Nothing + _reworkTrays = New List(Of ReworkTray) + End Sub - Public Sub verwijderReworkTraysSpecialLade() - _reworkTraysSpecialLade = Nothing - _reworkTraysSpecialLade = New List(Of ReworkTray) - End Sub + Public Sub verwijderReworkTraysSpecialLade() + _reworkTraysSpecialLade = Nothing + _reworkTraysSpecialLade = New List(Of ReworkTray) + End Sub - Public ReadOnly Property aantalReworkTrays() - Get - Return _reworkTrays.Count - End Get - End Property + Public ReadOnly Property aantalReworkTrays() + Get + Return _reworkTrays.Count + End Get + End Property - Public ReadOnly Property aantalReworkTraysSpecial() - Get - Return _reworkTraysSpecialLade.Count - End Get - End Property + Public ReadOnly Property aantalReworkTraysSpecial() + Get + Return _reworkTraysSpecialLade.Count + End Get + End Property - Public Function geefReworkTrayNummer(index As Integer) As String - If _reworkTrays.Count > 0 Then - Return _reworkTrays(index).nummer - End If - Throw New Exception("Er zijn geen rework trays aanwezig om het nummer bij op te vragen") - End Function + Public Function geefReworkTrayNummer(index As Integer) As String + If _reworkTrays.Count > 0 Then + Return _reworkTrays(index).nummer + End If + Throw New Exception("Er zijn geen rework trays aanwezig om het nummer bij op te vragen") + End Function - Public Function geefSpecialLadeReworkTrayNummer(index As Integer) As String - If _reworkTraysSpecialLade.Count > 0 Then - Return _reworkTraysSpecialLade(index).nummer + Public Function geefSpecialLadeReworkTrayNummer(index As Integer) As String + If _reworkTraysSpecialLade.Count > 0 Then + Return _reworkTraysSpecialLade(index).nummer + End If + Throw New Exception("Er zijn geen rework trays special lade aanwezig om het nummer bij op te vragen") + End Function + + Public Function geefReworkTrayEnSlotNummerBijBarcode(barcode As String) As String() + Dim trayEnSlotNummer As String() = Nothing + For Each specialLadeTray As ReworkTray In reworkTraysSpecialLaden + trayEnSlotNummer = specialLadeTray.geefReworkTrayEnSlotNummerBijBarcode(barcode) + If Not trayEnSlotNummer Is Nothing Then + Return trayEnSlotNummer End If - Throw New Exception("Er zijn geen rework trays special lade aanwezig om het nummer bij op te vragen") - End Function + Next + Return trayEnSlotNummer + End Function - Public Function geefReworkTrayEnSlotNummerBijBarcode(barcode As String) As String() - Dim trayEnSlotNummer As String() = Nothing - For Each specialLadeTray As ReworkTray In reworkTraysSpecialLaden - trayEnSlotNummer = specialLadeTray.geefReworkTrayEnSlotNummerBijBarcode(barcode) - If Not trayEnSlotNummer Is Nothing Then - Return trayEnSlotNummer - End If - Next - Return trayEnSlotNummer - End Function - - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTraySlotRepository.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTraySlotRepository.vb (.../ReworkTraySlotRepository.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTraySlotRepository.vb (.../ReworkTraySlotRepository.vb) (revision 1607) @@ -1,23 +1,21 @@ -Namespace Rework - Public Class ReworkTraySlotRepository - Private _slots As List(Of Slot) +Public Class ReworkTraySlotRepository + Private _slots As List(Of Slot) - Public Sub New() - _slots = ReworkTraySlotMapperXML.getDataFromFile() - End Sub + Public Sub New() + _slots = ReworkTraySlotMapperXML.getDataFromFile() + End Sub - Public Function slots() As List(Of Slot) - Dim tempList As New List(Of Slot) - For Each huidigSlot As Slot In _slots - Dim nieuwSlot As New Slot - nieuwSlot.nummer = huidigSlot.nummer - nieuwSlot.type = huidigSlot.type - tempList.Add(nieuwSlot) - Next + Public Function slots() As List(Of Slot) + Dim tempList As New List(Of Slot) + For Each huidigSlot As Slot In _slots + Dim nieuwSlot As New Slot + nieuwSlot.nummer = huidigSlot.nummer + nieuwSlot.type = huidigSlot.type + tempList.Add(nieuwSlot) + Next - Return tempList + Return tempList - End Function + End Function - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRepository.vb =================================================================== diff -u -r1605 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRepository.vb (.../ReworkRepository.vb) (revision 1605) +++ TAOR-rework-bugfixing/TAOR rework/Rework/ReworkRepository.vb (.../ReworkRepository.vb) (revision 1607) @@ -1,112 +1,110 @@ -Namespace Rework - Public Class ReworkRepository - Private _reworks As List(Of Rework) +Public Class ReworkRepository + Private _reworks As List(Of Rework) - Public Sub New() - _reworks = New List(Of Rework) - End Sub + Public Sub New() + _reworks = New List(Of Rework) + End Sub #Region "properties" - Public ReadOnly Property getReworks() As List(Of Rework) - Get - Return New List(Of Rework)(_reworks) - End Get - End Property + Public ReadOnly Property getReworks() As List(Of Rework) + Get + Return New List(Of Rework)(_reworks) + End Get + End Property - Public ReadOnly Property aantalReworks As Integer - Get - Return _reworks.Count - End Get - End Property + Public ReadOnly Property aantalReworks As Integer + Get + Return _reworks.Count + End Get + End Property #End Region - Public Sub addRework(ByVal rework As Rework) - _reworks.Add(rework) - End Sub + Public Sub addRework(ByVal rework As Rework) + _reworks.Add(rework) + End Sub - Public Sub verwijderRework(rework As Rework) - _reworks.Remove(rework) - End Sub + Public Sub verwijderRework(rework As Rework) + _reworks.Remove(rework) + End Sub - Public Sub verwijderAlleReworks() - _reworks = Nothing - _reworks = New List(Of Rework) - End Sub + Public Sub verwijderAlleReworks() + _reworks = Nothing + _reworks = New List(Of Rework) + End Sub - Public Function bestaatRework(ByVal barcode As String) - For Each rework As Rework In _reworks - If rework.barcode.Equals(barcode) Then - Return True - End If - Next - Return False - End Function + Public Function bestaatRework(ByVal barcode As String) + For Each rework As Rework In _reworks + If rework.barcode.Equals(barcode) Then + Return True + End If + Next + Return False + End Function - Public Function geefRework(ByVal barcode As String) - For Each rework As Rework In _reworks - If rework.barcode.Equals(barcode) Then - Return rework - End If - Next + Public Function geefRework(ByVal barcode As String) + For Each rework As Rework In _reworks + If rework.barcode.Equals(barcode) Then + Return rework + End If + Next + Throw New Exception("De rework bestaat niet") + Return False + End Function + + Public Sub wijzigOpslaanArdis(rework As Rework) + Dim bestaat As Boolean = False + For Each reworkVanList As Rework In _reworks + If rework.Equals(reworkVanList) Then + reworkVanList.opslaanArdis = Not reworkVanList.opslaanArdis + bestaat = True + End If + Next + If Not bestaat Then Throw New Exception("De rework bestaat niet") - Return False - End Function + End If + End Sub - Public Sub wijzigOpslaanArdis(rework As Rework) - Dim bestaat As Boolean = False - For Each reworkVanList As Rework In _reworks - If rework.Equals(reworkVanList) Then - reworkVanList.opslaanArdis = Not reworkVanList.opslaanArdis - bestaat = True - End If - Next - If Not bestaat Then - Throw New Exception("De rework bestaat niet") + Public Sub updateAllReworks() + For Each rework As Rework In _reworks + Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) + If ardisData Is Nothing Then + Throw New Exception("De barcode '" & rework.barcode & "' werd niet gevonden in Ardis") End If - End Sub + If Not (ardisData.isSpecialGegenereerd()) Then + CacheMapper.UpdateRework(rework) + Else + 'de rework bestaat uit een gegenereerde plank, dus we moeten de barcode van de buitenste (originele) gebruiken om deze te updaten + Dim barcodes As List(Of String) = ArdisMapper.geefBarcodeOrigineleBijGegenereerdePlankjes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL) - Public Sub updateAllReworks() - For Each rework As Rework In _reworks - Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) - If ardisData Is Nothing Then - Throw New Exception("De barcode '" & rework.barcode & "' werd niet gevonden in Ardis") + If barcodes Is Nothing OrElse barcodes.Count <= 0 Then + Throw New Exception("Er is iets foutgelopen bij het ophalen van de barcodes van de zijkanten uit de Ardis databank") + ElseIf barcodes.Count > 4 Then + Throw New Exception("Er zijn teveel barcodes gevonden bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup, PartExt02: " & ardisData.PartGroup & ", " & ardisData.PartExt02) End If - If Not (ardisData.isSpecialGegenereerd()) Then - CacheMapper.updateRework(rework) - Else - 'de rework bestaat uit een gegenereerde plank, dus we moeten de barcode van de buitenste (originele) gebruiken om deze te updaten - Dim barcodes As List(Of String) = ArdisMapper.geefBarcodeOrigineleBijGegenereerdePlankjes(ardisData.PartGroup, ardisData.PartExt02, ardisData.PartL) - If barcodes Is Nothing OrElse barcodes.Count <= 0 Then - Throw New Exception("Er is iets foutgelopen bij het ophalen van de barcodes van de zijkanten uit de Ardis databank") - ElseIf barcodes.Count > 4 Then - Throw New Exception("Er zijn teveel barcodes gevonden bij het ophalen van de barcodes van de zijkanten uit de Ardis databank, Partgroup, PartExt02: " & ardisData.PartGroup & ", " & ardisData.PartExt02) + For index = 0 To barcodes.Count - 1 + Dim ardisdataLinksOfRechts As ArdisData = ArdisMapper.OphalenData(barcodes(index)) + If ardisdataLinksOfRechts.geefLinksOfRechts().Equals(rework.geefLinksOfRechts()) Then + If CacheMapper.GeefDataTable(Kolommen.barcode, barcodes(index)).Rows.Count > 0 Then + CacheMapper.UpdateRework(rework, barcodes(index)) + Exit For + End If End If + Next - For index = 0 To barcodes.Count - 1 - Dim ardisdataLinksOfRechts As ArdisData = ArdisMapper.OphalenData(barcodes(index)) - If ardisdataLinksOfRechts.geefLinksOfRechts().Equals(rework.geefLinksOfRechts()) Then - If CacheMapper.GeefDataTable(Kolommen.barcode, barcodes(index)).Rows.Count > 0 Then - CacheMapper.updateRework(rework, barcodes(index)) - Exit For - End If - End If - Next + End If + Next + End Sub - End If - Next - End Sub + Public Sub slaAlleReworkRedenenOp() + For Each rework As Rework In _reworks + Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) + If Not (ardisData.isSpecialGegenereerd()) Then + CacheMapper.OpslaanReworkReden(rework) + End If + Next + End Sub - Public Sub slaAlleReworkRedenenOp() - For Each rework As Rework In _reworks - Dim ardisData As ArdisData = ArdisMapper.OphalenData(rework.barcode) - If Not (ardisData.isSpecialGegenereerd()) Then - CacheMapper.opslaanReworkReden(rework) - End If - Next - End Sub - - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Rework/PrinterBacklogDocMapper.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/PrinterBacklogDocMapper.vb (.../PrinterBacklogDocMapper.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/PrinterBacklogDocMapper.vb (.../PrinterBacklogDocMapper.vb) (revision 1607) @@ -3,47 +3,46 @@ Imports Microsoft.Office.Interop Imports Microsoft.Office.Interop.Word -Namespace Rework - Module PrinterBacklogDocMapper - Public Sub addPrinterBacklogDoc(trayNummer As Integer, text As String, isSpecial As Boolean) - Dim bestandsPath As String = Configs.printerBacklogPath - Dim trayNummerTekst As String = trayNummer.ToString - 'vullen met nullen - For index = 1 To 4 - trayNummerTekst.Length - trayNummerTekst = "0" & trayNummerTekst - Next - Dim bestandsnaam As String = "printer_backlog_" & trayNummerTekst - If isSpecial Then - bestandsnaam &= "_Special" - End If - Dim fullPath As String = Path.Combine(bestandsPath, bestandsnaam) - Dim oWord As Object - Dim oDoc As Object - Try - oWord = CreateObject("Word.Application") - oDoc = New Word.Document - Catch ex As Exception - Throw New Exception("Print backlog kon niet worden aangemaakt, omdat Word niet is geïnstalleerd") - End Try - Try +Module PrinterBacklogDocMapper + Public Sub addPrinterBacklogDoc(trayNummer As Integer, text As String, isSpecial As Boolean) + Dim bestandsPath As String = Configs.printerBacklogPath + Dim trayNummerTekst As String = trayNummer.ToString + 'vullen met nullen + For index = 1 To 4 - trayNummerTekst.Length + trayNummerTekst = "0" & trayNummerTekst + Next - Dim oPara1 As Paragraph = oDoc.Content.Paragraphs.Add - oPara1.Range.Font.Name = "Courier New" - oPara1.Range.Font.Bold = False - oPara1.Range.Font.Size = 13 - oPara1.Range.Text = text + Dim bestandsnaam As String = "printer_backlog_" & trayNummerTekst + If isSpecial Then + bestandsnaam &= "_Special" + End If + Dim fullPath As String = Path.Combine(bestandsPath, bestandsnaam) + Dim oWord As Object + Dim oDoc As Object + Try + oWord = CreateObject("Word.Application") + oDoc = New Word.Document + Catch ex As Exception + Throw New Exception("Print backlog kon niet worden aangemaakt, omdat Word niet is geïnstalleerd") + End Try + Try - oDoc.SaveAs2(fullPath) - Dim save_changes As Object = False - oDoc.Close(save_changes) - oWord.Quit(save_changes) + Dim oPara1 As Paragraph = oDoc.Content.Paragraphs.Add + oPara1.Range.Font.Name = "Courier New" + oPara1.Range.Font.Bold = False + oPara1.Range.Font.Size = 13 + oPara1.Range.Text = text - Catch ex As Exception - Throw New Exception("Print backlog kon niet worden aangemaakt" & vbNewLine & ex.Message) - End Try - End Sub + oDoc.SaveAs2(fullPath) + Dim save_changes As Object = False + oDoc.Close(save_changes) + oWord.Quit(save_changes) - End Module -End Namespace \ No newline at end of file + Catch ex As Exception + Throw New Exception("Print backlog kon niet worden aangemaakt" & vbNewLine & ex.Message) + End Try + End Sub + +End Module \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/laden/special laden/Sifonladen/HoofdAansturingSifonLade.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/laden/special laden/Sifonladen/HoofdAansturingSifonLade.vb (.../HoofdAansturingSifonLade.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/laden/special laden/Sifonladen/HoofdAansturingSifonLade.vb (.../HoofdAansturingSifonLade.vb) (revision 1607) @@ -1,4 +1,4 @@ -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Public Class HoofdAansturingSifonLade Inherits HoofdAansturingSpecialLade Index: TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTray.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTray.vb (.../ReworkTray.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Rework/ReworkTray.vb (.../ReworkTray.vb) (revision 1607) @@ -1,148 +1,147 @@ 'robin de bock 04/08/2017 -Namespace Rework - Public Class ReworkTray - Private _nummer As String - Private _slots As List(Of Slot) - Private reworktrayslotRep As ReworkTraySlotRepository - Public Sub New(ByVal slots As List(Of Slot)) - _slots = slots - _nummer = AutomillingMapper.GeefNieuwTrayNummer - End Sub - Public Property nummer As String - Get - Return _nummer - End Get - Set(ByVal value As String) - If value = Nothing Or CInt(value) <= 0 Then - Throw New Exception("Ongeldig traynummer") - End If - _nummer = value - End Set - End Property +Public Class ReworkTray + Private _nummer As String + Private _slots As List(Of Slot) + Private reworktrayslotRep As ReworkTraySlotRepository + Public Sub New(ByVal slots As List(Of Slot)) + _slots = slots + _nummer = AutomillingMapper.GeefNieuwTrayNummer + End Sub - Public ReadOnly Property slots As List(Of Slot) - Get - Return New List(Of Slot)(_slots) - End Get - End Property + Public Property nummer As String + Get + Return _nummer + End Get + Set(ByVal value As String) + If value = Nothing Or CInt(value) <= 0 Then + Throw New Exception("Ongeldig traynummer") + End If + _nummer = value + End Set + End Property - Public Function parenVol() As Boolean - For Each slot As Slot In _slots - If slot.type = SlotType.dubbel Then - If (slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0) Then - Return False - End If + Public ReadOnly Property slots As List(Of Slot) + Get + Return New List(Of Slot)(_slots) + End Get + End Property + + Public Function parenVol() As Boolean + For Each slot As Slot In _slots + If slot.type = SlotType.dubbel Then + If (slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0) Then + Return False End If - Next - Return True - End Function + End If + Next + Return True + End Function - Public Function enkelVol() As Boolean - For Each slot As Slot In _slots - If slot.type = SlotType.enkel Then - If slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0 And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0) Then - Return False - End If + Public Function enkelVol() As Boolean + For Each slot As Slot In _slots + If slot.type = SlotType.enkel Then + If slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0 And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0) Then + Return False End If - Next - Return True - End Function + End If + Next + Return True + End Function - Public Sub voegPaarToe(ByVal paar As Rework()) - For Each Slot In slots - If Slot.type = SlotType.dubbel Then - If Slot.zijkanten Is Nothing OrElse Slot.zijkanten.Count <= 0 Then - Dim lijstPaar As New List(Of Rework) - lijstPaar.Add(paar(0)) - lijstPaar.Add(paar(1)) + Public Sub voegPaarToe(ByVal paar As Rework()) + For Each Slot In slots + If Slot.type = SlotType.dubbel Then + If Slot.zijkanten Is Nothing OrElse Slot.zijkanten.Count <= 0 Then + Dim lijstPaar As New List(Of Rework) + lijstPaar.Add(paar(0)) + lijstPaar.Add(paar(1)) - Slot.voegZijkantToe(lijstPaar) - Exit For - End If + Slot.voegZijkantToe(lijstPaar) + Exit For End If - Next - End Sub + End If + Next + End Sub - Public Sub voegEnkelToe(ByVal enkel As Rework) - For Each Slot In slots - If Slot.type = SlotType.enkel Then - If Slot.zijkanten Is Nothing OrElse Slot.zijkanten.Count <= 0 Then - Slot.voegZijkantToe(enkel) - Exit For - End If + Public Sub voegEnkelToe(ByVal enkel As Rework) + For Each Slot In slots + If Slot.type = SlotType.enkel Then + If Slot.zijkanten Is Nothing OrElse Slot.zijkanten.Count <= 0 Then + Slot.voegZijkantToe(enkel) + Exit For End If - Next - End Sub + End If + Next + End Sub - Public Sub voegPaarToe(ByRef paar As List(Of ArdisData)) - For Each Slot In slots - If Slot.type = SlotType.dubbel Then - If Slot.zijkantenSpeciaal Is Nothing OrElse Slot.zijkantenSpeciaal.Count <= 0 Then - Slot.voegZijkantToe(paar) - For Each data As ArdisData In paar - data.KamerfreesTrayId = _nummer - Next - Exit For - End If + Public Sub voegPaarToe(ByRef paar As List(Of ArdisData)) + For Each Slot In slots + If Slot.type = SlotType.dubbel Then + If Slot.zijkantenSpeciaal Is Nothing OrElse Slot.zijkantenSpeciaal.Count <= 0 Then + Slot.voegZijkantToe(paar) + For Each data As ArdisData In paar + data.KamerfreesTrayId = _nummer + Next + Exit For End If - Next - End Sub + End If + Next + End Sub - Public Sub voegEnkelToe(ByRef enkel As List(Of ArdisData)) - For Each Slot In slots - If Slot.type = SlotType.enkel Then - If Slot.zijkantenSpeciaal Is Nothing OrElse Slot.zijkantenSpeciaal.Count <= 0 Then - Slot.voegZijkantToe(enkel) - For Each data As ArdisData In enkel - data.KamerfreesTrayId = _nummer - Next - Exit For - End If + Public Sub voegEnkelToe(ByRef enkel As List(Of ArdisData)) + For Each Slot In slots + If Slot.type = SlotType.enkel Then + If Slot.zijkantenSpeciaal Is Nothing OrElse Slot.zijkantenSpeciaal.Count <= 0 Then + Slot.voegZijkantToe(enkel) + For Each data As ArdisData In enkel + data.KamerfreesTrayId = _nummer + Next + Exit For End If - Next - End Sub + End If + Next + End Sub - Public Function geefNietLegeSlots() As List(Of Slot) - Dim nietLeeg As New List(Of Slot) - For Each slot As Slot In _slots - If Not ((slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0)) Then - nietLeeg.Add(slot) - End If - Next - Return nietLeeg - End Function + Public Function geefNietLegeSlots() As List(Of Slot) + Dim nietLeeg As New List(Of Slot) + For Each slot As Slot In _slots + If Not ((slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0)) Then + nietLeeg.Add(slot) + End If + Next + Return nietLeeg + End Function - Public Function geefNietLegeParenSlots() As List(Of Slot) - Dim nietLeegEnPaar As New List(Of Slot) - For Each slot As Slot In _slots - If Not ((slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0)) And slot.type = SlotType.dubbel Then - nietLeegEnPaar.Add(slot) - End If - Next - Return nietLeegEnPaar - End Function + Public Function geefNietLegeParenSlots() As List(Of Slot) + Dim nietLeegEnPaar As New List(Of Slot) + For Each slot As Slot In _slots + If Not ((slot.zijkanten Is Nothing OrElse slot.zijkanten.Count <= 0) And (slot.zijkantenSpeciaal Is Nothing OrElse slot.zijkantenSpeciaal.Count <= 0)) And slot.type = SlotType.dubbel Then + nietLeegEnPaar.Add(slot) + End If + Next + Return nietLeegEnPaar + End Function - Public Overrides Function ToString() As String - Dim returnString As String = "TRAYNUMMER: " & _nummer & vbNewLine - Dim teller As Integer = 1 - For Each Slot As Slot In slots - returnString += "SLOT NUMMER: " & teller & " === " & Slot.ToString + vbNewLine - teller += 1 - Next - Return returnString - End Function + Public Overrides Function ToString() As String + Dim returnString As String = "TRAYNUMMER: " & _nummer & vbNewLine + Dim teller As Integer = 1 + For Each Slot As Slot In slots + returnString += "SLOT NUMMER: " & teller & " === " & Slot.ToString + vbNewLine + teller += 1 + Next + Return returnString + End Function - Public Function geefReworkTrayEnSlotNummerBijBarcode(barcode As String) As String() - For Each slot As Slot In geefNietLegeSlots() - For Each zijkant As ArdisData In slot.zijkantenSpeciaal - If zijkant.PartCalc.Equals(barcode) Then - Return {nummer, CStr(slot.nummer)} - End If - Next + Public Function geefReworkTrayEnSlotNummerBijBarcode(barcode As String) As String() + For Each slot As Slot In geefNietLegeSlots() + For Each zijkant As ArdisData In slot.zijkantenSpeciaal + If zijkant.PartCalc.Equals(barcode) Then + Return {nummer, CStr(slot.nummer)} + End If Next - Return Nothing - End Function + Next + Return Nothing + End Function - End Class -End Namespace \ No newline at end of file +End Class \ No newline at end of file Index: TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkTraySlotMapperXML.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkTraySlotMapperXML.vb (.../ReworkTraySlotMapperXML.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/Configuraties/ReworkTraySlotMapperXML.vb (.../ReworkTraySlotMapperXML.vb) (revision 1607) @@ -1,6 +1,6 @@ Imports System.IO Imports System.Xml.Serialization -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Module ReworkTraySlotMapperXML Public Function getDataFromFile() As List(Of Slot) Index: TAOR-rework-bugfixing/TAOR rework/formulieren/FormReworkTrayPrinter.vb =================================================================== diff -u -r1597 -r1607 --- TAOR-rework-bugfixing/TAOR rework/formulieren/FormReworkTrayPrinter.vb (.../FormReworkTrayPrinter.vb) (revision 1597) +++ TAOR-rework-bugfixing/TAOR rework/formulieren/FormReworkTrayPrinter.vb (.../FormReworkTrayPrinter.vb) (revision 1607) @@ -1,5 +1,5 @@ Imports System.Text -Imports TA_OR_rework.Rework +Imports TA_OR_rework.rework Public Class FormReworkTrayPrinter Private _aantalTrays As Integer