Gesamtsicherheiten Excel-Export für Zollamut und Plausibiltätsprüfungen, Export für Essensbestellungen verbessert.
This commit is contained in:
@@ -28,6 +28,7 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label22 = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.cbxAlleAnzeigen = New System.Windows.Forms.CheckBox()
|
||||
Me.lblBestellungBis = New System.Windows.Forms.Label()
|
||||
Me.btnBestelllimit = New System.Windows.Forms.Button()
|
||||
Me.lblDaysToOrder = New System.Windows.Forms.Label()
|
||||
@@ -79,7 +80,8 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.lblWarning = New System.Windows.Forms.Label()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.cbxAlleAnzeigen = New System.Windows.Forms.CheckBox()
|
||||
Me.ExportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ExcelToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.pnlTop.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
@@ -159,6 +161,16 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.Panel1.Size = New System.Drawing.Size(1242, 106)
|
||||
Me.Panel1.TabIndex = 2
|
||||
'
|
||||
'cbxAlleAnzeigen
|
||||
'
|
||||
Me.cbxAlleAnzeigen.AutoSize = True
|
||||
Me.cbxAlleAnzeigen.Location = New System.Drawing.Point(668, 79)
|
||||
Me.cbxAlleAnzeigen.Name = "cbxAlleAnzeigen"
|
||||
Me.cbxAlleAnzeigen.Size = New System.Drawing.Size(42, 17)
|
||||
Me.cbxAlleAnzeigen.TabIndex = 72
|
||||
Me.cbxAlleAnzeigen.Text = "alle"
|
||||
Me.cbxAlleAnzeigen.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblBestellungBis
|
||||
'
|
||||
Me.lblBestellungBis.AutoSize = True
|
||||
@@ -612,9 +624,9 @@ Partial Class frmEssensbestellungenAdministration
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StornierenToolStripMenuItem, Me.AbgerechnetToolStripMenuItem, Me.BearbeitenToolStripMenuItem, Me.AnHigway118SchickenToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.StornierenToolStripMenuItem, Me.AbgerechnetToolStripMenuItem, Me.BearbeitenToolStripMenuItem, Me.AnHigway118SchickenToolStripMenuItem, Me.ExportToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(283, 92)
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(283, 136)
|
||||
'
|
||||
'StornierenToolStripMenuItem
|
||||
'
|
||||
@@ -798,15 +810,18 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Me.Label9.Text = "Gesamtbetrag"
|
||||
Me.Label9.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'cbxAlleAnzeigen
|
||||
'ExportToolStripMenuItem
|
||||
'
|
||||
Me.cbxAlleAnzeigen.AutoSize = True
|
||||
Me.cbxAlleAnzeigen.Location = New System.Drawing.Point(668, 79)
|
||||
Me.cbxAlleAnzeigen.Name = "cbxAlleAnzeigen"
|
||||
Me.cbxAlleAnzeigen.Size = New System.Drawing.Size(42, 17)
|
||||
Me.cbxAlleAnzeigen.TabIndex = 72
|
||||
Me.cbxAlleAnzeigen.Text = "alle"
|
||||
Me.cbxAlleAnzeigen.UseVisualStyleBackColor = True
|
||||
Me.ExportToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ExcelToolStripMenuItem})
|
||||
Me.ExportToolStripMenuItem.Name = "ExportToolStripMenuItem"
|
||||
Me.ExportToolStripMenuItem.Size = New System.Drawing.Size(282, 22)
|
||||
Me.ExportToolStripMenuItem.Text = "Export"
|
||||
'
|
||||
'ExcelToolStripMenuItem
|
||||
'
|
||||
Me.ExcelToolStripMenuItem.Name = "ExcelToolStripMenuItem"
|
||||
Me.ExcelToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ExcelToolStripMenuItem.Text = "Excel"
|
||||
'
|
||||
'frmEssensbestellungenAdministration
|
||||
'
|
||||
@@ -899,4 +914,6 @@ Partial Class frmEssensbestellungenAdministration
|
||||
Friend WithEvents btnBestelllimit As Button
|
||||
Friend WithEvents lblBestellungBis As Label
|
||||
Friend WithEvents cbxAlleAnzeigen As CheckBox
|
||||
Friend WithEvents ExportToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents ExcelToolStripMenuItem As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
@@ -823,5 +823,57 @@ Public Class frmEssensbestellungenAdministration
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ExcelToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExcelToolStripMenuItem.Click
|
||||
Me.Cursor =
|
||||
Cursors.WaitCursor
|
||||
Try
|
||||
If dgvBestellungen.SelectedRows.Count = 0 Then
|
||||
lblWarning.Text = "keine Bestellungen markiert!"
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim dtSource As DataTable
|
||||
dtSource = CType(dgvBestellungen.DataSource, DataTable)
|
||||
Dim dt = dtSource.Clone()
|
||||
|
||||
For Each row As DataGridViewRow In dgvBestellungen.SelectedRows
|
||||
|
||||
dt.ImportRow(dtSource.Rows(row.Index))
|
||||
|
||||
Next
|
||||
|
||||
dt.DefaultView.Sort = "eb_mitid ASC, eb_kw ASC"
|
||||
dt = dt.DefaultView.ToTable
|
||||
|
||||
Dim drFirst = dt.NewRow
|
||||
drFirst.Item("eb_mitname") = "Bestellungen von " & txtBestellDat.Text & " bis " & txtBestellDatBis.Text
|
||||
drFirst.Item("eb_mitId") = 0
|
||||
drFirst.Item("eb_kw") = " "
|
||||
drFirst.Item("eb_gebaeude") = " "
|
||||
drFirst.Item("eb_abteilung") = " "
|
||||
drFirst.Item("eb_preis") = 0
|
||||
|
||||
dt.Rows.InsertAt(drFirst, 0)
|
||||
|
||||
Dim drLast = dt.NewRow
|
||||
drLast.Item("eb_mitname") = "Gesamtsumme: "
|
||||
drLast.Item("eb_mitId") = 0
|
||||
drLast.Item("eb_kw") = " "
|
||||
drLast.Item("eb_gebaeude") = " "
|
||||
drLast.Item("eb_abteilung") = " "
|
||||
drLast.Item("eb_preis") = txtMarkierteDS.Text.Replace("€", "")
|
||||
dt.Rows.InsertAt(drLast, dt.Rows.Count)
|
||||
|
||||
dt.Columns.Remove("eb_mitid")
|
||||
|
||||
SDL.cProgramFunctions.genExcelFromDT_NEW(dt)
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
109
Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb
generated
109
Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb
generated
@@ -53,12 +53,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.cbxStandort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblFiliale = New System.Windows.Forms.Label()
|
||||
Me.FlatButton2 = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.btnSucheStarten = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.txtbis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtVon = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.btnResetFilter = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.txtSuchbegriff = New System.Windows.Forms.TextBox()
|
||||
@@ -149,12 +144,7 @@ Partial Class frmGesamtsicherheitenMenuNEU
|
||||
Me.Panel1.Controls.Add(Me.Label4)
|
||||
Me.Panel1.Controls.Add(Me.cbxStandort)
|
||||
Me.Panel1.Controls.Add(Me.lblFiliale)
|
||||
Me.Panel1.Controls.Add(Me.FlatButton2)
|
||||
Me.Panel1.Controls.Add(Me.btnSucheStarten)
|
||||
Me.Panel1.Controls.Add(Me.txtbis)
|
||||
Me.Panel1.Controls.Add(Me.txtVon)
|
||||
Me.Panel1.Controls.Add(Me.Label3)
|
||||
Me.Panel1.Controls.Add(Me.Label2)
|
||||
Me.Panel1.Controls.Add(Me.Label1)
|
||||
Me.Panel1.Controls.Add(Me.btnResetFilter)
|
||||
Me.Panel1.Controls.Add(Me.txtSuchbegriff)
|
||||
@@ -475,22 +465,6 @@ Partial Class frmGesamtsicherheitenMenuNEU
|
||||
Me.lblFiliale.TabIndex = 4
|
||||
Me.lblFiliale.Text = "Filiale:"
|
||||
'
|
||||
'FlatButton2
|
||||
'
|
||||
Me.FlatButton2.allowBorder = False
|
||||
Me.FlatButton2.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.FlatButton2.BackColor = System.Drawing.Color.White
|
||||
Me.FlatButton2.FlatAppearance.BorderSize = 0
|
||||
Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.FlatButton2.ForeColor = System.Drawing.Color.Black
|
||||
Me.FlatButton2.Location = New System.Drawing.Point(565, 220)
|
||||
Me.FlatButton2.Name = "FlatButton2"
|
||||
Me.FlatButton2.Size = New System.Drawing.Size(81, 20)
|
||||
Me.FlatButton2.TabIndex = 30
|
||||
Me.FlatButton2.Text = "jedes Datum"
|
||||
Me.FlatButton2.UseVisualStyleBackColor = False
|
||||
Me.FlatButton2.Visible = False
|
||||
'
|
||||
'btnSucheStarten
|
||||
'
|
||||
Me.btnSucheStarten.allowBorder = False
|
||||
@@ -505,84 +479,6 @@ Partial Class frmGesamtsicherheitenMenuNEU
|
||||
Me.btnSucheStarten.Text = "Suche starten"
|
||||
Me.btnSucheStarten.UseVisualStyleBackColor = False
|
||||
'
|
||||
'txtbis
|
||||
'
|
||||
Me.txtbis._DateTimeOnly = False
|
||||
Me.txtbis._numbersOnly = False
|
||||
Me.txtbis._numbersOnlyKommastellen = ""
|
||||
Me.txtbis._numbersOnlyTrennzeichen = True
|
||||
Me.txtbis._Prozent = False
|
||||
Me.txtbis._ShortDateNew = False
|
||||
Me.txtbis._ShortDateOnly = False
|
||||
Me.txtbis._TimeOnly = False
|
||||
Me.txtbis._TimeOnly_Seconds = False
|
||||
Me.txtbis._value = ""
|
||||
Me.txtbis._Waehrung = False
|
||||
Me.txtbis._WaehrungZeichen = True
|
||||
Me.txtbis.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.txtbis.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtbis.Location = New System.Drawing.Point(565, 196)
|
||||
Me.txtbis.MaxLineLength = -1
|
||||
Me.txtbis.MaxLines_Warning = ""
|
||||
Me.txtbis.MaxLines_Warning_Label = Nothing
|
||||
Me.txtbis.Name = "txtbis"
|
||||
Me.txtbis.Size = New System.Drawing.Size(81, 20)
|
||||
Me.txtbis.TabIndex = 24
|
||||
Me.txtbis.TabStop = False
|
||||
Me.txtbis.Visible = False
|
||||
'
|
||||
'txtVon
|
||||
'
|
||||
Me.txtVon._DateTimeOnly = False
|
||||
Me.txtVon._numbersOnly = False
|
||||
Me.txtVon._numbersOnlyKommastellen = ""
|
||||
Me.txtVon._numbersOnlyTrennzeichen = True
|
||||
Me.txtVon._Prozent = False
|
||||
Me.txtVon._ShortDateNew = False
|
||||
Me.txtVon._ShortDateOnly = False
|
||||
Me.txtVon._TimeOnly = False
|
||||
Me.txtVon._TimeOnly_Seconds = False
|
||||
Me.txtVon._value = ""
|
||||
Me.txtVon._Waehrung = False
|
||||
Me.txtVon._WaehrungZeichen = True
|
||||
Me.txtVon.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.txtVon.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtVon.Location = New System.Drawing.Point(562, 153)
|
||||
Me.txtVon.MaxLineLength = -1
|
||||
Me.txtVon.MaxLines_Warning = ""
|
||||
Me.txtVon.MaxLines_Warning_Label = Nothing
|
||||
Me.txtVon.Name = "txtVon"
|
||||
Me.txtVon.Size = New System.Drawing.Size(81, 20)
|
||||
Me.txtVon.TabIndex = 15
|
||||
Me.txtVon.TabStop = False
|
||||
Me.txtVon.Visible = False
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||
Me.Label3.ForeColor = System.Drawing.Color.Honeydew
|
||||
Me.Label3.Location = New System.Drawing.Point(562, 177)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(24, 15)
|
||||
Me.Label3.TabIndex = 22
|
||||
Me.Label3.Text = "Bis"
|
||||
Me.Label3.Visible = False
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||
Me.Label2.ForeColor = System.Drawing.Color.Honeydew
|
||||
Me.Label2.Location = New System.Drawing.Point(562, 134)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(28, 15)
|
||||
Me.Label2.TabIndex = 10
|
||||
Me.Label2.Text = "Von"
|
||||
Me.Label2.Visible = False
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
@@ -725,13 +621,8 @@ Partial Class frmGesamtsicherheitenMenuNEU
|
||||
Friend WithEvents chkOffen As CheckBox
|
||||
Friend WithEvents txtSuchbegriff As TextBox
|
||||
Friend WithEvents btnResetFilter As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents txtbis As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents txtVon As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents btnSucheStarten As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
Friend WithEvents ExportCSVToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents lblFiliale As Label
|
||||
|
||||
@@ -350,8 +350,6 @@ Public Class frmGesamtsicherheitenMenuNEU
|
||||
|
||||
Dim anzahlOffenerGSUeber85Tage As Integer
|
||||
|
||||
Dim dtNew As New DataTable
|
||||
|
||||
Dim sqlstring As String = "select count(*) as anzahlOffeneATBs from (Select gs_gsnr as gs_gsnr, MIN(gs_standort) as gs_standort,min (gs_datum) as gs_datum,
|
||||
(Select SUM( Case
|
||||
when gs_art = 'Open' then (gs_sicherheitsbetrag * -1)
|
||||
@@ -368,7 +366,7 @@ Public Class frmGesamtsicherheitenMenuNEU
|
||||
From [tblGesamtsicherheit] as meh group by gs_gsnr) as meh2
|
||||
Where gs_standort = '" & Standort & "'AND Sicherheitssaldo <> 0 AND gs_datum < '" & Date.Now().AddDays(-85) & "'"
|
||||
|
||||
dtNew = SQL.loadDgvBySql(sqlstring, "AVISO", 100, True)
|
||||
Dim dtNew As DataTable = SQL.loadDgvBySql(sqlstring, "AVISO", 100, True)
|
||||
|
||||
If (dtNew.Rows(0).Item(0) IsNot DBNull.Value) Then
|
||||
|
||||
|
||||
86
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
86
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
@@ -114,12 +114,8 @@ Partial Class frmGesamtsicherheitenNEU
|
||||
Me.btnRundungsdifAusgl = New System.Windows.Forms.Button()
|
||||
Me.btnNew = New System.Windows.Forms.Button()
|
||||
Me.cbx_offene = New System.Windows.Forms.CheckBox()
|
||||
Me.btnSuche = New System.Windows.Forms.Button()
|
||||
Me.cbx_Suche_Warenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.Label19 = New System.Windows.Forms.Label()
|
||||
Me.txt_Suche = New System.Windows.Forms.TextBox()
|
||||
Me.txtSuche = New System.Windows.Forms.TextBox()
|
||||
Me.Label21 = New System.Windows.Forms.Label()
|
||||
Me.btn_resetSearch = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.btnDeletePos = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.btnDeleteSicherheit = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
Me.btnUpdatePos = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||
@@ -1284,12 +1280,8 @@ Partial Class frmGesamtsicherheitenNEU
|
||||
Me.Panel1.Controls.Add(Me.btnRundungsdifAusgl)
|
||||
Me.Panel1.Controls.Add(Me.btnNew)
|
||||
Me.Panel1.Controls.Add(Me.cbx_offene)
|
||||
Me.Panel1.Controls.Add(Me.btnSuche)
|
||||
Me.Panel1.Controls.Add(Me.cbx_Suche_Warenort)
|
||||
Me.Panel1.Controls.Add(Me.Label19)
|
||||
Me.Panel1.Controls.Add(Me.txt_Suche)
|
||||
Me.Panel1.Controls.Add(Me.txtSuche)
|
||||
Me.Panel1.Controls.Add(Me.Label21)
|
||||
Me.Panel1.Controls.Add(Me.btn_resetSearch)
|
||||
Me.Panel1.Location = New System.Drawing.Point(3, 41)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(1384, 61)
|
||||
@@ -1333,77 +1325,25 @@ Partial Class frmGesamtsicherheitenNEU
|
||||
Me.cbx_offene.Text = "nur offene anzeigen"
|
||||
Me.cbx_offene.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSuche
|
||||
'txtSuche
|
||||
'
|
||||
Me.btnSuche.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnSuche.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSuche.Location = New System.Drawing.Point(737, 3)
|
||||
Me.btnSuche.Name = "btnSuche"
|
||||
Me.btnSuche.Size = New System.Drawing.Size(162, 52)
|
||||
Me.btnSuche.TabIndex = 7
|
||||
Me.btnSuche.Text = "Suche starten"
|
||||
Me.btnSuche.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cbx_Suche_Warenort
|
||||
'
|
||||
Me.cbx_Suche_Warenort._allowedValuesFreiText = Nothing
|
||||
Me.cbx_Suche_Warenort._allowFreiText = False
|
||||
Me.cbx_Suche_Warenort._value = ""
|
||||
Me.cbx_Suche_Warenort.DropDownWidth = 300
|
||||
Me.cbx_Suche_Warenort.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.cbx_Suche_Warenort.FormattingEnabled = True
|
||||
Me.cbx_Suche_Warenort.Location = New System.Drawing.Point(274, 20)
|
||||
Me.cbx_Suche_Warenort.MaxLength = 4
|
||||
Me.cbx_Suche_Warenort.Name = "cbx_Suche_Warenort"
|
||||
Me.cbx_Suche_Warenort.Size = New System.Drawing.Size(95, 24)
|
||||
Me.cbx_Suche_Warenort.TabIndex = 6
|
||||
Me.cbx_Suche_Warenort.Visible = False
|
||||
'
|
||||
'Label19
|
||||
'
|
||||
Me.Label19.AutoSize = True
|
||||
Me.Label19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label19.Location = New System.Drawing.Point(271, 3)
|
||||
Me.Label19.Name = "Label19"
|
||||
Me.Label19.Size = New System.Drawing.Size(63, 13)
|
||||
Me.Label19.TabIndex = 2
|
||||
Me.Label19.Text = "Warenort:"
|
||||
Me.Label19.Visible = False
|
||||
'
|
||||
'txt_Suche
|
||||
'
|
||||
Me.txt_Suche.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txt_Suche.Location = New System.Drawing.Point(379, 19)
|
||||
Me.txt_Suche.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.txt_Suche.Name = "txt_Suche"
|
||||
Me.txt_Suche.Size = New System.Drawing.Size(243, 24)
|
||||
Me.txt_Suche.TabIndex = 5
|
||||
Me.txtSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtSuche.Location = New System.Drawing.Point(208, 19)
|
||||
Me.txtSuche.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.txtSuche.Name = "txtSuche"
|
||||
Me.txtSuche.Size = New System.Drawing.Size(243, 24)
|
||||
Me.txtSuche.TabIndex = 5
|
||||
'
|
||||
'Label21
|
||||
'
|
||||
Me.Label21.AutoSize = True
|
||||
Me.Label21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label21.Location = New System.Drawing.Point(376, 3)
|
||||
Me.Label21.Location = New System.Drawing.Point(205, 3)
|
||||
Me.Label21.Name = "Label21"
|
||||
Me.Label21.Size = New System.Drawing.Size(47, 13)
|
||||
Me.Label21.TabIndex = 1
|
||||
Me.Label21.Text = "Suche:"
|
||||
'
|
||||
'btn_resetSearch
|
||||
'
|
||||
Me.btn_resetSearch.allowBorder = False
|
||||
Me.btn_resetSearch.BackColor = System.Drawing.Color.White
|
||||
Me.btn_resetSearch.FlatAppearance.BorderSize = 0
|
||||
Me.btn_resetSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btn_resetSearch.ForeColor = System.Drawing.Color.Black
|
||||
Me.btn_resetSearch.Image = Global.AVISO.My.Resources.Resources.refresh
|
||||
Me.btn_resetSearch.Location = New System.Drawing.Point(660, 10)
|
||||
Me.btn_resetSearch.Name = "btn_resetSearch"
|
||||
Me.btn_resetSearch.Size = New System.Drawing.Size(32, 33)
|
||||
Me.btn_resetSearch.TabIndex = 4
|
||||
Me.btn_resetSearch.UseVisualStyleBackColor = False
|
||||
'
|
||||
'btnDeletePos
|
||||
'
|
||||
Me.btnDeletePos.allowBorder = False
|
||||
@@ -1744,7 +1684,6 @@ Partial Class frmGesamtsicherheitenNEU
|
||||
Friend WithEvents txtSicherheitSicherheitsbetrag As TextBox
|
||||
Friend WithEvents txtSicherheitWarenwert As TextBox
|
||||
Friend WithEvents txtSicherheitATBNr As TextBox
|
||||
Friend WithEvents btn_resetSearch As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents lblZollsatz As Label
|
||||
Friend WithEvents lblReferenzwert As Label
|
||||
Friend WithEvents lblSaldo As Label
|
||||
@@ -1787,11 +1726,8 @@ Partial Class frmGesamtsicherheitenNEU
|
||||
Friend WithEvents ContextMenuStripGesSicherh As ContextMenuStrip
|
||||
Friend WithEvents ATBNraendernToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents cbx_Suche_Warenort As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents Label19 As Label
|
||||
Friend WithEvents txt_Suche As TextBox
|
||||
Friend WithEvents txtSuche As TextBox
|
||||
Friend WithEvents Label21 As Label
|
||||
Friend WithEvents btnSuche As Button
|
||||
Friend WithEvents Label20 As Label
|
||||
Friend WithEvents txtPosNr As TextBox
|
||||
Friend WithEvents lbloffenerSaldo As Label
|
||||
|
||||
@@ -68,9 +68,6 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Me.Text = "Gesamtsicherheit " & Standort
|
||||
|
||||
|
||||
cbx_Suche_Warenort.fillWithSQL("SELECT [wo_warenort],CONCAT([wo_knnr],' - ' ,[wo_bezeichnung]) FROM [tblWarenorte] WHERE [wo_aktiv] ='1' AND wo_ze = 1 AND [wo_firma] = '" & firmaId & "' ORDER BY [wo_reihenfolge]", True, "AVISO", True)
|
||||
|
||||
If setNullToZero(gessicherheitID) = "" Or Neu = True Then
|
||||
|
||||
panOben.Enabled = False : panOben.Enabled = False
|
||||
@@ -106,16 +103,13 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Public Sub LoadDGVSicherheiten(Optional withFilterParam As Boolean = False)
|
||||
|
||||
|
||||
'lblSaldo.Text = "Saldo: € " & currentGesSichRef.gsr_Saldo.ToString()
|
||||
txtGestellInfo.Text = ""
|
||||
Dim sqladd1 As String = ""
|
||||
If currentGesSichRef.brgakto_gs_ustEnabled Then sqladd1 &= ", FORMAT((([gs_warenwert] + [gs_sicherheitsbetrag]) * " & currentGesSichRef.brgakto_gs_ust & "/100), 'C', 'de-DE') as gs_ust"
|
||||
If currentGesSichRef.brgakto_gs_ATR Then sqladd1 &= ", [gs_atr]"
|
||||
Dim sqlSearchSting As String = ""
|
||||
If withFilterParam = True Then
|
||||
If txt_Suche.Text <> "" Then sqlSearchSting &= "AND ([gs_abfertigungsNr] Like '%" & txt_Suche.Text & "%' OR [gs_ATBNr] Like '%" & txt_Suche.Text & "%' OR [gs_LKWKZ] like '%" & txt_Suche.Text & "%' OR [gs_avisoId] like '%" & txt_Suche.Text & "%' OR [gs_freitext] like '%" & txt_Suche.Text & "%')"
|
||||
If cbx_Suche_Warenort._value <> "" Then sqlSearchSting &= "AND gs_warenort like '%" & cbx_Suche_Warenort._value & "%'"
|
||||
If txtSuche.Text <> "" Then sqlSearchSting &= "AND ([gs_abfertigungsNr] Like '%" & txtSuche.Text & "%' OR [gs_ATBNr] Like '%" & txtSuche.Text & "%' OR [gs_LKWKZ] like '%" & txtSuche.Text & "%' OR [gs_avisoId] like '%" & txtSuche.Text & "%' OR [gs_freitext] like '%" & txtSuche.Text & "%')"
|
||||
If cbxRundPosanzeigen.Checked = False Then sqlSearchSting &= "AND ISNULL(gs_isRundungsdiff,0) = 0"
|
||||
End If
|
||||
|
||||
@@ -351,11 +345,11 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
If dgvGesamtsicherheit.Enabled = False Then Exit Sub
|
||||
ATBNraendernToolStripMenuItem.Visible = True
|
||||
|
||||
btnAddPos.Visible = False
|
||||
Else
|
||||
LoadDGVSicherheitsPos(-1, True)
|
||||
ATBNraendernToolStripMenuItem.Visible = False
|
||||
|
||||
'btnAddPos.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -363,20 +357,19 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
'If gsNr = "" Then Exit Sub
|
||||
|
||||
Dim sqlSearchSting As String = ""
|
||||
Dim sqlSearch As String = ""
|
||||
|
||||
If withFilterParam = True Then
|
||||
sqlSearchSting &= "And gsp_gsid In (Select gs_gsId from [tblGesamtsicherheit] where [gs_gsnr] = '" & gessicherheitID & "'"
|
||||
If txt_Suche.Text <> "" Then sqlSearchSting &= "AND ([gs_abfertigungsNr] Like '%" & txt_Suche.Text & "%' OR [gs_ATBNr] Like '%" & txt_Suche.Text & "%' OR [gs_LKWKZ] like '%" & txt_Suche.Text & "%' OR [gs_avisoId] like '%" & txt_Suche.Text & "%' OR [gs_freitext] like '%" & txt_Suche.Text & "%')"
|
||||
If cbx_Suche_Warenort._value <> "" Then sqlSearchSting &= " AND gs_warenort like '%" & cbx_Suche_Warenort._value & "%'"
|
||||
If cbxRundPosanzeigen.Checked = False Then sqlSearchSting &= "AND ISNULL(gsp_isPosRundungsdiff,0) = 0"
|
||||
sqlSearchSting &= ")"
|
||||
sqlSearch &= "And gsp_gsid In (Select gs_gsId from [tblGesamtsicherheit] where [gs_gsnr] = '" & gessicherheitID & "'"
|
||||
If txtSuche.Text <> "" Then sqlSearch &= "AND ([gs_abfertigungsNr] Like '%" & txtSuche.Text & "%' OR [gs_ATBNr] Like '%" & txtSuche.Text & "%' OR [gs_LKWKZ] like '%" & txtSuche.Text & "%' OR [gs_avisoId] like '%" & txtSuche.Text & "%' OR [gs_freitext] like '%" & txtSuche.Text & "%')"
|
||||
If cbxRundPosanzeigen.Checked = False Then sqlSearch &= "AND ISNULL(gsp_isPosRundungsdiff,0) = 0"
|
||||
sqlSearch &= ")"
|
||||
End If
|
||||
|
||||
|
||||
Dim SQLStringCRN As String =
|
||||
"select [gsp_gspPosId],[gsp_ATCNr],[gsp_datum],[gsp_gsId],[gsp_gsnr],[gsp_warenwert],[gsp_sicherheitsbetrag], [gsp_freitext]" &' ,[gsp_avisoId] ,[gsp_ust] ,[gsp_filialenNr],[gsp_abfertigungsNr] ,[gsp_MRNNr], [gsp_art]
|
||||
"From [tblGesamtsicherheitsPositionen] inner join [tblGesamtsicherheit] on gs_gsId = gsp_gsId where [gsp_gsnr] = '" & gsNr & "'" & sqlSearchSting & " order by [gs_ATBNr], [gs_posNr]"
|
||||
"From [tblGesamtsicherheitsPositionen] inner join [tblGesamtsicherheit] on gs_gsId = gsp_gsId where [gsp_gsnr] = '" & gsNr & "'" & sqlSearch & " order by [gs_ATBNr], [gs_posNr]"
|
||||
|
||||
dgvSicherheitsPos.SET_SQL(SQLStringCRN, "AVISO", ,)
|
||||
dgvSicherheitsPos.LOAD()
|
||||
@@ -427,20 +420,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Private Sub dgvSicherheitsPos_SelectionChanged(sender As Object, e As EventArgs) Handles dgvSicherheitsPos.SelectionChanged
|
||||
' If dgvSicherheitsPos.SelectedRows.Count > 0 Then
|
||||
|
||||
' indexGspPosId = CInt(dgvSicherheitsPos.SelectedRows(0).Cells("gsp_gspPosId").Value)
|
||||
' currentSPos = New cGesamtsicherheitsPositionen(indexGsId, indexGspPosId)
|
||||
|
||||
' If dgvSicherheitsPos.Enabled = False Then Exit Sub
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Sub loadTitle()
|
||||
'Dim StandortSqlString As String = "select * from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "'"
|
||||
|
||||
txtGestellInfo.Text = ""
|
||||
lblId.Text = ""
|
||||
@@ -483,8 +463,6 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Private Sub Warenwert_TextChanged(sender As Object, e As EventArgs) Handles txtSicherheitWarenwert.TextChanged, txtPosWarenwert.TextChanged
|
||||
|
||||
|
||||
|
||||
If Not IsNumeric(txtSicherheitWarenwert.Text) And sender.name = "txtSicherheitWarenwert" Then
|
||||
txtSicherheitWarenwert.ForeColor = Color.Red
|
||||
Exit Sub
|
||||
@@ -493,7 +471,6 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not IsNumeric(txtPosWarenwert.Text) And sender.name = "txtPosWarenwert" Then
|
||||
txtPosWarenwert.ForeColor = Color.Red
|
||||
Exit Sub
|
||||
@@ -600,21 +577,26 @@ Public Class frmGesamtsicherheitenNEU
|
||||
End Sub
|
||||
|
||||
Private Sub btnAddSicherheit_Click(sender As Object, e As EventArgs) Handles btnAddSicherheit.Click
|
||||
|
||||
If checkNothingValue(txtSicherheitSicherheitsbetrag.Text, "Double") IsNot Nothing Then
|
||||
Dim sichBetr As Double = Double.Parse(txtSicherheitSicherheitsbetrag.Text)
|
||||
If checkSaldo(sichBetr, True) = False Then Exit Sub
|
||||
End If
|
||||
|
||||
Dim attachPosNrToExistingATB As Boolean = False
|
||||
|
||||
Try
|
||||
|
||||
If (txtSicherheitATBNr.Text = "") Then
|
||||
txtSicherheitATBNr.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If (txtAnzahlPos.Text = "") Then
|
||||
txtAnzahlPos.Focus()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If checkNothingValue(txtSicherheitSicherheitsbetrag.Text, "Double") IsNot Nothing Then
|
||||
Dim sichBetr As Double = Double.Parse(txtSicherheitSicherheitsbetrag.Text)
|
||||
If checkSaldo(sichBetr, True) = False Then Exit Sub
|
||||
End If
|
||||
|
||||
Dim attachPosNrToExistingATB As Boolean = False
|
||||
|
||||
Dim limit As Integer = Integer.Parse(setNullToZero(txtAnzahlPos.Text))
|
||||
|
||||
|
||||
@@ -1056,7 +1038,6 @@ Public Class frmGesamtsicherheitenNEU
|
||||
cboFiliale.fillWithSQL("SELECT FilialenNr, cast(FilialenNr as varchar(4)) + ' ' + Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True)
|
||||
cboFiliale.SelectedIndex = cboFiliale.FindString(Me.FilialNummer)
|
||||
cboWarenort.fillWithSQL("SELECT [wo_warenort],CONCAT([wo_knnr],' - ' ,[wo_bezeichnung]) FROM [tblWarenorte] WHERE [wo_aktiv] ='1' AND wo_ze = 1 AND [wo_firma] = '" & firmaId & "' ORDER BY [wo_reihenfolge] ", True, "AVISO", True)
|
||||
cboWarenort.SelectedIndex = cbx_Suche_Warenort.FindString(Me.warenortID)
|
||||
txtlkwIdSearch.initSearchBox(Me.FindForm, " LKW_Nr, avisoID, CAST(datum As Date) As Datum FROM [Aviso]", {"LKW_Nr", "AvisoID", "Datum"}, "", "Datum desc", "LKW_Nr", "AvisoId", "AVISO",, 250, 200)
|
||||
txtlkwIdSearch.SET_VALUE(avisoID)
|
||||
txtAbfertNum.Text = Me.Abfertigungsnummer
|
||||
@@ -1109,7 +1090,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub btnSuche_Click(sender As Object, e As EventArgs) Handles btnSuche.Click
|
||||
Private Sub btnSuche_Click(sender As Object, e As EventArgs)
|
||||
Try
|
||||
If Me.Visible Then LoadDGVSicherheiten(True)
|
||||
Catch ex As Exception
|
||||
@@ -1121,24 +1102,19 @@ Public Class frmGesamtsicherheitenNEU
|
||||
panOverlay.Visible = True
|
||||
End Sub
|
||||
|
||||
Private Sub btn_resetSearch_Click(sender As Object, e As EventArgs) Handles btn_resetSearch.Click
|
||||
Private Sub btn_resetSearch_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim dgv As String = ""
|
||||
For Each c As DataGridViewColumn In dgvGesamtsicherheit.Columns
|
||||
dgv &= c.Width & c.HeaderText & vbCrLf
|
||||
Next
|
||||
|
||||
clearSearchFields()
|
||||
|
||||
LoadDGVSicherheiten()
|
||||
currentGesSichRef.LOAD()
|
||||
LoadStandort()
|
||||
End Sub
|
||||
|
||||
Private Sub clearSearchFields()
|
||||
cbx_Suche_Warenort.changeItem("")
|
||||
txt_Suche.Clear()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function checkSicherheitsbetrag() As Boolean
|
||||
|
||||
@@ -1152,7 +1128,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
If (offenerSicherheitsbetrag <0 Or offenerSicherheitsbetrag <offenerSicherheitsbetragPos) Then
|
||||
If (offenerSicherheitsbetrag < 0 Or offenerSicherheitsbetrag < offenerSicherheitsbetragPos) Then
|
||||
If vbYes = MsgBox("Der Warenwert der Positionen übersteigt den Warenwert der Gestellung!" & vbCrLf & "Trotzdem speichen?", vbYesNo) Then
|
||||
Return True
|
||||
Else
|
||||
@@ -1901,8 +1877,8 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
If datumPos <> Nothing And dgvGesamtsicherheit.Rows.Count > 0 Then
|
||||
If IsDate(dgvGesamtsicherheit.Rows(0).Cells("gs_datum").Value) Then
|
||||
If datumPos < dgvGesamtsicherheit.Rows(0).Cells("gs_datum").Value Then
|
||||
MsgBox("Datum/Uhrzeit der Pos-Gestellung darf zeitlich nicht vor der Gestellung liegen! (" & dgvGesamtsicherheit.Rows(0).Cells("gs_datum").Value & ")")
|
||||
If datumPos <= dgvGesamtsicherheit.Rows(0).Cells("gs_datum").Value Then
|
||||
MsgBox("Datum/Uhrzeit des Gestellungsausganges muss zeitlich nach dem Gestellungseingang liegen! (" & dgvGesamtsicherheit.Rows(0).Cells("gs_datum").Value & ")")
|
||||
checkOK = False
|
||||
End If
|
||||
End If
|
||||
@@ -1911,4 +1887,37 @@ Public Class frmGesamtsicherheitenNEU
|
||||
Return checkOK
|
||||
End Function
|
||||
|
||||
|
||||
Private Function checkMandatoryFields() As Boolean
|
||||
|
||||
Dim valuesOK As Boolean = True
|
||||
|
||||
If (txtAnzahlPos.Text = "") Then
|
||||
txtAnzahlPos.Focus()
|
||||
valuesOK = False
|
||||
End If
|
||||
|
||||
|
||||
Return valuesOK
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub txt_Suche_KeyDown(sender As Object, e As KeyEventArgs) Handles txtSuche.KeyDown
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
If txtSuche.Text <> "" Then
|
||||
If Me.Visible Then LoadDGVSicherheiten(True)
|
||||
e.Handled = True
|
||||
Else
|
||||
If Me.Visible Then LoadDGVSicherheiten(True)
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtAnzahlPos_Leave(sender As Object, e As EventArgs) Handles txtAnzahlPos.Leave
|
||||
If txtAnzahlPos.Text = "" Then
|
||||
txtAnzahlPos.Text = 1
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user