This commit is contained in:
2025-08-14 12:47:08 +02:00
parent 801924c221
commit 2f996886a7
247 changed files with 78292 additions and 183 deletions

View File

@@ -1,6 +1,10 @@
Imports System.Data.SqlClient
Imports System.Reflection
Public Class cAuditFlow
Private ReadOnly SQL As New SQL
''' <summary>
''' Erzeugt alle fälligen Prüfungen ab dem gegebenen Startdatum.
''' Unterstützt sowohl Intervall-basierte als auch einmalige Prüfobjekte.
@@ -96,4 +100,37 @@ Public Class cAuditFlow
Throw New ArgumentException("Ungültiger Intervalltyp: " & typ)
End Select
End Function
''' <summary>
''' Löscht alle offenen (wartPruef_Erledigung = 0) Prüfungen für ein Prüfobjekt.
''' Standard: nur fällige (Faelligkeitsdatum <= heute).
''' Rückgabewert: Anzahl gelöschter Datensätze; -1 bei Fehler.
''' </summary>
Shared Function DELETE_ALL_OPEN_FAELLIGE(wartPOId As Integer, Optional onlyFaellige As Boolean = True) As Integer
Try
Dim sqlStr As String =
"DELETE FROM [tblAuditFlow_Pruefungen] " &
"WHERE [wartPruef_wartPOId]=@wartPruef_wartPOId " &
" AND ISNULL([wartPruef_Erledigung],0)=0"
If onlyFaellige Then
sqlStr &= " AND [wartPruef_Faelligkeitsdatum] <= CAST(GETDATE() AS DATE)"
End If
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand(sqlStr, conn)
cmd.Parameters.AddWithValue("@wartPruef_wartPOId", wartPOId)
Dim affected As Integer = cmd.ExecuteNonQuery()
Return affected
End Using
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, MethodInfo.GetCurrentMethod().Name)
Return -1
End Try
End Function
End Class

View File

@@ -11,7 +11,7 @@ Public Class cAuditFlow_Pruefobjekte
Public Property wartPO_Kategorie As String
Public Property wartPO_Firma As String
Public Property wartPO_Niederlasung As String
Public Property wartPO_Standort As String
Public Property wartPO_StandortId As Integer
Public Property wartPO_Aktiv As Boolean = True
Public Property wartPO_IntervallTyp As String ' VARCHAR(30)
Public Property wartPO_IntervallWert As Nullable(Of Integer) ' NULL
@@ -58,7 +58,7 @@ Public Class cAuditFlow_Pruefobjekte
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Kategorie", wartPO_Kategorie))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Firma", wartPO_Firma))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Niederlasung", wartPO_Niederlasung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Standort", wartPO_Standort))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_StandortId", wartPO_StandortId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Aktiv", wartPO_Aktiv))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_IntervallTyp", wartPO_IntervallTyp))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_IntervallWert", wartPO_IntervallWert))
@@ -166,6 +166,27 @@ Public Class cAuditFlow_Pruefobjekte
Return ""
End Try
End Function
Private Function DELETE_ALL_OPEN_FAELLIGE() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim setParts As New List(Of String)
For Each i In list
If Not i.isPrimaryParam Then
setParts.Add("[" & i.Text & "]=@" & i.Scalarvariable)
End If
Next
Dim setClause As String = String.Join(",", setParts)
Return "UPDATE [tblAuditFlow_Pruefobjekte] SET " & setClause & " WHERE [wartPO_Id]=@wartPO_Id"
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Return ""
End Try
End Function
Public Shared Function LoadAllAktiv() As List(Of cAuditFlow_Pruefobjekte)
Dim result As New List(Of cAuditFlow_Pruefobjekte)

View File

