filtermöglichkeit erweitert
This commit is contained in:
60
SDL/USTV/usrCntlUSTV.Designer.vb
generated
60
SDL/USTV/usrCntlUSTV.Designer.vb
generated
@@ -23,7 +23,7 @@ Partial Class usrCntlUSTV
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
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 resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlUSTV))
|
||||
Me.pnlFilter = New System.Windows.Forms.Panel()
|
||||
Me.dgvUSTV = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
@@ -76,6 +76,10 @@ Partial Class usrCntlUSTV
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.lblID = New System.Windows.Forms.Label()
|
||||
Me.Label12 = New System.Windows.Forms.Label()
|
||||
Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.txtSucheID = New System.Windows.Forms.TextBox()
|
||||
CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.Panel2.SuspendLayout()
|
||||
@@ -97,8 +101,8 @@ Partial Class usrCntlUSTV
|
||||
Me.dgvUSTV.AKTUALISIERUNGS_INTERVALL = -1
|
||||
Me.dgvUSTV.AllowUserToAddRows = False
|
||||
Me.dgvUSTV.AllowUserToDeleteRows = False
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvUSTV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvUSTV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||
Me.dgvUSTV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvUSTV.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.dgvUSTV.Location = New System.Drawing.Point(0, 108)
|
||||
@@ -123,6 +127,10 @@ Partial Class usrCntlUSTV
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.Panel1.Controls.Add(Me.txtSucheID)
|
||||
Me.Panel1.Controls.Add(Me.MyComboBox1)
|
||||
Me.Panel1.Controls.Add(Me.Label12)
|
||||
Me.Panel1.Controls.Add(Me.lblID)
|
||||
Me.Panel1.Controls.Add(Me.cbxVZnichtabgerechnet)
|
||||
Me.Panel1.Controls.Add(Me.lblFRhint)
|
||||
Me.Panel1.Controls.Add(Me.lblFR)
|
||||
@@ -169,7 +177,7 @@ Partial Class usrCntlUSTV
|
||||
Me.cbxVZnichtabgerechnet.AutoSize = True
|
||||
Me.cbxVZnichtabgerechnet.Checked = True
|
||||
Me.cbxVZnichtabgerechnet.CheckState = System.Windows.Forms.CheckState.Indeterminate
|
||||
Me.cbxVZnichtabgerechnet.Location = New System.Drawing.Point(668, 35)
|
||||
Me.cbxVZnichtabgerechnet.Location = New System.Drawing.Point(668, 61)
|
||||
Me.cbxVZnichtabgerechnet.Name = "cbxVZnichtabgerechnet"
|
||||
Me.cbxVZnichtabgerechnet.Size = New System.Drawing.Size(129, 17)
|
||||
Me.cbxVZnichtabgerechnet.TabIndex = 74
|
||||
@@ -538,7 +546,7 @@ Partial Class usrCntlUSTV
|
||||
Me.cbxDifferenzbetrag.AutoSize = True
|
||||
Me.cbxDifferenzbetrag.Checked = True
|
||||
Me.cbxDifferenzbetrag.CheckState = System.Windows.Forms.CheckState.Indeterminate
|
||||
Me.cbxDifferenzbetrag.Location = New System.Drawing.Point(503, 35)
|
||||
Me.cbxDifferenzbetrag.Location = New System.Drawing.Point(668, 44)
|
||||
Me.cbxDifferenzbetrag.Name = "cbxDifferenzbetrag"
|
||||
Me.cbxDifferenzbetrag.Size = New System.Drawing.Size(132, 17)
|
||||
Me.cbxDifferenzbetrag.TabIndex = 47
|
||||
@@ -551,7 +559,7 @@ Partial Class usrCntlUSTV
|
||||
Me.cbxEingereicht.AutoSize = True
|
||||
Me.cbxEingereicht.Checked = True
|
||||
Me.cbxEingereicht.CheckState = System.Windows.Forms.CheckState.Indeterminate
|
||||
Me.cbxEingereicht.Location = New System.Drawing.Point(367, 35)
|
||||
Me.cbxEingereicht.Location = New System.Drawing.Point(668, 27)
|
||||
Me.cbxEingereicht.Name = "cbxEingereicht"
|
||||
Me.cbxEingereicht.Size = New System.Drawing.Size(118, 17)
|
||||
Me.cbxEingereicht.TabIndex = 46
|
||||
@@ -836,6 +844,42 @@ Partial Class usrCntlUSTV
|
||||
Me.ContextMenuStrip3.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip3.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'lblID
|
||||
'
|
||||
Me.lblID.AutoSize = True
|
||||
Me.lblID.Location = New System.Drawing.Point(527, 40)
|
||||
Me.lblID.Name = "lblID"
|
||||
Me.lblID.Size = New System.Drawing.Size(21, 13)
|
||||
Me.lblID.TabIndex = 75
|
||||
Me.lblID.Text = "ID:"
|
||||
'
|
||||
'Label12
|
||||
'
|
||||
Me.Label12.AutoSize = True
|
||||
Me.Label12.Location = New System.Drawing.Point(364, 40)
|
||||
Me.Label12.Name = "Label12"
|
||||
Me.Label12.Size = New System.Drawing.Size(73, 13)
|
||||
Me.Label12.TabIndex = 76
|
||||
Me.Label12.Text = "Antrags-Land:"
|
||||
'
|
||||
'MyComboBox1
|
||||
'
|
||||
Me.MyComboBox1._allowedValuesFreiText = Nothing
|
||||
Me.MyComboBox1._allowFreiText = False
|
||||
Me.MyComboBox1._value = ""
|
||||
Me.MyComboBox1.FormattingEnabled = True
|
||||
Me.MyComboBox1.Location = New System.Drawing.Point(443, 37)
|
||||
Me.MyComboBox1.Name = "MyComboBox1"
|
||||
Me.MyComboBox1.Size = New System.Drawing.Size(78, 21)
|
||||
Me.MyComboBox1.TabIndex = 77
|
||||
'
|
||||
'txtSucheID
|
||||
'
|
||||
Me.txtSucheID.Location = New System.Drawing.Point(554, 36)
|
||||
Me.txtSucheID.Name = "txtSucheID"
|
||||
Me.txtSucheID.Size = New System.Drawing.Size(94, 20)
|
||||
Me.txtSucheID.TabIndex = 78
|
||||
'
|
||||
'usrCntlUSTV
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -905,4 +949,8 @@ Partial Class usrCntlUSTV
|
||||
Friend WithEvents lblFR As Label
|
||||
Friend WithEvents lblFRhint As Label
|
||||
Friend WithEvents cbxVZnichtabgerechnet As CheckBox
|
||||
Friend WithEvents txtSucheID As TextBox
|
||||
Friend WithEvents MyComboBox1 As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Label12 As Label
|
||||
Friend WithEvents lblID As Label
|
||||
End Class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ Public Class usrCntlUSTV
|
||||
Public kdNr As Integer = -1
|
||||
Dim loaded As Boolean = False
|
||||
|
||||
Sub init(Optional kdNr As Integer = -1)
|
||||
Sub init(Optional kdNr As Integer = -1, Optional ID As Integer = -1, Optional AntragsLand As String = "")
|
||||
pnlFilter.AutoScroll = False
|
||||
btnKundendatenaktualisieren.Enabled = False
|
||||
' MsgBox(kdNr)
|
||||
@@ -45,7 +45,7 @@ Public Class usrCntlUSTV
|
||||
|
||||
.SET_SQL("SELECT " & topMax & " [tblUStVAntrag].[UStVAn_ID],UStVAn_AntragArt,[UStVAn_KuNr],[UStVAn_Name],[UStVAn_LandKz],LandKz as Land_Antrag , UStVAn_BezugsNr, [UStVAn_ReDatVon], [UStVAn_ReDatBis] ,UStVAn_AntragEingereichtAm,[UStVAn_3470] ,[UStVAn_Währungscode],[UStVAn_USteuerbetrag],[UStVAn_Erstattungsbetrag],([UStVAn_USteuerbetrag] - [UStVAn_Erstattungsbetrag]) as UStVAn_Differenzbetrag,[UStVAn_USteuerbetragEUR],[UStVAn_ErstattungsbetragEUR],([UStVAn_USteuerbetragEUR] - [UStVAn_ErstattungsbetragEUR]) as UStVAn_DifferenzbetragEUR,[UStVAn_VZBetrag],[UStVAn_VZDatum],UStVAn_VZoffen ,[UStVAn_Sachbearbeiter]
|
||||
FROM [tblUStVAntrag] inner join [Länderverzeichnis für die Außenhandelsstatistik] on UStVAn_LandNr=Landnr
|
||||
where 1=1 " & getWhere() & "
|
||||
where 1=1 " & getWhere(, ID, AntragsLand) & "
|
||||
order by UStVAn_KuNr,UStVAn_Name,datepart(year,[UStVAn_ReDatVon] ) desc,LandKz,[UStVAn_ReDatVon] desc", "FMZOLL")
|
||||
.LOAD()
|
||||
|
||||
@@ -229,10 +229,15 @@ Public Class usrCntlUSTV
|
||||
End Sub
|
||||
|
||||
|
||||
Function getWhere(Optional useJahr = True) As String
|
||||
Function getWhere(Optional useJahr As Boolean = True, Optional AntragsID As Integer = -1, Optional AntragsLandKZ As String = "") As String
|
||||
Dim whereStr = ""
|
||||
'If KdSearchBox1.KdNr <= 0 Then Exit Sub
|
||||
|
||||
If AntragsID > 0 Then
|
||||
whereStr &= " AND UStVAn_ID=" & AntragsID & " " & IIf(KdSearchBox1.KdNr > 0, " AND UStVAn_KuNr=" & KdSearchBox1.KdNr & " ", "")
|
||||
Return whereStr
|
||||
End If
|
||||
|
||||
If useJahr Then
|
||||
If cboJahr._value <> "" Then
|
||||
If cboJahrBis._value <> "" Then
|
||||
@@ -268,6 +273,9 @@ Public Class usrCntlUSTV
|
||||
End Select
|
||||
|
||||
If KdSearchBox1.KdNr > 0 Then whereStr &= " AND UStVAn_KuNr=" & KdSearchBox1.KdNr & " "
|
||||
|
||||
If AntragsLandKZ <> "" Then whereStr &= " AND LandKz='" & AntragsLandKZ & "' "
|
||||
|
||||
Return whereStr
|
||||
End Function
|
||||
|
||||
@@ -293,6 +301,8 @@ Public Class usrCntlUSTV
|
||||
Next
|
||||
cboJahrBis.changeItem(Now.Year)
|
||||
|
||||
filterAntragsLand()
|
||||
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then
|
||||
'FlatButton1.Enabled = False#
|
||||
@@ -330,11 +340,15 @@ Public Class usrCntlUSTV
|
||||
Private Sub cboJahr_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboJahr.SelectedIndexChanged, cboJahrBis.SelectedIndexChanged
|
||||
If loaded = False Then Exit Sub
|
||||
init()
|
||||
filterAntragsLand()
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox1_PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Handles KdSearchBox1.PropertyChanged
|
||||
If loaded = False Then Exit Sub
|
||||
|
||||
init()
|
||||
filterAntragsLand()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1319,4 +1333,66 @@ Public Class usrCntlUSTV
|
||||
If loaded = False Then Exit Sub
|
||||
init()
|
||||
End Sub
|
||||
|
||||
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSucheID.KeyDown
|
||||
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
If txtSucheID.Text <> "" AndAlso IsNumeric(txtSucheID.Text) Then
|
||||
If loaded = False Then Exit Sub
|
||||
init(kdNr, txtSucheID.Text)
|
||||
Else
|
||||
If loaded = False Then Exit Sub
|
||||
init()
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles MyComboBox1.SelectedIndexChanged
|
||||
|
||||
|
||||
If loaded = False Then Exit Sub
|
||||
|
||||
If txtSucheID.Text <> "" AndAlso IsNumeric(txtSucheID.Text) Then
|
||||
init(kdNr, txtSucheID.Text, MyComboBox1._value)
|
||||
Else
|
||||
init(kdNr, , MyComboBox1._value)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub filterAntragsLand()
|
||||
|
||||
If Not MyComboBox1._value <> "" Then
|
||||
MyComboBox1.Items.Clear()
|
||||
MyComboBox1.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
Dim list As New List(Of String)
|
||||
For Each r As DataGridViewRow In dgvUSTV.Rows
|
||||
|
||||
If r.Cells("Land_Antrag").Value IsNot Nothing And r.Cells("Land_Antrag").Value <> "" Then
|
||||
|
||||
If Not list.Any(Function(c) c = r.Cells("Land_Antrag").Value) Then
|
||||
list.Add(r.Cells("Land_Antrag").Value)
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If list.Count > 1 Then
|
||||
list.OrderBy(Function(x) x.ToString)
|
||||
End If
|
||||
|
||||
For Each l In list
|
||||
Dim listItem As New VERAG_PROG_ALLGEMEIN.MyListItem(l, l)
|
||||
MyComboBox1.Items.Add(listItem)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user