From b7d11e4a534e73e10dad04acbeaf856d1b6b5976 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Wed, 15 Mar 2023 17:08:02 +0100 Subject: [PATCH 1/2] =?UTF-8?q?ContextMenu=20f=C3=BCr=20L=C3=B6schen=20von?= =?UTF-8?q?=20KundenKontakte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SDL/kunden/usrCntlKundenKontakte.Designer.vb | 69 +++++++++++++------- SDL/kunden/usrCntlKundenKontakte.resx | 3 + SDL/kunden/usrCntlKundenKontakte.vb | 18 +++++ 3 files changed, 65 insertions(+), 25 deletions(-) diff --git a/SDL/kunden/usrCntlKundenKontakte.Designer.vb b/SDL/kunden/usrCntlKundenKontakte.Designer.vb index 753fb384..85844197 100644 --- a/SDL/kunden/usrCntlKundenKontakte.Designer.vb +++ b/SDL/kunden/usrCntlKundenKontakte.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class usrCntlKundenKontakte Inherits System.Windows.Forms.UserControl 'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,12 +20,12 @@ Partial Class usrCntlKundenKontakte 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - _ + Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.dgvAufschub = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.KdKontaktId = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.Art = New System.Windows.Forms.DataGridViewTextBoxColumn() @@ -34,7 +34,10 @@ Partial Class usrCntlKundenKontakte Me.NL = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.KontoNr = New System.Windows.Forms.DataGridViewTextBoxColumn() Me.btn = New System.Windows.Forms.Button() + Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() CType(Me.dgvAufschub, System.ComponentModel.ISupportInitialize).BeginInit() + Me.ContextMenuStrip1.SuspendLayout() Me.SuspendLayout() ' 'dgvAufschub @@ -45,24 +48,24 @@ Partial Class usrCntlKundenKontakte Me.dgvAufschub.AllowUserToResizeColumns = False Me.dgvAufschub.AllowUserToResizeRows = False Me.dgvAufschub.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 Me.dgvAufschub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvAufschub.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.KdKontaktId, Me.Art, Me.HZA, Me.EORI, Me.NL, Me.KontoNr}) - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle6 Me.dgvAufschub.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvAufschub.Location = New System.Drawing.Point(0, 0) Me.dgvAufschub.MultiSelect = False @@ -90,8 +93,8 @@ Partial Class usrCntlKundenKontakte ' 'HZA ' - DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight - Me.HZA.DefaultCellStyle = DataGridViewCellStyle2 + DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight + Me.HZA.DefaultCellStyle = DataGridViewCellStyle5 Me.HZA.HeaderText = "Tel" Me.HZA.Name = "HZA" Me.HZA.ReadOnly = True @@ -124,7 +127,7 @@ Partial Class usrCntlKundenKontakte 'btn ' Me.btn.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btn.BackgroundImage = Global.SDL.My.Resources.plus + Me.btn.BackgroundImage = Global.SDL.My.Resources.Resources.plus Me.btn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btn.Location = New System.Drawing.Point(453, 0) @@ -133,6 +136,19 @@ Partial Class usrCntlKundenKontakte Me.btn.TabIndex = 213 Me.btn.UseVisualStyleBackColor = True ' + 'ContextMenuStrip1 + ' + Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LöschenToolStripMenuItem}) + Me.ContextMenuStrip1.Name = "ContextMenuStrip1" + Me.ContextMenuStrip1.Size = New System.Drawing.Size(181, 48) + ' + 'LöschenToolStripMenuItem + ' + Me.LöschenToolStripMenuItem.Image = Global.SDL.My.Resources.Resources.del_small + Me.LöschenToolStripMenuItem.Name = "LöschenToolStripMenuItem" + Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.LöschenToolStripMenuItem.Text = "löschen" + ' 'usrCntlKundenKontakte ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -142,6 +158,7 @@ Partial Class usrCntlKundenKontakte Me.Name = "usrCntlKundenKontakte" Me.Size = New System.Drawing.Size(473, 113) CType(Me.dgvAufschub, System.ComponentModel.ISupportInitialize).EndInit() + Me.ContextMenuStrip1.ResumeLayout(False) Me.ResumeLayout(False) End Sub @@ -154,4 +171,6 @@ Partial Class usrCntlKundenKontakte Friend WithEvents EORI As DataGridViewTextBoxColumn Friend WithEvents NL As DataGridViewTextBoxColumn Friend WithEvents KontoNr As DataGridViewTextBoxColumn + Friend WithEvents ContextMenuStrip1 As ContextMenuStrip + Friend WithEvents LöschenToolStripMenuItem As ToolStripMenuItem End Class diff --git a/SDL/kunden/usrCntlKundenKontakte.resx b/SDL/kunden/usrCntlKundenKontakte.resx index 49e86abe..2a4bb096 100644 --- a/SDL/kunden/usrCntlKundenKontakte.resx +++ b/SDL/kunden/usrCntlKundenKontakte.resx @@ -135,4 +135,7 @@ True + + 17, 17 + \ No newline at end of file diff --git a/SDL/kunden/usrCntlKundenKontakte.vb b/SDL/kunden/usrCntlKundenKontakte.vb index 1dc4e86d..bbdfe56d 100644 --- a/SDL/kunden/usrCntlKundenKontakte.vb +++ b/SDL/kunden/usrCntlKundenKontakte.vb @@ -1,4 +1,6 @@  +Imports DocumentFormat.OpenXml.Spreadsheet + Public Class usrCntlKundenKontakte 'Dim KD_KONTAKT As VERAG_PROG_ALLGEMEIN.cKundenKontakt = Nothing @@ -82,4 +84,20 @@ Public Class usrCntlKundenKontakte End If End If End Sub + + Private Sub dgvAufschub_CellClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvAufschub.CellMouseClick + If e.RowIndex < 0 Then Exit Sub + DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True + If e.Button = Windows.Forms.MouseButtons.Right Then + If dgvAufschub.SelectedRows.Count > 0 Then + ContextMenuStrip1.Show(Cursor.Position) + End If + End If + End Sub + + Private Sub LöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LöschenToolStripMenuItem.Click + + Dim delKey As New KeyEventArgs(Keys.Delete) + dgvAufschub_KeyDown(sender, delKey) + End Sub End Class From e07dbd591fe352b7dbf8fc5db38aed9b46e528e0 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 16 Mar 2023 21:11:50 +0100 Subject: [PATCH 2/2] Testsystem Umgebungsvariable deaktiviert. --- VERAG_PROG_ALLGEMEIN/cAllgemein.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb index c6bc9d45..53d7bf97 100644 --- a/VERAG_PROG_ALLGEMEIN/cAllgemein.vb +++ b/VERAG_PROG_ALLGEMEIN/cAllgemein.vb @@ -31,7 +31,7 @@ Public Class cAllgemein Public Shared dpi As Integer - Public Shared TESTSYSTEM As Boolean = True + Public Shared TESTSYSTEM As Boolean = False Public Shared PROGNAME = "" Public Shared PROGID As Integer = 16 'AVISO