-aggiornato gestione visualizzazione pdf e pdf preview

This commit is contained in:
Demetrio Cassarino
2024-04-05 09:07:00 +02:00
parent f43fac953e
commit e2f9d0f508
@@ -106,8 +106,8 @@ Module PDFHelper
Dim pgSetup As PageSetup = document.DefaultPageSetup.Clone()
pgSetup.Orientation = Orientation.Landscape
section.PageSetup = pgSetup
Dim paragraph As Paragraph = section.AddParagraph("Part Totals", "Heading2")
paragraph.Format.SpaceBefore = "3.0cm"
Dim paragraph As Paragraph = section.AddParagraph(EgtMsg(61734) & "s", "Heading2")
paragraph.Format.SpaceBefore = "3.5cm"
Dim sPartTot As ExpanderPDF = Map.refPDFEditorVM.ExpanderList.FirstOrDefault(Function(x) x.sNameCategory = EgtMsg(61734)) ' Recupero lista Part Totals
Dim sBTLTotParts As ExpanderElement = sPartTot.ExpanderElementList.FirstOrDefault(Function(x As ExpanderElement) x.sNameParameter = EgtMsg(61716)) ' Recupero Numero totale pezzi con relativo checkbox
Dim sBTLTotVolume As ExpanderElement = sPartTot.ExpanderElementList.FirstOrDefault(Function(x As ExpanderElement) x.sNameParameter = EgtMsg(61717)) ' Recupero Volume totale con relativo checkbox
@@ -125,8 +125,8 @@ Module PDFHelper
Dim pgSetup As PageSetup = document.DefaultPageSetup.Clone()
pgSetup.Orientation = Orientation.Landscape
section.PageSetup = pgSetup
Dim paragraph As Paragraph = section.AddParagraph("Machgroup Totals", "Heading2")
paragraph.Format.SpaceBefore = "3.0cm"
Dim paragraph As Paragraph = section.AddParagraph(EgtMsg(61729), "Heading2")
paragraph.Format.SpaceBefore = "3.5cm"
Dim sMachGroup As ExpanderPDF = Map.refPDFEditorVM.ExpanderList.FirstOrDefault(Function(x) x.sNameCategory = EgtMsg(61729)) ' Recupero lista Machgroup Totals
Dim sNumberBlanks As ExpanderElement = sMachGroup.ExpanderElementList.FirstOrDefault(Function(x As ExpanderElement) x.sNameParameter = EgtMsg(61721)) ' Recupero Numero di grezzi con relativo checkbox
Dim sTotalVolume As ExpanderElement = sMachGroup.ExpanderElementList.FirstOrDefault(Function(x As ExpanderElement) x.sNameParameter = EgtMsg(61717)) ' Recupero Volume totale con relativo checkbox
@@ -185,11 +185,11 @@ Module PDFHelper
Dim countItemList As Integer = 0
Select Case nListType
Case ListTypes.PART
section.AddParagraph("Part List", "Heading2")
section.AddParagraph(EgtMsg(61733), "Heading2")
Case ListTypes.MACHGROUP
section.AddParagraph("MachGroup List", "Heading2")
section.AddParagraph(EgtMsg(61730), "Heading2")
Case ListTypes.RAWPART
section.AddParagraph("RawPart List", "Heading2")
section.AddParagraph(EgtMsg(61732), "Heading2")
End Select
Dim table As Table = New Table()
table.Borders.Width = 0.75
@@ -277,11 +277,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.PDN_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(1)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.nPDN)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 1, BTLPartVM.nPDN))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -307,35 +303,27 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(RawPart.sW)
'End If
If nListType = ListTypes.PART AndAlso sW.bIsChecked Then
If sW.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(1))
Select Case nListType
Case ListTypes.PART
table.AddColumn(Unit.FromCentimeter(1))
Case ListTypes.MACHGROUP, ListTypes.RAWPART
table.AddColumn(Unit.FromCentimeter(2))
End Select
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.W_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(200)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, 200, 120))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sW)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sW.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.W_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(120)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dW)
End If
ElseIf nListType = ListTypes.RAWPART AndAlso sW.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.W_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(120)
Else
row.Cells(ColumnIndex).AddParagraph(RawPart.sW)
Select Case nListType
Case ListTypes.PART
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sW)
Case ListTypes.MACHGROUP
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dW)
Case ListTypes.RAWPART
row.Cells(ColumnIndex).AddParagraph(RawPart.sW)
End Select
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -353,35 +341,27 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(RawPart.sH)
'End If
If nListType = ListTypes.PART AndAlso sH.bIsChecked Then
If sH.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(1))
Select Case nListType
Case ListTypes.PART
table.AddColumn(Unit.FromCentimeter(1))
Case ListTypes.MACHGROUP, ListTypes.RAWPART
table.AddColumn(Unit.FromCentimeter(2))
End Select
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.H_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(360)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, 360, 160))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sH)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sH.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.H_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(160)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dH)
End If
ElseIf nListType = ListTypes.RAWPART AndAlso sH.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.H_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(160)
Else
row.Cells(ColumnIndex).AddParagraph(RawPart.sH)
Select Case nListType
Case ListTypes.PART
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sH)
Case ListTypes.MACHGROUP
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dH)
Case ListTypes.RAWPART
row.Cells(ColumnIndex).AddParagraph(RawPart.sH)
End Select
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -399,35 +379,27 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(RawPart.sL)
'End If
If nListType = ListTypes.PART AndAlso sL.bIsChecked Then
If sL.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(1.6))
Select Case nListType
Case ListTypes.PART
table.AddColumn(Unit.FromCentimeter(1.6))
Case ListTypes.MACHGROUP, ListTypes.RAWPART
table.AddColumn(Unit.FromCentimeter(2))
End Select
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.L_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(6672.6)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, 6672.6, 15000))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sL)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sL.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.L_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(15000)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dL)
End If
ElseIf nListType = ListTypes.RAWPART AndAlso sL.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.L_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(15000)
Else
row.Cells(ColumnIndex).AddParagraph(RawPart.sL)
Select Case nListType
Case ListTypes.PART
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sL)
Case ListTypes.MACHGROUP
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dL)
Case ListTypes.RAWPART
row.Cells(ColumnIndex).AddParagraph(RawPart.sL)
End Select
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -443,25 +415,15 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(MachGroupVM.nName)
'End If
If nListType = ListTypes.PART AndAlso sDesc.bIsChecked Then
If sDesc.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(4))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.NAM_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("Arc.in salita smussato")
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, "Arc.in salita smussato", 1))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sNAM)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sDesc.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(4))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.NAM_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(1)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.nName)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, BTLPartVM.sNAM, MachGroupVM.nName))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -477,25 +439,15 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(MachGroupVM.nName)
'End If
If nListType = ListTypes.PART AndAlso sName.bIsChecked Then
If sName.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(4))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.NAM_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("Arc.in salita smussato")
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, "Arc.in salita smussato", 1))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sNAM)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sName.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(4))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.NAM_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(1)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.nName)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, BTLPartVM.sNAM, MachGroupVM.nName))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -513,7 +465,7 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(RawPart.sMaterial)
'End If
If nListType = ListTypes.PART AndAlso sMaterial.bIsChecked Then
If sMaterial.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
@@ -521,27 +473,14 @@ Module PDFHelper
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("GL24h")
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sMATERIAL)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sMaterial.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.MAT_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("GL24h")
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sMATERIAL)
End If
ElseIf nListType = ListTypes.RAWPART AndAlso sMaterial.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.MAT_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("GL24h")
Else
row.Cells(ColumnIndex).AddParagraph(RawPart.sMaterial)
Select Case nListType
Case ListTypes.PART
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sMATERIAL)
Case ListTypes.MACHGROUP
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sMATERIAL)
Case ListTypes.RAWPART
row.Cells(ColumnIndex).AddParagraph(RawPart.sMaterial)
End Select
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -553,11 +492,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.CNT_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(1)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sCNT)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 1, BTLPartVM.sCNT))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -569,11 +504,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.ADDED_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(0)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sADDED)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 0, BTLPartVM.sADDED))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -585,11 +516,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.INPROD_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(0)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.nINPROD)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 0, BTLPartVM.nINPROD))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -601,11 +528,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.DONE_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(0)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.nDONE)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 0, BTLPartVM.nDONE))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -617,11 +540,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.Used_Msg)
ElseIf nListType = ListTypes.MACHGROUP Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(99.719)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sUsage)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 99.719, MachGroupVM.sUsage))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -633,11 +552,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.Waste_Msg)
ElseIf nListType = ListTypes.MACHGROUP Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(0.5)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sWaste)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 0.5, MachGroupVM.sWaste))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -653,25 +568,15 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dUnitVolume)
'End If
If nListType = ListTypes.PART AndAlso sUVolume.bIsChecked Then
If sUVolume.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(1.5))
table.AddColumn(If(nListType = ListTypes.PART, Unit.FromCentimeter(1.5), Unit.FromCentimeter(2)))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.UNIT_VOLUME_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(0.48)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sUnitVolume)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sUVolume.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.UNIT_VOLUME_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph(0.48)
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.dUnitVolume)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, BTLPartVM.sUnitVolume, MachGroupVM.dUnitVolume))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -683,11 +588,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.TOT_VOLUME_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(0.48)
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sTotVolume)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 0.48, BTLPartVM.sTotVolume))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -703,25 +604,15 @@ Module PDFHelper
' row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sUnitTime)
'End If
If nListType = ListTypes.PART AndAlso sUTime.bIsChecked Then
If sUTime.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2.2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.UNIT_TIME_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("00:00:00")
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, "00:00:00", "00:13:07"))
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sUnitTime)
End If
ElseIf nListType = ListTypes.MACHGROUP AndAlso sUTime.bIsChecked Then
If PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(2.2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.UNIT_TIME_Msg)
ElseIf bPreview Then
row.Cells(ColumnIndex).AddParagraph("00:13:07")
Else
row.Cells(ColumnIndex).AddParagraph(MachGroupVM.sUnitTime)
row.Cells(ColumnIndex).AddParagraph(If(nListType = ListTypes.PART, BTLPartVM.sUnitTime, MachGroupVM.sUnitTime))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -733,11 +624,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.TOT_TIME_Msg)
ElseIf nListType = ListTypes.PART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph("00:00:00")
Else
row.Cells(ColumnIndex).AddParagraph(BTLPartVM.sTotTime)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, "00:00:00", BTLPartVM.sTotTime))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -749,11 +636,7 @@ Module PDFHelper
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.QTY_Msg)
ElseIf nListType = ListTypes.RAWPART Then
If bPreview Then
row.Cells(ColumnIndex).AddParagraph(11)
Else
row.Cells(ColumnIndex).AddParagraph(RawPart.nQuantity)
End If
row.Cells(ColumnIndex).AddParagraph(If(bPreview, 11, RawPart.nQuantity))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -845,10 +728,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(1.5))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.PDN_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph(55)
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.nPDN)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), 55, PartVM.nPDN))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -859,10 +740,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.W_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph(120)
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.sW)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), 120, PartVM.sW))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -873,10 +752,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.H_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph(160)
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.sH)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), 160, PartVM.sH))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -887,10 +764,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.L_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph(185.9)
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.sL)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), 185.9, PartVM.sL))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -901,10 +776,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(4))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.NAM_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph("Correntini")
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.sNAM)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), "Correntini", PartVM.sNAM))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))
@@ -923,10 +796,8 @@ Module PDFHelper
table.AddColumn(Unit.FromCentimeter(2))
ElseIf PartIndex = -1 Then
row.Cells(ColumnIndex).AddParagraph(Statistic_Messages.MAT_Msg)
ElseIf IsNothing(RawPart) Then
row.Cells(ColumnIndex).AddParagraph("GL24h")
Else
row.Cells(ColumnIndex).AddParagraph(PartVM.sMATERIAL)
row.Cells(ColumnIndex).AddParagraph(If(IsNothing(RawPart), "GL24h", PartVM.sMATERIAL))
End If
ElseIf PartIndex = -2 Then
table.AddColumn(Unit.FromCentimeter(0))