Warenort, Essensbestellungen, Datev-Export, Gesamtsicherheiten

This commit is contained in:
2023-01-17 17:11:17 +01:00
parent 5f1a2249d6
commit 6652d84799
9 changed files with 709 additions and 565 deletions

View File

@@ -1,5 +1,5 @@
Imports DocumentFormat.OpenXml.Drawing.Diagrams
Imports Org.BouncyCastle.Crypto.Modes

Imports com
Imports VERAG_PROG_ALLGEMEIN
Public Class frmWarenorte
@@ -11,7 +11,6 @@ Public Class frmWarenorte
cbxGrenzstelle.fillWithSQL("SELECT [grz_Grenzstelle],[grz_BezeichnungCBO] FROM tblGrenzstelle where grz_Aktiv=1 order by grz_Reihenfolge, grz_Grenzstelle", False, "AVISO", True)
cbxGrenzstelle.changeItem("")
cbxFirma.fillWithSQL("SELECT [Firma_id],[Firma_Bez] FROM [tblFirma] WHERE ISNULL(Firma_Warenort,0) = 1 ", False, "FMZOLL", True)
'cbxFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG"))
cbxFirmaChange.Items.AddRange(cbxFirma.Items.Cast(Of VERAG_PROG_ALLGEMEIN.MyListItem).ToArray())
End Sub
@@ -62,11 +61,13 @@ Public Class frmWarenorte
End If
End If
If Not IsDBNull(row.Cells("wo_aktiv").Value) Then
If Not row.Cells("wo_aktiv").Value Then
row.DefaultCellStyle.BackColor = Color.IndianRed
End If
If Not row.Cells("wo_aktiv").Value Then
row.DefaultCellStyle.BackColor = Color.IndianRed
End If
End If
Next
@@ -142,6 +143,8 @@ Public Class frmWarenorte
If dgvWarenorteNew.SelectedRows.Count < 1 Then
mainPanel.Enabled = False
If cbxFirma._value <> "" Then UsrcntlPDFScanList1.INIT(-1, "WARENORTE", New VERAG_PROG_ALLGEMEIN.cFirmen(cbxFirma._value).Firma_Bez.ToString)
Exit Sub
Else
mainPanel.Enabled = True
@@ -160,6 +163,26 @@ Public Class frmWarenorte
txtKennr.Text = Warenort.wo_knnr
txtReihenfolge.Text = Warenort.wo_reihenfolge
txtStrasse.Text = Warenort.wo_strasse
cxEX.Checked = IIf(IsDBNull(Warenort.wo_ex), False, Warenort.wo_ex)
cxIM.Checked = IIf(IsDBNull(Warenort.wo_im), False, Warenort.wo_im)
cxZE.Checked = IIf(IsDBNull(Warenort.wo_ze), False, Warenort.wo_ze)
cxZV.Checked = IIf(IsDBNull(Warenort.wo_zv), False, Warenort.wo_zv)
If checkIfFirmaIsFilled(False, False) = False Then
UsrcntlPDFScanList1.Enabled = False
UsrcntlPDFScanList1.INIT(-1, "WARENORTE", "")
Else
UsrcntlPDFScanList1.Enabled = True
If cbxFirma._value = "" Then
UsrcntlPDFScanList1.INIT(-1, "WARENORTE", New VERAG_PROG_ALLGEMEIN.cFirmen(Warenort.wo_firma).Firma_Bez.ToString)
End If
End If
End Sub
@@ -180,6 +203,11 @@ Public Class frmWarenorte
WarenortNew.wo_reihenfolge = txtReihenfolge.Text
WarenortNew.wo_strasse = txtStrasse.Text
WarenortNew.wo_ex = cxEX.Checked
WarenortNew.wo_im = cxIM.Checked
WarenortNew.wo_ze = cxZE.Checked
WarenortNew.wo_zv = cxZV.Checked
If cbxGrenzstelle._value = "" Then
lblWarning.Text = "Grenzstelle muss ausgewählt werden!"
Exit Sub
@@ -200,16 +228,23 @@ Public Class frmWarenorte
dgvWarenorteNew.GetOrder()
initDGVWarenort(cbxFirma._value)
dgvWarenorteNew.SetOrder()
End Sub
Private Function checkIfFirmaIsFilled(initialSave As Boolean)
Private Function checkIfFirmaIsFilled(initialSave As Boolean, Optional setWarning As Boolean = True)
If cbxFirma._value = "" Then
If (dgvWarenorteNew.SelectedRows(0).Cells("wo_firma").Value Is DBNull.Value Or dgvWarenorteNew.SelectedRows(0).Cells("wo_firma").Value Is Nothing) Or initialSave Then
If ((dgvWarenorteNew.SelectedRows(0).Cells("wo_firma").Value Is DBNull.Value Or dgvWarenorteNew.SelectedRows(0).Cells("wo_firma").Value Is Nothing Or dgvWarenorteNew.SelectedRows(0).Cells("wo_firma").Value = "") And initialSave = False) Then
If setWarning Then
lblWarning.Text = "Bitte Firma auswählen!"
Else
lblWarning.Text = ""
End If
lblWarning.Text = "Bitte Firma auswählen!"
Return False
End If
lblWarning.Text = ""
@@ -226,4 +261,5 @@ Public Class frmWarenorte
Return False
End Function
End Class