Projektdateien hinzufügen.
This commit is contained in:
81
UID/frmHistory.vb
Normal file
81
UID/frmHistory.vb
Normal file
@@ -0,0 +1,81 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmHistory
|
||||
|
||||
Private UID As New cOptionenDAL
|
||||
Public rowId As String
|
||||
|
||||
|
||||
Private Sub Main_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Label1.Text = "Historie für: " & frmMain.dgvKunden.CurrentRow.Cells(2).Value
|
||||
Tabelle_anzeigen(rowId)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Tabelle_anzeigen(ByVal rowId As Integer)
|
||||
|
||||
Dim hSQL As String = "SELECT * FROM tblHistorie WHERE Old_Id='" & rowId & "' ORDER BY Id"
|
||||
' MsgBox(hSQL)
|
||||
dgvUID.DataSource = UID.AnzeigeTabelle(hSQL)
|
||||
|
||||
'Tabelle Kommt/Geht bereinigen
|
||||
If dgvUID.RowCount = 0 Then
|
||||
dgvUID.DataSource = Nothing
|
||||
Else
|
||||
Spalten_festlegen()
|
||||
' Eintraege_festlegen()
|
||||
'AL: Sortierung nach Ausfahrt (Zeit)
|
||||
dgvUID.Sort(dgvUID.Columns(3), ListSortDirection.Descending)
|
||||
End If
|
||||
|
||||
'Anzeige der Anzahl gewählter/aller Datensätze
|
||||
'lblAnzahl.Text = Format(dgvUID.RowCount, "#,##0") & " ausgewählt"
|
||||
'lblAnzahl.Refresh()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Spalten_festlegen()
|
||||
With dgvUID
|
||||
.RowTemplate.Height = 50
|
||||
.RowTemplate.DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopLeft
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = True
|
||||
.AllowUserToResizeRows = True
|
||||
.RowTemplate.ReadOnly = True
|
||||
.RowHeadersVisible = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
|
||||
.Columns(0).Visible = False 'ID nicht anzeigen
|
||||
.Columns(1).Visible = False 'ID nicht anzeigen
|
||||
|
||||
.Columns(2).Width = 50
|
||||
.Columns(2).HeaderText = "deakt."
|
||||
.Columns(2).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
|
||||
|
||||
.Columns(3).Width = 100
|
||||
.Columns(3).HeaderText = "Firmenkürzel"
|
||||
|
||||
.Columns(4).Width = 200
|
||||
.Columns(4).HeaderText = "Firma"
|
||||
|
||||
.Columns(5).Width = 100
|
||||
.Columns(5).HeaderText = "UID"
|
||||
|
||||
.Columns(6).Width = 100
|
||||
.Columns(6).HeaderText = "EORI"
|
||||
|
||||
.Columns(7).Width = 500
|
||||
.Columns(7).HeaderText = "Info"
|
||||
|
||||
.Columns(8).Visible = False 'ID nicht anzeigen
|
||||
.Columns(8).Visible = False 'ID nicht anzeigen
|
||||
.Columns(9).Visible = False 'ID nicht anzeigen
|
||||
.Columns(10).Visible = False 'ID nicht anzeigen
|
||||
|
||||
End With
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user