Feature_Gesamtsicherheiten
This commit is contained in:
@@ -14,6 +14,8 @@ Public Class frmGesamtsicherheitenMenu
|
||||
'Public ATR As Boolean = False
|
||||
Public Property Standort As String = ""
|
||||
Private Sub frmGesamtsicherheiten_Menu_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
cbxStandort.fillWithSQL("SELECT FilialenNr, cast(FilialenNr as varchar(4)) + ' ' + Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True)
|
||||
cbxWarenort.fillWithSQL("SELECT [grz_Grenzstelle], [grz_Bezeichnung] FROM [tblGrenzstelle] WHERE [grz_Aktiv] ='1' AND [grz_Warenort] ='1' ORDER BY [grz_Reihenfolge] ", True, "AVISO", True)
|
||||
Me.Text = "Gesamtsicherheiten " & Standort
|
||||
frmHauptfenster.EnableDoubleBuffered(dgvListe)
|
||||
GesSichRef = New VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz(Standort)
|
||||
@@ -25,13 +27,15 @@ Public Class frmGesamtsicherheitenMenu
|
||||
|
||||
txtVon.Text = Date.Today.AddDays(-30).ToString("dd.MM.yyyy")
|
||||
txtbis.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
'ShowStandort()
|
||||
ShowStandort()
|
||||
LoadDGV()
|
||||
End Sub
|
||||
|
||||
Public Function LoadDGV()
|
||||
Dim sqladdon As String = ""
|
||||
If chkOffen.Checked Then sqladdon &= " AND gs_Sicherheitssaldo != '0,00 €'"
|
||||
If cbxStandort._value <> "" Then sqladdon &= " AND gs_filialenNr = '" & cbxStandort._value.ToString & "'"
|
||||
If cbxWarenort._value <> "" Then sqladdon &= " AND gs_warenort = '" & cbxWarenort._value.ToString & "'"
|
||||
|
||||
' Dim sqlstring As String = "select * from (Select GesamtsichNr, MIN(Standort) as Standort, MIN(FilialNummer) as FilialNummer, min(Abfertigungsnummer) as Abfertigungsnummer,
|
||||
'max(LKWID) as LKWID, min (MakeDate) as Datum, FORMAT(SUM(
|
||||
@@ -46,7 +50,7 @@ Public Class frmGesamtsicherheitenMenu
|
||||
'order by GesamtsichNr"
|
||||
|
||||
Dim sqlstring As String =
|
||||
" select * from (Select gs_gsNr as gs_gsnr, MIN(gs_standort) as gs_standort, MIN(gs_filialNr) as gs_filialNr, min(gs_abfertigungsNr) as gs_abfertigungsNr,
|
||||
" select * from (Select gs_gsNr as gs_gsnr, MIN(gs_standort) as gs_standort, MIN(gs_warenort) as gs_warenort, MIN(gs_filialenNr) as gs_filialenNr, min(gs_abfertigungsNr) as gs_abfertigungsNr,
|
||||
max(gs_LKWID) as gs_LKWID, min (gs_datum) as gs_datum, FORMAT(SUM(
|
||||
Case
|
||||
when gs_art = 'Open' then (gs_sicherheitsbetrag * -1)
|
||||
@@ -56,8 +60,9 @@ Public Class frmGesamtsicherheitenMenu
|
||||
From (select * from (select gs_gsNr as ding from [tblGesamtsicherheit] where
|
||||
gs_freitext like '%" & txtSuchbegriff.Text & "%' OR
|
||||
gs_abfertigungsNr like '%" & txtSuchbegriff.Text & "%' OR
|
||||
gs_kennNr like '%" & txtSuchbegriff.Text & "%' OR
|
||||
gs_LKWID like '%" & txtSuchbegriff.Text & "%'
|
||||
gs_ATBNr like '%" & txtSuchbegriff.Text & "%' OR
|
||||
gs_LKWID like '%" & txtSuchbegriff.Text & "%' OR
|
||||
gs_warenort like '%" & txtSuchbegriff.Text & "%'
|
||||
) as tb1 left join [tblGesamtsicherheit] as tb2 on tb1.ding = tb2.gs_gsNr) as meh group by gs_gsNr) as meh2
|
||||
Where gs_standort = '" & Standort & "' " & sqladdon & "
|
||||
AND gs_datum > '" & Date.Parse(txtVon.Text) & "'
|
||||
@@ -72,12 +77,15 @@ Public Class frmGesamtsicherheitenMenu
|
||||
.Columns("gs_standort").Visible = False
|
||||
.Columns("gs_gsnr").HeaderText = "#"
|
||||
.Columns("gs_gsnr").Width = 36
|
||||
.Columns("gs_filialNr").HeaderText = "Filiale"
|
||||
.Columns("gs_filialNr").Width = 43
|
||||
.Columns("gs_filialenNr").HeaderText = "Filiale"
|
||||
.Columns("gs_filialenNr").Width = 43
|
||||
.Columns("gs_abfertigungsNr").HeaderText = "Abfert.Nr."
|
||||
.Columns("gs_abfertigungsNr").Width = 107
|
||||
.Columns("gs_datum").Width = 112
|
||||
.Columns("gs_SicherheitsSaldo").Width = 96
|
||||
.Columns("gs_SicherheitsSaldo").Width = 106
|
||||
.Columns("gs_Warenort").Width = 96
|
||||
.Columns("gs_Warenort").HeaderText = "Warenort"
|
||||
|
||||
End With
|
||||
|
||||
For Each row As DataGridViewRow In dgvListe.Rows
|
||||
@@ -108,8 +116,9 @@ Public Class frmGesamtsicherheitenMenu
|
||||
.Standort = Me.Standort
|
||||
.datum = dgvListe.CurrentRow.Cells("gs_datum").Value
|
||||
.LKWID = dgvListe.CurrentRow.Cells("gs_LKWID").Value
|
||||
.FilialNummer = dgvListe.CurrentRow.Cells("gs_filialNr").Value
|
||||
.FilialNummer = dgvListe.CurrentRow.Cells("gs_filialenNr").Value
|
||||
.Abfertigungsnummer = dgvListe.CurrentRow.Cells("gs_abfertigungsNr").Value
|
||||
.warenortID = dgvListe.CurrentRow.Cells("gs_warenort").Value
|
||||
End With
|
||||
|
||||
AddHandler frm.FormClosing, Function()
|
||||
@@ -164,6 +173,9 @@ Public Class frmGesamtsicherheitenMenu
|
||||
txtSuchbegriff.Text = "" : chkOffen.Checked = True
|
||||
txtVon.Text = Date.Today.AddDays(-30).ToString("dd.MM.yyyy")
|
||||
txtbis.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
cbxStandort._value = ""
|
||||
cbxWarenort._value = ""
|
||||
btnSucheStarten_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub MyTextBox1_TextChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user