zusätzlich Position Zollbeschau, Suchfunktion in frmVorlagen. Frohe Weihnachten!
This commit is contained in:
@@ -26,8 +26,11 @@ Partial Class frmVorlagen
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmVorlagen))
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.btnUpload = New System.Windows.Forms.Button()
|
||||
Me.dgvVolagen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.txtSuche = New System.Windows.Forms.TextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.lblCount = New System.Windows.Forms.Label()
|
||||
Me.dgvVolagen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
CType(Me.dgvVolagen, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -51,19 +54,6 @@ Partial Class frmVorlagen
|
||||
Me.btnUpload.Text = "Neue Vorlage"
|
||||
Me.btnUpload.UseVisualStyleBackColor = True
|
||||
'
|
||||
'dgvVolagen
|
||||
'
|
||||
Me.dgvVolagen.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvVolagen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvVolagen.Location = New System.Drawing.Point(11, 31)
|
||||
Me.dgvVolagen.MultiSelect = False
|
||||
Me.dgvVolagen.Name = "dgvVolagen"
|
||||
Me.dgvVolagen.ReadOnly = True
|
||||
Me.dgvVolagen.RowHeadersVisible = False
|
||||
Me.dgvVolagen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvVolagen.Size = New System.Drawing.Size(1094, 572)
|
||||
Me.dgvVolagen.TabIndex = 9
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
@@ -74,12 +64,56 @@ Partial Class frmVorlagen
|
||||
Me.Button1.Text = "Vorlage Ändern"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtSuche
|
||||
'
|
||||
Me.txtSuche.Location = New System.Drawing.Point(996, 8)
|
||||
Me.txtSuche.Name = "txtSuche"
|
||||
Me.txtSuche.Size = New System.Drawing.Size(109, 20)
|
||||
Me.txtSuche.TabIndex = 11
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.BackColor = System.Drawing.Color.White
|
||||
Me.Label2.Location = New System.Drawing.Point(924, 11)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(64, 13)
|
||||
Me.Label2.TabIndex = 12
|
||||
Me.Label2.Text = "Suchbegriff:"
|
||||
'
|
||||
'lblCount
|
||||
'
|
||||
Me.lblCount.AutoSize = True
|
||||
Me.lblCount.BackColor = System.Drawing.Color.White
|
||||
Me.lblCount.Location = New System.Drawing.Point(1077, 609)
|
||||
Me.lblCount.Name = "lblCount"
|
||||
Me.lblCount.Size = New System.Drawing.Size(28, 13)
|
||||
Me.lblCount.TabIndex = 13
|
||||
Me.lblCount.Text = "Text"
|
||||
Me.lblCount.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'dgvVolagen
|
||||
'
|
||||
Me.dgvVolagen.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvVolagen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvVolagen.Location = New System.Drawing.Point(11, 34)
|
||||
Me.dgvVolagen.MultiSelect = False
|
||||
Me.dgvVolagen.Name = "dgvVolagen"
|
||||
Me.dgvVolagen.ReadOnly = True
|
||||
Me.dgvVolagen.RowHeadersVisible = False
|
||||
Me.dgvVolagen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvVolagen.Size = New System.Drawing.Size(1094, 569)
|
||||
Me.dgvVolagen.TabIndex = 9
|
||||
'
|
||||
'frmVorlagen
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.ClientSize = New System.Drawing.Size(1117, 665)
|
||||
Me.Controls.Add(Me.lblCount)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.txtSuche)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.dgvVolagen)
|
||||
Me.Controls.Add(Me.btnUpload)
|
||||
@@ -97,4 +131,7 @@ Partial Class frmVorlagen
|
||||
Friend WithEvents btnUpload As System.Windows.Forms.Button
|
||||
Friend WithEvents dgvVolagen As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents txtSuche As Windows.Forms.TextBox
|
||||
Friend WithEvents Label2 As Windows.Forms.Label
|
||||
Friend WithEvents lblCount As Windows.Forms.Label
|
||||
End Class
|
||||
|
||||
@@ -2,29 +2,29 @@
|
||||
|
||||
Public Class frmVorlagen
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub btnUpload_Click(sender As Object, e As EventArgs) Handles btnUpload.Click
|
||||
Dim vu As New VERAG_PROG_ALLGEMEIN.frmVorlagenUpload
|
||||
vu.ShowDialog()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmVorlagenUpload_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
initDGV()
|
||||
End Sub
|
||||
Sub initDGV()
|
||||
Sub initDGV(Optional searchstring As String = "")
|
||||
Dim SQLString = ""
|
||||
If searchstring <> "" Then
|
||||
SQLString = " AND ([da_kategorie] like '%" & searchstring & "%' OR [da_vorlage] like '%" & searchstring & "%' OR [da_ordner] like '%" & searchstring & "%' OR [da_uOrdner1] like '%" & searchstring & "%' OR [da_uOrdner2]like '%" & searchstring & "%' OR [da_uOrdner3]like '%" & searchstring & "%' OR [da_name] like '%" & searchstring & "%')"
|
||||
End If
|
||||
With dgvVolagen
|
||||
.Columns.Clear()
|
||||
.SET_SQL("SELECT [da_id],[da_kategorie],[da_ordner] ,[da_name],da_uOrdner1,da_uOrdner2,da_uOrdner3 FROM [tblDatenarchiv] where da_vorlage=1", "FMZOLL")
|
||||
.SET_SQL("SELECT [da_id],[da_kategorie],[da_ordner] ,[da_name],da_uOrdner1,da_uOrdner2,da_uOrdner3 FROM [tblDatenarchiv] where da_vorlage=1" & SQLString, "FMZOLL")
|
||||
.LOAD()
|
||||
If .ColumnCount > 0 Then
|
||||
'.Columns("da_uOrdner1").Visible = False
|
||||
.Columns("da_name").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||
End If
|
||||
lblCount.Text = "Anzahl Datensätze" & dgvVolagen.Rows.Count
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -53,4 +53,17 @@ Public Class frmVorlagen
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub txtSuche_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSuche.KeyDown
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
If txtSuche.Text <> "" Then
|
||||
Me.initDGV(txtSuche.Text)
|
||||
e.Handled = True
|
||||
Else
|
||||
Me.initDGV()
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user