ANhangsarten, addsendeungen, Anhangsimport
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
Imports iText.Forms.Xfdf
|
||||
|
||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
Imports iText.Forms.Xfdf
|
||||
Imports iText.Kernel.Pdf
|
||||
Imports System.Runtime.Remoting
|
||||
Imports System.Web.UI
|
||||
|
||||
Public Class frmAvisoAnhangsarten
|
||||
@@ -92,6 +95,7 @@ Public Class frmAvisoAnhangsarten
|
||||
Try
|
||||
|
||||
e.Row.Cells("aa_aktiv").Value = True
|
||||
e.Row.Cells("aa_isBrexti").Value = False
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
@@ -110,6 +114,7 @@ Public Class frmAvisoAnhangsarten
|
||||
SPRACHENBind.updateBinding()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -126,5 +131,51 @@ Public Class frmAvisoAnhangsarten
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
|
||||
Dim dtAnhaenge As DataTable = sql.loadDgvBySql("SELECT distinct([anh_Art]) as bezeichnung FROM [tblAvisoAnhaenge]", "AVISO")
|
||||
Dim dtAnhangsarten As DataTable = sql.loadDgvBySql("SELECT distinct([aa_bezeichnung]) as bezeichnung FROM " & table, "AVISO")
|
||||
|
||||
If dtAnhaenge.Rows.Count = 0 Or dtAnhangsarten.Rows.Count = 0 Then Exit Sub
|
||||
|
||||
Dim resultsTable As New DataTable
|
||||
resultsTable.Columns.Add("bezeichnung", GetType(String))
|
||||
|
||||
|
||||
For Each rowAnhang As DataRow In dtAnhaenge.Rows
|
||||
If rowAnhang(0) <> "" Then
|
||||
Dim isExisting As Boolean = False
|
||||
For Each rowArt As DataRow In dtAnhangsarten.Rows
|
||||
If rowArt(0) = rowAnhang(0) Then
|
||||
isExisting = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not isExisting Then
|
||||
Dim R As DataRow = resultsTable.NewRow
|
||||
R(0) = rowAnhang(0)
|
||||
resultsTable.Rows.Add(R)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If resultsTable.Rows.Count > 0 Then
|
||||
|
||||
Dim b = New System.Text.StringBuilder()
|
||||
For Each resultRow In resultsTable.Rows
|
||||
b.Append(resultRow(0) & vbNewLine)
|
||||
Next
|
||||
|
||||
MsgBox(resultsTable.Rows.Count & " fehlende Anhangsarten:" & vbNewLine & b.ToString)
|
||||
|
||||
Else
|
||||
MsgBox("keine fehlenden Anhangsarten")
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user