@@ -73,6 +73,9 @@ Partial Class frmAuditFlow
Me.Label13 = New System.Windows.Forms.Label()
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.btnSuche = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.lblAbDat = New System.Windows.Forms.Label()
Me.txtWartungFaelligkeitAbDat = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.cntxtOptionen.SuspendLayout()
Me.pnlTop.SuspendLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -178,26 +181,29 @@ Partial Class frmAuditFlow
Me.dgvPruefungsobjekte.Location = New System.Drawing.Point(0, 106)
Me.dgvPruefungsobjekte.Name = "dgvPruefungsobjekte"
Me.dgvPruefungsobjekte.RowHeadersVisible = False
Me.dgvPruefungsobjekte.Size = New System.Drawing.Size(960, 471)
Me.dgvPruefungsobjekte.Size = New System.Drawing.Size(960, 450)
Me.dgvPruefungsobjekte.TabIndex = 7
'
'pnloptions
'
Me.pnloptions.BackColor = System.Drawing.Color.WhiteSmoke
Me.pnloptions.Controls.Add(Me.lblAbDat)
Me.pnloptions.Controls.Add(Me.txtWartungFaelligkeitAbDat)
Me.pnloptions.Controls.Add(Me.Button1)
Me.pnloptions.Controls.Add(Me.Label9)
Me.pnloptions.Controls.Add(Me.MyTextBox2)
Me.pnloptions.Controls.Add(Me.Button2)
Me.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnloptions.Location = New System.Drawing.Point(0, 577)
Me.pnloptions.Location = New System.Drawing.Point(0, 556)
Me.pnloptions.Name = "pnloptions"
Me.pnloptions.Size = New System.Drawing.Size(960, 59)
Me.pnloptions.Size = New System.Drawing.Size(960, 80)
Me.pnloptions.TabIndex = 9
'
'Label9
'
Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(865, 29)
Me.Label9.Location = New System.Drawing.Point(865, 55)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(30, 13)
Me.Label9.TabIndex = 7
@@ -220,7 +226,7 @@ Partial Class frmAuditFlow
Me.MyTextBox2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MyTextBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.MyTextBox2.ForeColor = System.Drawing.Color.Black
Me.MyTextBox2.Location = New System.Drawing.Point(897, 26)
Me.MyTextBox2.Location = New System.Drawing.Point(897, 52)
Me.MyTextBox2.MaxLineLength = -1
Me.MyTextBox2.MaxLines_Warning = ""
Me.MyTextBox2.MaxLines_Warning_Label = Nothing
@@ -236,7 +242,7 @@ Partial Class frmAuditFlow
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(12, 5)
Me.Button2.Location = New System.Drawing.Point(12, 7)
Me.Button2.Margin = New System.Windows.Forms.Padding(0)
Me.Button2.Name = "Button2"
Me.Button2.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
@@ -369,9 +375,9 @@ Partial Class frmAuditFlow
Me.Panel3.Controls.Add(Me.Label3)
Me.Panel3.Controls.Add(Me.MyTextBox1)
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel3.Location = New System.Drawing.Point(0, 577)
Me.Panel3.Location = New System.Drawing.Point(0, 556)
Me.Panel3.Name = "Panel3"
Me.Panel3.Size = New System.Drawing.Size(622, 59)
Me.Panel3.Size = New System.Drawing.Size(622, 80)
Me.Panel3.TabIndex = 6
'
'Button9
@@ -380,7 +386,7 @@ Partial Class frmAuditFlow
Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button9.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus
Me.Button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button9.Location = New System.Drawing.Point(12, 5)
Me.Button9.Location = New System.Drawing.Point(12, 7)
Me.Button9.Margin = New System.Windows.Forms.Padding(0)
Me.Button9.Name = "Button9"
Me.Button9.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
@@ -395,7 +401,7 @@ Partial Class frmAuditFlow
Me.Button11.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button11.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button11.Location = New System.Drawing.Point(531, 22)
Me.Button11.Location = New System.Drawing.Point(531, 43)
Me.Button11.Name = "Button11"
Me.Button11.Size = New System.Drawing.Size(41, 34)
Me.Button11.TabIndex = 7
@@ -409,7 +415,7 @@ Partial Class frmAuditFlow
Me.Button12.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button12.ForeColor = System.Drawing.Color.Black
Me.Button12.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button12.Location = New System.Drawing.Point(578, 22)
Me.Button12.Location = New System.Drawing.Point(578, 43)
Me.Button12.Name = "Button12"
Me.Button12.Size = New System.Drawing.Size(41, 34)
Me.Button12.TabIndex = 8
@@ -419,7 +425,7 @@ Partial Class frmAuditFlow
'
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(445, 33)
Me.Label3.Location = New System.Drawing.Point(445, 55)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(30, 13)
Me.Label3.TabIndex = 5
@@ -442,7 +448,7 @@ Partial Class frmAuditFlow
Me.MyTextBox1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MyTextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.MyTextBox1.ForeColor = System.Drawing.Color.Black
Me.MyTextBox1.Location = New System.Drawing.Point(477, 30)
Me.MyTextBox1.Location = New System.Drawing.Point(477, 52)
Me.MyTextBox1.MaxLineLength = -1
Me.MyTextBox1.MaxLines_Warning = ""
Me.MyTextBox1.MaxLines_Warning_Label = Nothing
@@ -757,6 +763,55 @@ Partial Class frmAuditFlow
Me.btnSuche.Text = "Suche starten"
Me.btnSuche.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.zeiterfassung_s
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(583, 7)
Me.Button1.Margin = New System.Windows.Forms.Padding(0)
Me.Button1.Name = "Button1"
Me.Button1.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
Me.Button1.Size = New System.Drawing.Size(193, 45)
Me.Button1.TabIndex = 9
Me.Button1.Text = "Fälligkeiten berechnen"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'lblAbDat
'
Me.lblAbDat.AutoSize = True
Me.lblAbDat.Location = New System.Drawing.Point(613, 55)
Me.lblAbDat.Name = "lblAbDat"
Me.lblAbDat.Size = New System.Drawing.Size(56, 13)
Me.lblAbDat.TabIndex = 142
Me.lblAbDat.Text = "ab Datum:"
'
'txtWartungFaelligkeitAbDat
'
Me.txtWartungFaelligkeitAbDat._DateTimeOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnlyKommastellen = ""
Me.txtWartungFaelligkeitAbDat._numbersOnlyTrennzeichen = True
Me.txtWartungFaelligkeitAbDat._Prozent = False
Me.txtWartungFaelligkeitAbDat._ShortDateNew = True
Me.txtWartungFaelligkeitAbDat._ShortDateOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly_Seconds = False
Me.txtWartungFaelligkeitAbDat._value = ""
Me.txtWartungFaelligkeitAbDat._Waehrung = False
Me.txtWartungFaelligkeitAbDat._WaehrungZeichen = True
Me.txtWartungFaelligkeitAbDat.ForeColor = System.Drawing.Color.Red
Me.txtWartungFaelligkeitAbDat.Location = New System.Drawing.Point(675, 52)
Me.txtWartungFaelligkeitAbDat.MaxLength = 10
Me.txtWartungFaelligkeitAbDat.MaxLineLength = -1
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning = ""
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning_Label = Nothing
Me.txtWartungFaelligkeitAbDat.Name = "txtWartungFaelligkeitAbDat"
Me.txtWartungFaelligkeitAbDat.Size = New System.Drawing.Size(101, 20)
Me.txtWartungFaelligkeitAbDat.TabIndex = 143
'
'frmAuditFlow
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -838,4 +893,7 @@ Partial Class frmAuditFlow
Friend WithEvents Label9 As Windows.Forms.Label
Friend WithEvents MyTextBox2 As MyTextBox
Friend WithEvents CheckBox1 As Windows.Forms.CheckBox
Friend WithEvents Button1 As Windows.Forms.Button
Friend WithEvents lblAbDat As Windows.Forms.Label
Friend WithEvents txtWartungFaelligkeitAbDat As MyTextBox
End Class

