LAufzettel, Anhangasarten. Ueberstunden

This commit is contained in:
2024-03-15 08:13:51 +01:00
parent 6fc97718a2
commit 3671255c45
4 changed files with 58 additions and 81 deletions

View File

@@ -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

View File

@@ -1,7 +1,6 @@

Imports System.Text
Imports System.Threading
Imports System.Web.UI.WebControls
Imports System.Windows.Forms
Public Class frmUeberstundenauszahlen
@@ -679,7 +678,7 @@ Public Class frmUeberstundenauszahlen
txtlfdSaldo.Text = timas.getTimeSaldo(MA.mit_timasId, "", "overallBalance")
stunden100auszbere = RoundOfDigits(stunden100ausz * 2, 2)
stunden50auszbere = RoundOfDigits(stunden50ausz * 100 / faktorSamstagsarbeit, 2)
stunden50auszbere = RoundOfDigits(stunden50ausz * faktorSamstagsarbeit / 100, 2)
txt100x2.Text = stunden100auszbere
txt50x15.Text = stunden50auszbere