Asfinag, Mitarbeiter, UID-Prüfung, Rechnugssuche, Fiskalkunde, Kundenübersicht, div. Auswertungen für Asfinag
This commit is contained in:
98
VERAG_PROG_ALLGEMEIN/Classes/cAsfinagMaut.vb
Normal file
98
VERAG_PROG_ALLGEMEIN/Classes/cAsfinagMaut.vb
Normal file
@@ -0,0 +1,98 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cAsfinagMaut
|
||||
|
||||
Property cardnumber As Object = Nothing
|
||||
Property licenceplate As Object = Nothing
|
||||
Property turnoverdate As Object = Nothing
|
||||
Property contractPartner As Object = Nothing
|
||||
Property netAmount As Object = Nothing
|
||||
Property VATamount As Object = Nothing
|
||||
Property totalAmount As Object = Nothing
|
||||
Property additionalData As Object = Nothing
|
||||
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Sub New()
|
||||
|
||||
End Sub
|
||||
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("cardnumber", cardnumber))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("licenceplate", licenceplate))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("turnoverdate", turnoverdate))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("contractPartner", contractPartner))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("netAmount", netAmount))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("VATamount", VATamount))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("totalAmount", totalAmount))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("additionalData", additionalData))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function SAVE() As Boolean
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
|
||||
Dim sqlstr = " BEGIN TRAN " &
|
||||
" BEGIN " & getInsertCmd() & " END " &
|
||||
" commit tran "
|
||||
|
||||
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
|
||||
End Function
|
||||
|
||||
Public Sub LOAD()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblAsfinagMaut WHERE cardnumber=@cardnumber ", conn)
|
||||
cmd.Parameters.AddWithValue("@cardnumber", cardnumber)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getInsertCmd() As String
|
||||
Try
|
||||
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
|
||||
Dim str As String = ""
|
||||
Dim values As String = ""
|
||||
For Each i In list
|
||||
If Not i.isPrimaryParam Then
|
||||
str &= "[" & i.Text & "],"
|
||||
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
|
||||
End If
|
||||
Next
|
||||
str = str.Substring(0, str.Length - 1) 'wg. ','
|
||||
values = values.Substring(0, values.Length - 1) 'wg. ','
|
||||
Return (" INSERT INTO tblAsfinagMaut (" & str & ") VALUES(" & values & ") ")
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -322,6 +322,7 @@
|
||||
<Compile Include="Classes\cAbgaben.vb" />
|
||||
<Compile Include="Classes\cAbrechnung_NCTSBrg.vb" />
|
||||
<Compile Include="Classes\cAPI.vb" />
|
||||
<Compile Include="Classes\cAsfinagMaut.vb" />
|
||||
<Compile Include="Classes\cAufschubKonten.vb" />
|
||||
<Compile Include="Classes\cAvisoAnhaenge.vb" />
|
||||
<Compile Include="Classes\cAvisoAnhangsarten.vb" />
|
||||
|
||||
@@ -541,7 +541,12 @@ Public Class cProgramFunctions
|
||||
Dim bounds As Rectangle
|
||||
Dim screenshot As System.Drawing.Bitmap
|
||||
Dim graph As Graphics
|
||||
bounds = form.Bounds 'Screen.PrimaryScreen.Bounds
|
||||
|
||||
If form Is Nothing Then Return ""
|
||||
bounds = form.Bounds
|
||||
|
||||
|
||||
'Screen.PrimaryScreen.Bounds
|
||||
|
||||
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
|
||||
graph = Graphics.FromImage(screenshot)
|
||||
|
||||
21
VERAG_PROG_ALLGEMEIN/frmErrorMeldung.Designer.vb
generated
21
VERAG_PROG_ALLGEMEIN/frmErrorMeldung.Designer.vb
generated
@@ -29,6 +29,7 @@ Partial Class frmErrorMeldung
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.cbxScreenshot = New System.Windows.Forms.CheckBox()
|
||||
Me.cbxEnviromentVariables = New System.Windows.Forms.CheckBox()
|
||||
Me.lblErr_Nachricht = New System.Windows.Forms.Label()
|
||||
@@ -39,7 +40,6 @@ Partial Class frmErrorMeldung
|
||||
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
@@ -107,6 +107,15 @@ Partial Class frmErrorMeldung
|
||||
Me.Panel2.Size = New System.Drawing.Size(498, 138)
|
||||
Me.Panel2.TabIndex = 8
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(3, 116)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(93, 13)
|
||||
Me.Label4.TabIndex = 9
|
||||
Me.Label4.Text = "Anhang schicken:"
|
||||
'
|
||||
'cbxScreenshot
|
||||
'
|
||||
Me.cbxScreenshot.AutoSize = True
|
||||
@@ -219,16 +228,6 @@ Partial Class frmErrorMeldung
|
||||
Me.TextBox2.Size = New System.Drawing.Size(492, 135)
|
||||
Me.TextBox2.TabIndex = 4
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(3, 116)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(93, 13)
|
||||
Me.Label4.TabIndex = 9
|
||||
Me.Label4.Text = "Anhang schicken:"
|
||||
Me.Label4.Visible = False
|
||||
'
|
||||
'frmErrorMeldung
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
|
||||
Reference in New Issue
Block a user