View File

@@ -11,6 +11,8 @@ Public Class frmAuditFlow
Private Sub frmAuditFlow_Load(sender As Object, e As EventArgs) Handles Me.Load
txtWartungFaelligkeitAbDat._value = Now.ToShortDateString
txtAbfertDat.Text = Now.AddMonths(-6).ToShortDateString 'CDate("01." & Now.ToString("MM.yyyy")).AddMonths(-1).ToShortDateString
txtAbfertDatBis.Text = Now.ToShortDateString
@@ -18,12 +20,8 @@ Public Class frmAuditFlow
btnJahr.Text = JAHR.Year
cboKategorie.Items.Clear()
cboKategorie.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboKategorie.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("WARTUNG", "WARTUNG"))
cboKategorie.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("KFZ", "KFZ"))
cboKategorie.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("STAPLER/MASCHINEN/GERÄTE", "MASCHINEN"))
cboKategorie.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNTERWEISUNGEN", "UNTERWEISUNGEN"))
cboKategorie.SelectedItem = 0
cboKategorie.fillWithSQL("SELECT wartK_Kategorie,[wartK_KategorieBezeichnung] FROM [tblAuditFlow_Kategorien] order by wartK_KategorieBezeichnung", False, "ADMIN", True)
cboNL.Items.Clear()
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
@@ -45,7 +43,7 @@ Public Class frmAuditFlow
End Sub
Private Sub MyComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboNL.SelectedIndexChanged, cboStandort.SelectedIndexChanged, cboKategorie.SelectedIndexChanged
Private Sub MyComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboStandort.SelectedIndexChanged, cboKategorie.SelectedIndexChanged
loadDGVPuefungsobjekte()
End Sub
@@ -59,7 +57,15 @@ Public Class frmAuditFlow
loadDGVPuefungsobjekte()
End Sub
Private Sub cboNL_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboNL.SelectedIndexChanged
cboStandort.Items.Clear()
cboStandort.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
If cboFirma._value <> "" AndAlso cboNL._value <> "" Then
cboStandort.fillWithSQL("SELECT [wartSt_Id],[wartSt_Standort] FROM [tblAuditFlow_Standorte] where [wartSt_Aktiv]=1 and [wartSt_Firma]='" & cboFirma._value & "' AND [wartSt_Niederlasung]='" & cboNL._value & "' order by wartSt_Standort", False, "ADMIN", True)
End If
End Sub
'-------------------------------------------------------------------
'----DGVPuefungsobjekte---------------------------------------------
@@ -74,14 +80,14 @@ Public Class frmAuditFlow
Dim sqlstr As String = ""
' MsgBox(VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL)
sqlstr &= " SELECT " & TopMax & " [wartPO_Id],[wartPO_Bezeichnung],[wartPO_Kennung],[wartPO_Firma],[wartPO_Niederlasung],[wartPO_Standort],[wartPO_Kategorie],
sqlstr &= " SELECT " & TopMax & " [wartPO_Id],[wartPO_Bezeichnung],[wartPO_Kennung],[wartPO_Firma],[wartPO_Niederlasung],wartSt_Standort as wartPO_Standort,[wartPO_Kategorie],
[wartPO_IntervallTyp],[wartPO_IntervallWert],[wartPO_Erinnerung_VorlaufInTagen] ,[wartPO_zustaendigIntern_Name],[wartPO_Aktiv]
FROM [tblAuditFlow_Pruefobjekte] WHERE 1=1 "
FROM [tblAuditFlow_Pruefobjekte] INNER JOIN tblAuditFlow_Standorte ON wartPO_StandortId=wartSt_Id WHERE 1=1 "
With dgvPruefungsobjekte
' .DataSource = myTable
' MsgBox(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartPO_Standort")
.SET_SQL(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartPO_Standort ", "ADMIN", getListPruefungsobjekte)
' MsgBox(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartPO_StandortId")
.SET_SQL(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartSt_Standort ", "ADMIN", getListPruefungsobjekte)
.LOAD()
setDGVOptionsPruefungsobjekte()
End With
@@ -149,7 +155,7 @@ Public Class frmAuditFlow
If cboFirma._value <> "" Then sqlstr &= " AND wartPO_Firma LIKE @wartPO_Firma "
If cboNL._value <> "" Then sqlstr &= " AND wartPO_Niederlasung LIKE @wartPO_Niederlasung "
If cboStandort._value <> "" Then sqlstr &= " AND wartPO_Standort LIKE @wartPO_Standort "
If cboStandort._value <> "" Then sqlstr &= " AND wartPO_StandortId LIKE @wartPO_StandortId "
If cboKategorie._value <> "" Then sqlstr &= " AND wartPO_Kategorie LIKE @wartPO_Kategorie "
@@ -161,7 +167,7 @@ Public Class frmAuditFlow
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Firma", cboFirma._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Niederlasung", cboNL._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Standort", cboStandort._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_StandortId", cboStandort._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Kategorie", cboKategorie._value))
@@ -190,6 +196,22 @@ Public Class frmAuditFlow
MsgBox(ex.Message)
End Try
End Sub
Private Sub dgvPruefungsobjekte_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvPruefungsobjekte.CellDoubleClick
' Falls Kopfzeile doppelt geklickt wird -> ignorieren
If e.RowIndex < 0 Then Exit Sub
' ID der ausgewählten Zeile holen (Spalte "wartPO_Id")
Dim wartPO_Id As Integer = CInt(dgvPruefungsobjekte.Rows(e.RowIndex).Cells("wartPO_Id").Value)
' Hier deine Funktion oder Logik aufrufen
' Beispiel:
Dim f As New frmAuditFlow_Pruefungsojekt(wartPO_Id)
f.ShowDialog(Me)
dgvPruefungsobjekte.RELOAD()
setDGVOptionsPruefungsobjekte()
End Sub
'-------------------------------------------------------------------
@@ -218,13 +240,105 @@ Public Class frmAuditFlow
Private Sub btnSuche_Click(sender As Object, e As EventArgs) Handles btnSuche.Click
loadDGVPuefungen()
End Sub
Sub loadDGVPuefungen()
Try
With dgvPruefungen
.Rows.Clear()
If .SelectedRows.Count = 0 Then
Exit Sub
End If
Dim wartPO_Id As Integer = CInt(dgvPruefungsobjekte.SelectedRows(0).Cells("wartPO_Id").Value)
Me.Cursor = Cursors.WaitCursor
Dim TopMax = If(IsNumeric(MyTextBox2.Text), " TOP " & MyTextBox2.Text, "")
Dim sqlstr As String = ""
' MsgBox(VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL)
sqlstr &= "SELECT TOP (1000) [wartPruef_Id] ,[wartPruef_Faelligkeitsdatum],[wartPruef_Erledigung],[wartPruef_Erledigung_Datum],[wartPruef_Erledigung_BestaetigtMaId],[wartPruef_Erledigung_BestaetigtMaName]
,[wartPruef_Erledigung_Bemerkung],[wartPruef_Anhaenge_daId],[wartPruef_Bemerkung],[wartPruef_MailErinnerung_Gesendet] ,[wartPruef_MailErinnerung_GesendetAn],[wartPruef_MailErinnerung_GesendetAm]
FROM [tblAuditFlow_Pruefungen] WHERE [wartPruef_wartPOId]='" & wartPO_Id & "' WHERE 1=1 "
' .DataSource = myTable
' MsgBox(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartPO_StandortId")
.SET_SQL(sqlstr & getWherePruefungen() & " order by wartPO_Firma ,wartPO_Niederlasung, wartSt_Standort ", "ADMIN", getListPruefungsobjekte)
.LOAD()
setDGVOptionsPruefungen()
End With
showDGVPruefungen()
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, "")
End Try
Me.Cursor = Cursors.Default
End Sub
Sub showDGVPruefungen()
With dgvPruefungen
If .ColumnCount = 0 Then Me.Cursor = Cursors.Default : Exit Sub
.RowHeadersVisible = False
.ReadOnly = True
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
.MultiSelect = False
.Columns("wartPruef_Id").Visible = False
.Columns("wartPruef_Faelligkeitsdatum").MinimumWidth = 100
.Columns("wartPruef_Faelligkeitsdatum").HeaderText = "Fälligkeitsdatum"
.Columns("wartPruef_Faelligkeitsdatum").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("wartPO_Kennung").Width = 60
.Columns("wartPO_Kennung").HeaderText = "(Kennung)"
.Columns("wartPO_Kategorie").Width = 100
.Columns("wartPO_Kategorie").HeaderText = "Kategorie"
.Columns("wartPO_Firma").Width = 80
.Columns("wartPO_Firma").HeaderText = "Firma"
.Columns("wartPO_Niederlasung").Width = 50
.Columns("wartPO_Niederlasung").HeaderText = "NL"
.Columns("wartPO_Standort").Width = 100
.Columns("wartPO_Standort").HeaderText = "Standort"
.Columns("wartPO_IntervallTyp").Width = 100
.Columns("wartPO_IntervallTyp").HeaderText = "Intervall"
.Columns("wartPO_IntervallWert").Width = 60
.Columns("wartPO_IntervallWert").HeaderText = "Int.-Wert"
.Columns("wartPO_Erinnerung_VorlaufInTagen").Width = 60
.Columns("wartPO_Erinnerung_VorlaufInTagen").HeaderText = "Vorl.Tage"
.Columns("wartPO_zustaendigIntern_Name").Width = 120
.Columns("wartPO_zustaendigIntern_Name").HeaderText = "Mitarbeiter"
.Columns("wartPO_Aktiv").Width = 50
.Columns("wartPO_Aktiv").HeaderText = "Aktiv"
' lblErgebnis.Text = "Ergebnise: " & .RowCount
End With
End Sub
Sub setDGVOptionsPruefungen()
Try
Exit Sub
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
srcTAG = srcTAG.AddDays(-1)
@@ -309,6 +423,20 @@ Public Class frmAuditFlow
btnSuche.PerformClick()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim f As New frmAuditFlow_Pruefungsojekt()
f.ShowDialog(Me)
dgvPruefungsobjekte.RELOAD()
setDGVOptionsPruefungsobjekte()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If txtWartungFaelligkeitAbDat._value <> "" Then
cAuditFlow.ErzeugeFaelligePruefungen(txtWartungFaelligkeitAbDat._value)
End If
dgvPruefungsobjekte.RELOAD()
setDGVOptionsPruefungsobjekte()
loadDGVPuefungen()
End Sub
End Class

View File

@@ -37,7 +37,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.Label3 = New System.Windows.Forms.Label()
Me.txtBezeichnung = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtKennung = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboMA = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.datVon = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.datBis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -52,12 +52,12 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.txtIntervallWert = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.cboIntervall = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.txtZustaendigIntern_Mail = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtMailErinnerung_SendenAnIntZust = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.pnlTop.SuspendLayout()
Me.Panel1.SuspendLayout()
@@ -251,19 +251,19 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.txtKennung.Size = New System.Drawing.Size(436, 28)
Me.txtKennung.TabIndex = 44
'
'MyComboBox1
'cboMA
'
Me.MyComboBox1._allowedValuesFreiText = Nothing
Me.MyComboBox1._allowFreiText = False
Me.MyComboBox1._value = ""
Me.MyComboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.MyComboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.MyComboBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.MyComboBox1.FormattingEnabled = True
Me.MyComboBox1.Location = New System.Drawing.Point(110, 282)
Me.MyComboBox1.Name = "MyComboBox1"
Me.MyComboBox1.Size = New System.Drawing.Size(436, 28)
Me.MyComboBox1.TabIndex = 46
Me.cboMA._allowedValuesFreiText = Nothing
Me.cboMA._allowFreiText = False
Me.cboMA._value = ""
Me.cboMA.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboMA.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cboMA.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.cboMA.FormattingEnabled = True
Me.cboMA.Location = New System.Drawing.Point(110, 282)
Me.cboMA.Name = "cboMA"
Me.cboMA.Size = New System.Drawing.Size(436, 28)
Me.cboMA.TabIndex = 46
'
'Label8
'
@@ -425,7 +425,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.txtIntervallWert._ShortDateOnly = False
Me.txtIntervallWert._TimeOnly = False
Me.txtIntervallWert._TimeOnly_Seconds = False
Me.txtIntervallWert._value = ""
Me.txtIntervallWert._value = "1"
Me.txtIntervallWert._Waehrung = False
Me.txtIntervallWert._WaehrungZeichen = True
Me.txtIntervallWert.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
@@ -439,6 +439,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.txtIntervallWert.Name = "txtIntervallWert"
Me.txtIntervallWert.Size = New System.Drawing.Size(110, 28)
Me.txtIntervallWert.TabIndex = 59
Me.txtIntervallWert.Text = "1"
'
'cboIntervall
'
@@ -457,9 +458,9 @@ Partial Class frmAuditFlow_Pruefungsojekt
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
Me.Panel1.Controls.Add(Me.CheckBox2)
Me.Panel1.Controls.Add(Me.Label15)
Me.Panel1.Controls.Add(Me.txtMailErinnerung_SendenAnIntZust)
Me.Panel1.Controls.Add(Me.Label16)
Me.Panel1.Controls.Add(Me.txtZustaendigIntern_Mail)
Me.Panel1.Controls.Add(Me.txtErinnerungVorlaubInTagen)
Me.Panel1.Controls.Add(Me.Label9)
Me.Panel1.Controls.Add(Me.datBis)
@@ -471,6 +472,19 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.Panel1.Size = New System.Drawing.Size(566, 110)
Me.Panel1.TabIndex = 61
'
'CheckBox2
'
Me.CheckBox2.AutoSize = True
Me.CheckBox2.Checked = True
Me.CheckBox2.CheckState = System.Windows.Forms.CheckState.Checked
Me.CheckBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.CheckBox2.Location = New System.Drawing.Point(260, 73)
Me.CheckBox2.Name = "CheckBox2"
Me.CheckBox2.Size = New System.Drawing.Size(112, 17)
Me.CheckBox2.TabIndex = 68
Me.CheckBox2.Text = "E-Mail Erinnerung:"
Me.CheckBox2.UseVisualStyleBackColor = True
'
'Label15
'
Me.Label15.AutoSize = True
@@ -481,6 +495,31 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.Label15.TabIndex = 61
Me.Label15.Text = "Fälligkeit:"
'
'txtZustaendigIntern_Mail
'
Me.txtZustaendigIntern_Mail._DateTimeOnly = False
Me.txtZustaendigIntern_Mail._numbersOnly = False
Me.txtZustaendigIntern_Mail._numbersOnlyKommastellen = ""
Me.txtZustaendigIntern_Mail._numbersOnlyTrennzeichen = True
Me.txtZustaendigIntern_Mail._Prozent = False
Me.txtZustaendigIntern_Mail._ShortDateNew = False
Me.txtZustaendigIntern_Mail._ShortDateOnly = False
Me.txtZustaendigIntern_Mail._TimeOnly = False
Me.txtZustaendigIntern_Mail._TimeOnly_Seconds = False
Me.txtZustaendigIntern_Mail._value = ""
Me.txtZustaendigIntern_Mail._Waehrung = False
Me.txtZustaendigIntern_Mail._WaehrungZeichen = True
Me.txtZustaendigIntern_Mail.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtZustaendigIntern_Mail.ForeColor = System.Drawing.Color.Black
Me.txtZustaendigIntern_Mail.Location = New System.Drawing.Point(378, 66)
Me.txtZustaendigIntern_Mail.MaxLineLength = -1
Me.txtZustaendigIntern_Mail.MaxLines_Warning = ""
Me.txtZustaendigIntern_Mail.MaxLines_Warning_Label = Nothing
Me.txtZustaendigIntern_Mail.Multiline = True
Me.txtZustaendigIntern_Mail.Name = "txtZustaendigIntern_Mail"
Me.txtZustaendigIntern_Mail.Size = New System.Drawing.Size(168, 28)
Me.txtZustaendigIntern_Mail.TabIndex = 65
'
'Panel2
'
Me.Panel2.BackColor = System.Drawing.Color.PapayaWhip
@@ -525,44 +564,11 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.Button1.Text = "Alle offenen Fälligkeiten löschen"
Me.Button1.UseVisualStyleBackColor = True
'
'txtMailErinnerung_SendenAnIntZust
'
Me.txtMailErinnerung_SendenAnIntZust._DateTimeOnly = False
Me.txtMailErinnerung_SendenAnIntZust._numbersOnly = False
Me.txtMailErinnerung_SendenAnIntZust._numbersOnlyKommastellen = ""
Me.txtMailErinnerung_SendenAnIntZust._numbersOnlyTrennzeichen = True
Me.txtMailErinnerung_SendenAnIntZust._Prozent = False
Me.txtMailErinnerung_SendenAnIntZust._ShortDateNew = False
Me.txtMailErinnerung_SendenAnIntZust._ShortDateOnly = False
Me.txtMailErinnerung_SendenAnIntZust._TimeOnly = False
Me.txtMailErinnerung_SendenAnIntZust._TimeOnly_Seconds = False
Me.txtMailErinnerung_SendenAnIntZust._value = ""
Me.txtMailErinnerung_SendenAnIntZust._Waehrung = False
Me.txtMailErinnerung_SendenAnIntZust._WaehrungZeichen = True
Me.txtMailErinnerung_SendenAnIntZust.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtMailErinnerung_SendenAnIntZust.ForeColor = System.Drawing.Color.Black
Me.txtMailErinnerung_SendenAnIntZust.Location = New System.Drawing.Point(356, 66)
Me.txtMailErinnerung_SendenAnIntZust.MaxLineLength = -1
Me.txtMailErinnerung_SendenAnIntZust.MaxLines_Warning = ""
Me.txtMailErinnerung_SendenAnIntZust.MaxLines_Warning_Label = Nothing
Me.txtMailErinnerung_SendenAnIntZust.Multiline = True
Me.txtMailErinnerung_SendenAnIntZust.Name = "txtMailErinnerung_SendenAnIntZust"
Me.txtMailErinnerung_SendenAnIntZust.Size = New System.Drawing.Size(190, 28)
Me.txtMailErinnerung_SendenAnIntZust.TabIndex = 65
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.Label16.Location = New System.Drawing.Point(257, 74)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(93, 13)
Me.Label16.TabIndex = 66
Me.Label16.Text = "E-Mail Erinnerung:"
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Checked = True
Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Checked
Me.CheckBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckBox1.Location = New System.Drawing.Point(484, 72)
Me.CheckBox1.Name = "CheckBox1"
@@ -580,7 +586,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Me.Controls.Add(Me.CheckBox1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.MyComboBox1)
Me.Controls.Add(Me.cboMA)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.txtKennung)
Me.Controls.Add(Me.txtBezeichnung)
@@ -626,7 +632,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Friend WithEvents Label3 As Windows.Forms.Label
Friend WithEvents txtBezeichnung As MyTextBox
Friend WithEvents txtKennung As MyTextBox
Friend WithEvents MyComboBox1 As MyComboBox
Friend WithEvents cboMA As MyComboBox
Friend WithEvents Label8 As Windows.Forms.Label
Friend WithEvents datVon As MyTextBox
Friend WithEvents datBis As MyTextBox
@@ -645,7 +651,7 @@ Partial Class frmAuditFlow_Pruefungsojekt
Friend WithEvents Label15 As Windows.Forms.Label
Friend WithEvents Button2 As Windows.Forms.Button
Friend WithEvents Button1 As Windows.Forms.Button
Friend WithEvents txtMailErinnerung_SendenAnIntZust As MyTextBox
Friend WithEvents Label16 As Windows.Forms.Label
Friend WithEvents txtZustaendigIntern_Mail As MyTextBox
Friend WithEvents CheckBox1 As Windows.Forms.CheckBox
Friend WithEvents CheckBox2 As Windows.Forms.CheckBox
End Class

