diff --git a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb index fa9431c5..ca36fa2f 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.Designer.vb @@ -23,9 +23,9 @@ Partial Class frmUSTVoffeneAntraege _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel() Me.btn = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button() @@ -48,21 +48,21 @@ Partial Class frmUSTVoffeneAntraege Me.Label4 = New System.Windows.Forms.Label() Me.pnlLand = New System.Windows.Forms.Panel() Me.Label6 = New System.Windows.Forms.Label() + Me.cbxLieferant = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label5 = New System.Windows.Forms.Label() + Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxNichtEroeffneteAntraege = New System.Windows.Forms.CheckBox() Me.cbxUStV = New System.Windows.Forms.CheckBox() + Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.AntragEröffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Button4 = New System.Windows.Forms.Button() Me.cbxKundenMWST = New System.Windows.Forms.CheckBox() - Me.cbxLieferant = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.cbxKundeLand = New VERAG_PROG_ALLGEMEIN.MyComboBox() - Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.txtmaxAnz = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtMWST = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtAnzahl = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.Button5 = New System.Windows.Forms.Button() + Me.btnPLOSE_DK = New System.Windows.Forms.Button() Me.FlowLayoutPanel.SuspendLayout() Me.Panel4.SuspendLayout() Me.pnlLand.SuspendLayout() @@ -309,6 +309,17 @@ Partial Class frmUSTVoffeneAntraege Me.Label6.TabIndex = 51 Me.Label6.Text = "Lieferant:" ' + 'cbxLieferant + ' + Me.cbxLieferant._allowedValuesFreiText = Nothing + Me.cbxLieferant._allowFreiText = False + Me.cbxLieferant._value = "" + Me.cbxLieferant.FormattingEnabled = True + Me.cbxLieferant.Location = New System.Drawing.Point(92, 6) + Me.cbxLieferant.Name = "cbxLieferant" + Me.cbxLieferant.Size = New System.Drawing.Size(72, 21) + Me.cbxLieferant.TabIndex = 50 + ' 'Label5 ' Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -319,6 +330,17 @@ Partial Class frmUSTVoffeneAntraege Me.Label5.TabIndex = 49 Me.Label5.Text = "Land-Kunde:" ' + 'cbxKundeLand + ' + Me.cbxKundeLand._allowedValuesFreiText = Nothing + Me.cbxKundeLand._allowFreiText = False + Me.cbxKundeLand._value = "" + Me.cbxKundeLand.FormattingEnabled = True + Me.cbxKundeLand.Location = New System.Drawing.Point(244, 6) + Me.cbxKundeLand.Name = "cbxKundeLand" + Me.cbxKundeLand.Size = New System.Drawing.Size(72, 21) + Me.cbxKundeLand.TabIndex = 48 + ' 'cbxNichtEroeffneteAntraege ' Me.cbxNichtEroeffneteAntraege.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -341,6 +363,17 @@ Partial Class frmUSTVoffeneAntraege Me.cbxUStV.Text = " nur mit UStV" Me.cbxUStV.UseVisualStyleBackColor = True ' + 'MyComboBox1 + ' + Me.MyComboBox1._allowedValuesFreiText = Nothing + Me.MyComboBox1._allowFreiText = False + Me.MyComboBox1._value = "" + Me.MyComboBox1.FormattingEnabled = True + Me.MyComboBox1.Location = New System.Drawing.Point(396, 5) + Me.MyComboBox1.Name = "MyComboBox1" + Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) + Me.MyComboBox1.TabIndex = 46 + ' 'ContextMenuStrip1 ' Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AntragEröffnenToolStripMenuItem}) @@ -377,39 +410,6 @@ Partial Class frmUSTVoffeneAntraege Me.cbxKundenMWST.UseVisualStyleBackColor = True Me.cbxKundenMWST.Visible = False ' - 'cbxLieferant - ' - Me.cbxLieferant._allowedValuesFreiText = Nothing - Me.cbxLieferant._allowFreiText = False - Me.cbxLieferant._value = "" - Me.cbxLieferant.FormattingEnabled = True - Me.cbxLieferant.Location = New System.Drawing.Point(92, 6) - Me.cbxLieferant.Name = "cbxLieferant" - Me.cbxLieferant.Size = New System.Drawing.Size(72, 21) - Me.cbxLieferant.TabIndex = 50 - ' - 'cbxKundeLand - ' - Me.cbxKundeLand._allowedValuesFreiText = Nothing - Me.cbxKundeLand._allowFreiText = False - Me.cbxKundeLand._value = "" - Me.cbxKundeLand.FormattingEnabled = True - Me.cbxKundeLand.Location = New System.Drawing.Point(244, 6) - Me.cbxKundeLand.Name = "cbxKundeLand" - Me.cbxKundeLand.Size = New System.Drawing.Size(72, 21) - Me.cbxKundeLand.TabIndex = 48 - ' - 'MyComboBox1 - ' - Me.MyComboBox1._allowedValuesFreiText = Nothing - Me.MyComboBox1._allowFreiText = False - Me.MyComboBox1._value = "" - Me.MyComboBox1.FormattingEnabled = True - Me.MyComboBox1.Location = New System.Drawing.Point(396, 5) - Me.MyComboBox1.Name = "MyComboBox1" - Me.MyComboBox1.Size = New System.Drawing.Size(72, 21) - Me.MyComboBox1.TabIndex = 46 - ' 'txtmaxAnz ' Me.txtmaxAnz._DateTimeOnly = False @@ -496,55 +496,56 @@ Partial Class frmUSTVoffeneAntraege Me.MyDatagridview1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - 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.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4 + 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.MyDatagridview1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 Me.MyDatagridview1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle5 + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.MyDatagridview1.DefaultCellStyle = DataGridViewCellStyle2 Me.MyDatagridview1.Location = New System.Drawing.Point(12, 98) Me.MyDatagridview1.Name = "MyDatagridview1" Me.MyDatagridview1.ReadOnly = True - DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control - 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.WindowText - DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control + 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.WindowText + DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.MyDatagridview1.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 Me.MyDatagridview1.RowHeadersWidth = 62 Me.MyDatagridview1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.MyDatagridview1.Size = New System.Drawing.Size(1770, 528) Me.MyDatagridview1.TabIndex = 30 ' - 'Button5 + 'btnPLOSE_DK ' - Me.Button5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) - Me.Button5.Location = New System.Drawing.Point(111, 639) - Me.Button5.Name = "Button5" - Me.Button5.Size = New System.Drawing.Size(98, 23) - Me.Button5.TabIndex = 48 - Me.Button5.Text = "SE-DK-Logik" - Me.Button5.UseVisualStyleBackColor = True + Me.btnPLOSE_DK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.btnPLOSE_DK.Location = New System.Drawing.Point(111, 639) + Me.btnPLOSE_DK.Name = "btnPLOSE_DK" + Me.btnPLOSE_DK.Size = New System.Drawing.Size(98, 23) + Me.btnPLOSE_DK.TabIndex = 48 + Me.btnPLOSE_DK.Text = "SE-DK-Logik" + Me.btnPLOSE_DK.UseVisualStyleBackColor = True + Me.btnPLOSE_DK.Visible = False ' 'frmUSTVoffeneAntraege ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(1818, 681) - Me.Controls.Add(Me.Button5) + Me.Controls.Add(Me.btnPLOSE_DK) Me.Controls.Add(Me.cbxKundenMWST) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.lblKunde) @@ -610,5 +611,5 @@ Partial Class frmUSTVoffeneAntraege Friend WithEvents cbxKundenMWST As CheckBox Friend WithEvents Label6 As Label Friend WithEvents cbxLieferant As VERAG_PROG_ALLGEMEIN.MyComboBox - Friend WithEvents Button5 As Button + Friend WithEvents btnPLOSE_DK As Button End Class diff --git a/SDL/USTV/frmUSTVoffeneAntraege.vb b/SDL/USTV/frmUSTVoffeneAntraege.vb index fd2439b4..cc395cdf 100644 --- a/SDL/USTV/frmUSTVoffeneAntraege.vb +++ b/SDL/USTV/frmUSTVoffeneAntraege.vb @@ -1,4 +1,5 @@ Imports System.Windows.Documents +Imports DocumentFormat.OpenXml.Drawing.Diagrams Public Class frmUSTVoffeneAntraege @@ -65,9 +66,18 @@ Public Class frmUSTVoffeneAntraege Me.LIEFERANT = l If Me.LIEFERANT = "PLOSE" Then - Button5.Visible = True + + Dim sqlString = "SELECT COUNT(*) FROM[VERAG].[dbo].[tblPLOSE_Inv_Data] where plInv_SupplierRechnungsNr like 'SE%' and plInv_SupplierCountry = 'DK'" + Dim countDK_PLOSE = (New SQL).getValueTxtBySql(sqlString, "FMZOLL") + If countDK_PLOSE <> "" AndAlso IsNumeric(countDK_PLOSE) AndAlso CInt(countDK_PLOSE) > 0 Then + btnPLOSE_DK.Visible = True + + Else + btnPLOSE_DK.Visible = False + End If Else - Button5.Visible = False + btnPLOSE_DK.Visible = False + End If For Each c As Button In FlowLayoutPanel.Controls @@ -1144,7 +1154,7 @@ Public Class frmUSTVoffeneAntraege init() End Sub - Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click + Private Sub Button5_Click(sender As Object, e As EventArgs) Handles btnPLOSE_DK.Click Dim SQL As New SQL