diff --git a/SDL/USTV/usrCntlUSTV.Designer.vb b/SDL/USTV/usrCntlUSTV.Designer.vb index fbd53e5e..e1871724 100644 --- a/SDL/USTV/usrCntlUSTV.Designer.vb +++ b/SDL/USTV/usrCntlUSTV.Designer.vb @@ -23,12 +23,16 @@ Partial Class usrCntlUSTV Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle1 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) Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() + Me.txtSucheID = New System.Windows.Forms.TextBox() + Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.Label12 = New System.Windows.Forms.Label() + Me.lblID = New System.Windows.Forms.Label() Me.cbxVZnichtabgerechnet = New System.Windows.Forms.CheckBox() Me.lblFRhint = New System.Windows.Forms.Label() Me.lblFR = New System.Windows.Forms.Label() @@ -76,10 +80,7 @@ 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() + Me.Button3 = New System.Windows.Forms.Button() CType(Me.dgvUSTV, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel1.SuspendLayout() Me.Panel2.SuspendLayout() @@ -101,8 +102,8 @@ Partial Class usrCntlUSTV Me.dgvUSTV.AKTUALISIERUNGS_INTERVALL = -1 Me.dgvUSTV.AllowUserToAddRows = False Me.dgvUSTV.AllowUserToDeleteRows = False - 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 + 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 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) @@ -172,6 +173,42 @@ Partial Class usrCntlUSTV Me.Panel1.Size = New System.Drawing.Size(1627, 108) Me.Panel1.TabIndex = 0 ' + '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 + ' + '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 + ' + '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:" + ' + '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:" + ' 'cbxVZnichtabgerechnet ' Me.cbxVZnichtabgerechnet.AutoSize = True @@ -732,6 +769,7 @@ Partial Class usrCntlUSTV 'Panel3 ' Me.Panel3.AutoSize = True + Me.Panel3.Controls.Add(Me.Button3) Me.Panel3.Controls.Add(Me.Button2) Me.Panel3.Controls.Add(Me.btnVorschau) Me.Panel3.Controls.Add(Me.btnMail) @@ -844,41 +882,18 @@ Partial Class usrCntlUSTV Me.ContextMenuStrip3.Name = "ContextMenuStrip1" Me.ContextMenuStrip3.Size = New System.Drawing.Size(61, 4) ' - 'lblID + 'Button3 ' - 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 + Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button3.ForeColor = System.Drawing.Color.Black + Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft + Me.Button3.Location = New System.Drawing.Point(982, 5) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(104, 39) + Me.Button3.TabIndex = 28 + Me.Button3.Text = "Vorauszahlungen" + Me.Button3.UseVisualStyleBackColor = True ' 'usrCntlUSTV ' @@ -953,4 +968,5 @@ Partial Class usrCntlUSTV Friend WithEvents MyComboBox1 As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents Label12 As Label Friend WithEvents lblID As Label + Friend WithEvents Button3 As Button End Class diff --git a/SDL/USTV/usrCntlUSTV.resx b/SDL/USTV/usrCntlUSTV.resx index ae5c0f7d..05433731 100644 --- a/SDL/USTV/usrCntlUSTV.resx +++ b/SDL/USTV/usrCntlUSTV.resx @@ -769,7 +769,7 @@ XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+ tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/ - 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEQAACxEBf2RfkQAAB4JJREFUSEu9lntM1FcW + 6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEAAACxABrSO9dQAAB4JJREFUSEu9lntM1FcW x0+yNWpdBURGEJ0ZXtVqZX0hFJAB5gVILVbQTRCQ1wwDw7wYGMSCgiI+IoivtbpBwOLqqnUXq30YlVrX bXAFu6Ua2ShG0jVoq1ZFwQffzb3zhG22/+0vOZnf3Nz8Pjn3nPs9X1qx10yqpnWU27iOEuo0pG6qpMKP qyljXxkpt6hozdF6qvxkN2XuW0OymiwqO1I33tBUPTNhsypTUpVuydhTOi5jTynNL08mQUEkiQwyEhql diff --git a/SDL/USTV/usrCntlUSTV.vb b/SDL/USTV/usrCntlUSTV.vb index 11a58996..9fed8ee2 100644 --- a/SDL/USTV/usrCntlUSTV.vb +++ b/SDL/USTV/usrCntlUSTV.vb @@ -1416,4 +1416,43 @@ Public Class usrCntlUSTV End Sub + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + + Dim sqlKunde = "" + Dim sqlKundeadmin = "" + If KdSearchBox1.KdNr > 0 Then + sqlKunde = " And AdressenNr = " & KdSearchBox1.KdNr + End If + + + + + Dim sqlQery = "SELECT dbo.tblUStVAntrag.UStVAn_ID, dbo.tblUStVAntrag.UStVAn_KuNr, dbo.tblUStVAntrag.UStVAn_ReDatVon, + dbo.tblUStVAntrag.UStVAn_ReDatBis, + dbo.tblUStVAntrag.UStVAn_Ausstellungsdatum, + dbo.tblUStVAntrag.UStVAn_LandNr, + dbo.tblUStVAntrag.UStVAn_VZDatum, dbo.tblUStVAntrag.UStVAn_VZBetrag, dbo.tblUStVAntrag.UStVAn_RZBetragVZ, dbo.Adressen.Ordnungsbegriff, dbo.Adressen.LandKz, ISNULL + ((SELECT SUM(UStVEr_USteuerbetragEUR) AS Expr1 + FROM dbo.tblUStVErstattung + WHERE (UStVAn_ID = dbo.tblUStVAntrag.UStVAn_ID)), 0) AS Erstattungsbetrag, CASE WHEN ([UStVAn_VZBetrag] - ISNULL([UStVAn_RZBetragVZ], 0) - ISNULL + ((SELECT SUM(dbo.tblUStVErstattung.UStVEr_USteuerbetragEUR) + FROM dbo.tblUStVErstattung + WHERE dbo.tblUStVErstattung.UStVAn_ID = dbo.tblUStVAntrag.UStVAn_ID), 0)) > 0 THEN [UStVAn_VZBetrag] - ISNULL([UStVAn_RZBetragVZ], 0) - ISNULL + ((SELECT SUM(dbo.tblUStVErstattung.UStVEr_USteuerbetragEUR) + FROM dbo.tblUStVErstattung + WHERE dbo.tblUStVErstattung.UStVAn_ID = dbo.tblUStVAntrag.UStVAn_ID), 0) ELSE 0 END AS UStVAn_VZBetragAktuell + FROM dbo.tblUStVAntrag INNER JOIN + dbo.Adressen ON dbo.tblUStVAntrag.UStVAn_KuNr = dbo.Adressen.AdressenNr + WHERE (dbo.tblUStVAntrag.UStVAn_VZBetrag IS NOT NULL)" & IIf(sqlKunde <> "", sqlKunde, "") + + Dim dtVorauszahlung As DataTable = SQL.loadDgvBySql(sqlQery, "FMZOLL") + + ContextMenuStrip3.Hide() + + If dtVorauszahlung.Rows.Count = 0 Then Exit Sub + + cProgramFunctions.genExcelFromDT_NEW(dtVorauszahlung,,,,,, True) + + + End Sub End Class