LAufzettel, Anhangasarten. Ueberstunden
This commit is contained in:
@@ -5,38 +5,28 @@ Imports System.Reflection
|
||||
|
||||
Public Class cAvisoAnhangsarten_LIST
|
||||
Public LIST As New List(Of cAvisoAnhangsarten)
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
LOAD_LIST()
|
||||
|
||||
Sub New(aktiv As Boolean, firma As String, filiale As String)
|
||||
LOAD_LIST(aktiv, firma, filiale)
|
||||
End Sub
|
||||
Public Sub LOAD_LIST()
|
||||
|
||||
Public Sub LOAD_LIST(aktiv As Boolean, Firma As String, Filiale As String)
|
||||
Try
|
||||
|
||||
LIST.Clear()
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionAVISO()
|
||||
Using cmd As New SqlCommand("SELECT * FROM [tblAvisoAnhangsArten] ", conn)
|
||||
|
||||
' cmd.Parameters.AddWithValue("@OffertenNr", OffertenNr)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
While dr.Read
|
||||
Dim l As New cAvisoAnhangsarten
|
||||
For Each i In l.getParameterList()
|
||||
Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
|
||||
If dr.Item(i.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(l, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(l, dr.Item(i.Text))
|
||||
End If
|
||||
Next
|
||||
LIST.Add(l)
|
||||
For Each r In SQL.loadDgvBySql("Select aa_id FROM [tblAvisoAnhangsArten] WHERE aa_aktiv=" & IIf(aktiv, "1", "0") & " And ((aa_firma Is null And aa_filiale Is null) " & IIf(Firma <> "", " Or aa_firma = '" & Firma & "'", "") & IIf(Filiale <> "", " OR aa_filiale = '" & Filiale & "'", "") & ")", "AVISO").Rows
|
||||
LIST.Add(New VERAG_PROG_ALLGEMEIN.cAvisoAnhangsarten(r("aa_id")))
|
||||
Next
|
||||
|
||||
End While
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -49,6 +39,7 @@ Public Class cAvisoAnhangsarten
|
||||
Property aa_aktiv As Object = Nothing
|
||||
Property aa_bezeichnung As Object = Nothing
|
||||
Property aa_firma As Object = Nothing
|
||||
Property aa_filiale As Object = Nothing
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
@@ -72,6 +63,7 @@ Public Class cAvisoAnhangsarten
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_aktiv", aa_aktiv))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_bezeichnung", aa_bezeichnung))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_firma", aa_firma))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_filiale", aa_filiale))
|
||||
|
||||
Return list
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user