ATEZ, Dateigröße wird angezeigt.
This commit is contained in:
@@ -425,6 +425,8 @@ Public Class frmATEZ_NCTS
|
||||
Sub initAttachment()
|
||||
Dim hSQL As String = " SELECT [anh_id],anh_Datum,[anh_Name],[anh_docId],
|
||||
|
||||
case WHEN [anh_size] > 0 Then ROUND([anh_size] / 1000000,2) End as anh_size,
|
||||
|
||||
CASE WHEN [anh_Art] = 'ATR-EUR1' then 'EUR'
|
||||
when [anh_Art] = 'Rechnung' then 'INVOICE'
|
||||
when [anh_Art] = 'eFatura' then 'INVOICE'
|
||||
@@ -487,15 +489,31 @@ Public Class frmATEZ_NCTS
|
||||
.Columns("anh_Typ").HeaderText = "Typ"
|
||||
.Columns("anh_Typ").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
.Columns("anh_size").Width = 60
|
||||
.Columns("anh_size").HeaderText = "Größe in MB"
|
||||
.Columns("anh_size").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
End With
|
||||
|
||||
For Each doc As DataGridViewRow In dgvAnhaenge.Rows
|
||||
|
||||
If Not IsDBNull(doc.Cells("anh_size").Value) AndAlso doc.Cells("anh_size").Value > 0 Then
|
||||
Dim size = (doc.Cells("anh_size").Value)
|
||||
If size < 1 Then
|
||||
doc.DefaultCellStyle.BackColor = Color.LightGreen
|
||||
ElseIf size > 1 AndAlso size < 5 Then
|
||||
doc.DefaultCellStyle.BackColor = Color.LightYellow
|
||||
Else
|
||||
doc.DefaultCellStyle.BackColor = Color.IndianRed
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If atez_data IsNot Nothing AndAlso atez_data.selectedDocuments <> "" Then
|
||||
|
||||
For Each doc As DataGridViewRow In dgvAnhaenge.Rows
|
||||
|
||||
If atez_data.selectedDocuments.Contains(doc.Cells("anh_docId").Value) Then
|
||||
doc.Cells("anh_selekt").Value = True
|
||||
End If
|
||||
If atez_data.selectedDocuments.Contains(doc.Cells("anh_docId").Value) Then doc.Cells("anh_selekt").Value = True
|
||||
|
||||
Next
|
||||
End If
|
||||
@@ -573,11 +591,12 @@ Public Class frmATEZ_NCTS
|
||||
If selectedDocuments Then Exit For
|
||||
Next
|
||||
|
||||
If Not selectedDocuments Then
|
||||
lblInfo.Text = "kein Anhang selektiert"
|
||||
Cursor = Cursors.Default
|
||||
Return selectedDocuments
|
||||
End If
|
||||
'auskommentiert, weil Sendungen ohne ANhang auch geschickt werden sollen: M.Akceylan
|
||||
'If Not selectedDocuments Then
|
||||
' lblInfo.Text = "kein Anhang selektiert"
|
||||
' Cursor = Cursors.Default
|
||||
' Return selectedDocuments
|
||||
'End If
|
||||
|
||||
Return selectedDocuments
|
||||
|
||||
@@ -668,4 +687,22 @@ Public Class frmATEZ_NCTS
|
||||
If sbRoute8._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute8._value)
|
||||
If sbRoute9._value <> "" Then Dim route As New cATEZ_NCTS_Routen(atezData.Id, sbRoute9._value)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub dgvAnhaenge_CurrentCellChanged(sender As Object, e As EventArgs) Handles dgvAnhaenge.CurrentCellDirtyStateChanged
|
||||
Dim countAnh As Double = 0
|
||||
|
||||
|
||||
If dgvAnhaenge.CurrentRow.Cells("anh_size").Value > 0 Then countAnh += dgvAnhaenge.CurrentRow.Cells("anh_size").Value
|
||||
|
||||
For Each Row As DataGridViewRow In dgvAnhaenge.Rows
|
||||
If Row.Cells("anh_selekt").Value IsNot DBNull.Value AndAlso Row.Cells("anh_selekt").Value = True AndAlso Row.Cells("anh_size").Value IsNot DBNull.Value Then
|
||||
countAnh += Row.Cells("anh_size").Value
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
lblAnh.Text = countAnh.ToString
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user