View File

@@ -1,16 +1,61 @@
Imports com.sun.org.apache.xml.internal.security.keys.content
Imports System.Windows.Forms
Imports com.sun.org.apache.xml.internal.security.keys.content
Public Class frmAuditFlow_Pruefungsojekt
Dim AF_PO As cAuditFlow_Pruefobjekte
Dim AF_PO As cAuditFlow_Pruefobjekte = Nothing
Sub New()
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub
Sub New(wartPO_Id)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
AF_PO = New cAuditFlow_Pruefobjekte(wartPO_Id)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If vbYes = MsgBox("Wollen Sie wirklich alle offenen Fälligkeiten löschen?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Löschen?") Then
Try
Me.Cursor = Cursors.WaitCursor
If AF_PO IsNot Nothing Then
Dim cnt = cAuditFlow.DELETE_ALL_OPEN_FAELLIGE(AF_PO.wartPO_Id)
If cnt > 0 Then
MsgBox(cnt & " offene Fälligkeiten gelöscht!")
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
getValues()
Try
Me.Cursor = Cursors.WaitCursor
If checkValues() Then
getValues()
If AF_PO.SAVE Then
Me.Close()
End If
End If
Catch ex As Exception
End Try
Me.Cursor = Cursors.Default
End Sub
Function checkValues() As Boolean
@@ -19,41 +64,133 @@ Public Class frmAuditFlow_Pruefungsojekt
If cboStandort._value = "" Then MsgBox("Standort angeben!") : Return False
If cboKategorie._value = "" Then MsgBox("Kategorie angeben!") : Return False
If cboIntervall._value = "" Then MsgBox("Intervall angeben!") : Return False
If cboMA._value = "" Then MsgBox("Mitarbeiter angeben!") : Return False
If txtIntervallWert.Text = "" Then MsgBox("Intervall-Wert angeben!") : Return False
If datVon._value = "" Then MsgBox("Startdatum angeben!") : Return False
If txtBezeichnung.Text = "" Then MsgBox("Bezeichnung angeben!") : Return False
If txtMailErinnerung_SendenAnIntZust.Text = "" Then MsgBox("Email angeben!") : Return False
If txtZustaendigIntern_Mail.Text = "" Then MsgBox("Email angeben!") : Return False
Return True
End Function
Sub getValues()
AF_PO.wartPO_Firma = cboFirma._value
AF_PO.wartPO_Niederlasung = cboNL._value
AF_PO.wartPO_Standort = cboStandort._value
AF_PO.wartPO_StandortId = cboStandort._value
AF_PO.wartPO_Kategorie = cboKategorie._value
AF_PO.wartPO_Bezeichnung = txtBezeichnung.Text
AF_PO.wartPO_Kennung = txtKennung.Text
AF_PO.wartPO_Kennung = cboKategorie._value
AF_PO.wartPO_MailErinnerung_SendenAnIntZust = txtMailErinnerung_SendenAnIntZust.Text
AF_PO.wartPO_zustaendigIntern_Mail = txtZustaendigIntern_Mail.Text
AF_PO.wartPO_IntervallWert = txtIntervallWert.Text
AF_PO.wartPO_IntervallTyp = cboIntervall._value
AF_PO.wartPO_zustaendigIntern_MaId = cboMA._value
AF_PO.wartPO_zustaendigIntern_Name = cboMA.Text
AF_PO.wartPO_startdatum = datVon._value
AF_PO.wartPO_enddatum = datBis._value
AF_PO.wartPO_Erinnerung_VorlaufInTagen = txtErinnerungVorlaubInTagen.Text
AF_PO.wartPO_Aktiv = CheckBox1.Checked
If cboMA._value <> "" Then
Dim MA As New cMitarbeiter(cboMA._value)
AF_PO.wartPO_zustaendigIntern_Tel = MA.mit_telefonnr
'AF_PO= MA.mit_telefonnr
End If
End Sub
Sub setValues()
cboFirma.changeItem(AF_PO.wartPO_Firma)
cboNL.changeItem(AF_PO.wartPO_Niederlasung)
cboStandort.changeItem(AF_PO.wartPO_StandortId)
cboKategorie.changeItem(AF_PO.wartPO_Kategorie)
txtBezeichnung.Text = AF_PO.wartPO_Bezeichnung
txtKennung.Text = AF_PO.wartPO_Kennung
datVon._value = AF_PO.wartPO_startdatum
datBis._value = If(AF_PO.wartPO_enddatum, "")
txtIntervallWert.Text = AF_PO.wartPO_IntervallWert
cboIntervall.changeItem(AF_PO.wartPO_IntervallTyp)
cboMA.changeItem(AF_PO.wartPO_zustaendigIntern_MaId)
'cboMA.Text = AF_PO.wartPO_zustaendigIntern_Name
txtErinnerungVorlaubInTagen.Text = AF_PO.wartPO_Erinnerung_VorlaufInTagen
CheckBox1.Checked = AF_PO.wartPO_Aktiv
txtZustaendigIntern_Mail.Text = AF_PO.wartPO_zustaendigIntern_Mail 'zuletzt, sonst bei MA Wechsel überschrieben
End Sub
Private Sub frmAuditFlow_Pruefungsojekt_Load(sender As Object, e As EventArgs) Handles Me.Load
cboKategorie.Items.Clear()
cboKategorie.fillWithSQL("SELECT wartK_Kategorie,[wartK_KategorieBezeichnung] FROM [tblAuditFlow_Kategorien] order by wartK_KategorieBezeichnung", False, "ADMIN", True)
cboNL.Items.Clear()
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboNL.SelectedItem = 0
cboFirma.Items.Clear()
cboFirma.fillWithSQL("SELECT distinct(Firma) FROM [Filialen] order by Firma", False, "FMZOLL", True)
cboFirma.changeItem(cAllgemein.FIRMA)
cboIntervall.Items.Clear()
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("*EINMALIG", "EINMALIG"))
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("TAGE", "TAGE"))
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("WOCHEN", "WOCHEN"))
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MONATE", "MONATE"))
cboIntervall.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("JAHRE", "JAHRE"))
cboIntervall.fillWithSQL("SELECT [wartK_IntervallTyp] ,[wartK_IntervallBez] FROM [tblAuditFlow_Intervalle] Order by [wartK_IntervallBez]", False, "ADMIN", True)
cboIntervall.SelectedItem = 0
cboMA.fillWithSQL("SELECT [mit_id],[mit_vname] + ' '+ [mit_nname] as Name " &
" FROM [ADMIN].[dbo].[tblMitarbeiter] WHERE [mit_gekuendigt]=0 order by name", False, "ADMIN", True)
If AF_PO Is Nothing Then
AF_PO = New cAuditFlow_Pruefobjekte()
Else
setValues()
End If
End Sub
Private Sub cboFirma_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFirma.SelectedIndexChanged
cboNL.Items.Clear()
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
If cboFirma._value <> "" Then
cboNL.fillWithSQL("SELECT nl_kuerzel,nl_bezeichnung FROM [tblNiederlassungen] where [nl_firma]='" & cboFirma._value & "' order by nl_bezeichnung", False, "ADMIN", False)
End If
End Sub
Private Sub cboNL_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboNL.SelectedIndexChanged
cboStandort.Items.Clear()
cboStandort.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
If cboFirma._value <> "" AndAlso cboNL._value <> "" Then
cboStandort.fillWithSQL("SELECT [wartSt_Id],[wartSt_Standort] FROM [tblAuditFlow_Standorte] where [wartSt_Aktiv]=1 and [wartSt_Firma]='" & cboFirma._value & "' AND [wartSt_Niederlasung]='" & cboNL._value & "' order by wartSt_Standort", False, "ADMIN", True)
End If
End Sub
Private Sub cboMA_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboMA.SelectedIndexChanged
If cboMA._value <> "" Then
Dim MA As New cMitarbeiter(cboMA._value)
txtZustaendigIntern_Mail.Text = MA.mit_email
'AF_PO= MA.mit_telefonnr
End If
End Sub
Private Sub frmAuditFlow_Pruefungsojekt_Shown(sender As Object, e As EventArgs) Handles Me.Shown
End Sub
Private Sub cboIntervall_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboIntervall.SelectedIndexChanged
If cboIntervall._value = "EINMALIG" Then
datBis.Enabled = False
Else
datBis.Enabled = True
End If
End Sub
End Class