ustva, etc.
This commit is contained in:
@@ -748,6 +748,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
|
||||
USTV_POS.UStVPo_ReDat = ANTRAG.plose_RechnungsDatum
|
||||
USTV_POS.UStVPo_ReNr = ANTRAG.plose_RechnungsNr.ToString
|
||||
@@ -908,6 +909,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
|
||||
USTV_POS.UStVPo_ReDat = r.Item("Rechnungsdatum")
|
||||
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer")
|
||||
@@ -1024,6 +1026,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
USTV_POS.UStVPo_ReDat = r.Item("rmc_reDatum")
|
||||
USTV_POS.UStVPo_ReNr = r.Item("rmc_reNr").ToString
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
@@ -1135,6 +1138,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
USTV_POS.UStVPo_ReDat = r.Item("invoice_date")
|
||||
USTV_POS.UStVPo_ReNr = r.Item("invoice_number") & " - " & kdNr & IIf(Antrag_LandKz = "BE", "/Belgium", "")
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
@@ -1213,6 +1217,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
USTV_POS.UStVPo_ReDat = r.Item("Rechnungsdatum")
|
||||
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer").ToString
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
@@ -1296,6 +1301,7 @@ Public Class frmMDM_USTVAntrag
|
||||
Dim USTV_POS As New VERAG_PROG_ALLGEMEIN.cUStVPositionen
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
USTV_POS.UStVPo_ReDat = r.Item("Rechnungsdatum")
|
||||
USTV_POS.UStVPo_ReNr = r.Item("Rechnungsnummer").ToString
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
@@ -1452,6 +1458,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
USTV_POS.UStVAn_ID = USTV_ANTRAG.[UStVAn_ID]
|
||||
USTV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
USTV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
USTV_POS.UStVPo_ReDat = reDat.ToShortDateString
|
||||
USTV_POS.UStVPo_ReNr = r.Cells("invoice_id").Value.ToString
|
||||
USTV_POS.UStVPo_SchnittstellenNr = bytSchnittstellenNr
|
||||
@@ -2035,6 +2042,7 @@ Public Class frmMDM_USTVAntrag
|
||||
UstCntlUSTV_AntragPosition1.reset()
|
||||
UstCntlUSTV_AntragPosition1.UStV_POS = New cUStVPositionen(UStVAn_ID)
|
||||
UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_ID = USTV_ANTRAG.getMaxPosNr
|
||||
UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_interneNr = USTV_ANTRAG.getMaxPosinterneNr
|
||||
UstCntlUSTV_AntragPosition1.Enabled = True
|
||||
|
||||
|
||||
@@ -2050,9 +2058,9 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If UstCntlUSTV_AntragPosition1.cboSchnittstellennr._value = -1 OrElse UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_daId_loeschbar Then 'nur Dokumente löschen, die nicht über Schnittstellen geladen wurden!
|
||||
|
||||
If UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_daId < 0 Then
|
||||
If UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_daId < 0 OrElse UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_daId Is Nothing Then
|
||||
|
||||
Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MDM", "MDM", "MDM_DATEN", "USTVA_" & UstCntlUSTV_AntragPosition1.UStV_POS.UStVAn_ID & "_" & UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_ID, "SONSTIGE", USTV_ANTRAG.UStVAn_KuNr)
|
||||
Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MDM", "MDM", "MDM_DATEN", "USTVA_" & UstCntlUSTV_AntragPosition1.UStV_POS.UStVAn_ID & "_" & UstCntlUSTV_AntragPosition1.UStV_POS.UStVPo_interneNr, "SONSTIGE", USTV_ANTRAG.UStVAn_KuNr)
|
||||
|
||||
If DS IsNot Nothing Then
|
||||
DS.DELETE_COMPLETE()
|
||||
@@ -2218,6 +2226,8 @@ Public Class frmMDM_USTVAntrag
|
||||
Case 7 'RMC - neue Schnittstelle - OK
|
||||
sqlText = "Update [tblRMCImport] Set rmc_archiv=0, [rmc_archiviertDatum] = NULL, UStVAn_ID = NULL FROM [tblRMCImport] inner join adressen on adressen.WölflKundenNr = tblRMCImport.rmc_kdNr Where cast(rmc_reDatum as date) = '" & RechnungsDatum.ToShortDateString & "' And rmc_reNr = '" & RechnungsNr & "' AND adressen.AdressenNr=" & USTV_ANTRAG.UStVAn_KuNr
|
||||
If Not test Then updated = SQL.doSQL(sqlText, "FMZOLL")
|
||||
sqlText = "Update [tblRMCImport] Set rmc_archiv=0, [rmc_archiviertDatum] = NULL, UStVAn_ID = NULL FROM [tblRMCImport] inner join adressen on adressen.weitereWölflKundenNr = tblRMCImport.rmc_kdNr Where cast(rmc_reDatum as date) = '" & RechnungsDatum.ToShortDateString & "' And rmc_reNr = '" & RechnungsNr & "' AND adressen.AdressenNr=" & USTV_ANTRAG.UStVAn_KuNr
|
||||
If Not test Then updated = SQL.doSQL(sqlText, "FMZOLL")
|
||||
Case 8, 12 'IDS neue Schnittstelle - OK
|
||||
sqlText = "update tblIDSTransactionsNew set UStVAn_ID = NULL
|
||||
From tblIDSTransactionsNew
|
||||
@@ -2925,6 +2935,7 @@ Public Class frmMDM_USTVAntrag
|
||||
UstCntlUSTV_AntragErstattungen1.reset()
|
||||
UstCntlUSTV_AntragErstattungen1.UStV_ERS = New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen()
|
||||
UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVEr_ID = USTV_ANTRAG.getMaxPosNrErst()
|
||||
UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVEr_interneNr = USTV_ANTRAG.getMaxinternePosNrErst()
|
||||
UstCntlUSTV_AntragErstattungen1.Enabled = True
|
||||
|
||||
End Sub
|
||||
@@ -2938,7 +2949,7 @@ Public Class frmMDM_USTVAntrag
|
||||
|
||||
If UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVEr_daId < 0 Then
|
||||
|
||||
Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MDM", "MDM", "MDM_DATEN", "USTVERS_" & UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVAn_ID & "_" & UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVEr_ID, "SONSTIGE", USTV_ANTRAG.UStVAn_KuNr)
|
||||
Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "MDM", "MDM", "MDM_DATEN", "USTVERS_" & UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVAn_ID & "_" & UstCntlUSTV_AntragErstattungen1.UStV_ERS.UStVEr_interneNr, "SONSTIGE", USTV_ANTRAG.UStVAn_KuNr)
|
||||
|
||||
If DS IsNot Nothing Then
|
||||
DS.DELETE_COMPLETE()
|
||||
|
||||
@@ -224,11 +224,11 @@ Public Class frmUSTVoffeneAntraege
|
||||
|
||||
Dim sqlstring = "Select " & top & " [rmc_kdNr], [rmc_kdName], [rmc_landKZ], [rmc_reDatum], [rmc_reNr], [rmc_waehrung], [rmc_betragMWST],rmc_daid as daId FROM [tblRMCImport]
|
||||
INNER JOIN Adressen on WölflKundenNr=[rmc_kdNr]
|
||||
where rmc_reDatum >= '" & dat_Sum_Von.Value & "' And rmc_reDatum < '" & dat_Sum_Bis.Value & "' And rmc_archiv <> 1 AND [rmc_betragMWST] <> 0 " & sqlwhere
|
||||
where rmc_reDatum >= '" & dat_Sum_Von.Value & "' And rmc_reDatum <= '" & dat_Sum_Bis.Value & "' And rmc_archiv <> 1 AND [rmc_betragMWST] <> 0 " & sqlwhere
|
||||
|
||||
sqlstring &= " UNION ALL Select " & top & " [rmc_kdNr], [rmc_kdName], [rmc_landKZ], [rmc_reDatum], [rmc_reNr], [rmc_waehrung], [rmc_betragMWST],rmc_daid as daId FROM [tblRMCImport]
|
||||
INNER JOIN Adressen on weitereWölflKundenNr=[rmc_kdNr]
|
||||
where rmc_reDatum >= '" & dat_Sum_Von.Value & "' And rmc_reDatum < '" & dat_Sum_Bis.Value & "' And rmc_archiv <> 1 AND [rmc_betragMWST] <> 0 " & sqlwhere
|
||||
where rmc_reDatum >= '" & dat_Sum_Von.Value & "' And rmc_reDatum <= '" & dat_Sum_Bis.Value & "' And rmc_archiv <> 1 AND [rmc_betragMWST] <> 0 " & sqlwhere
|
||||
|
||||
.SET_SQL(sqlstring, "FMZOLL")
|
||||
.LOAD()
|
||||
|
||||
@@ -110,7 +110,7 @@ Public Class ustCntlUSTV_AntragPosition
|
||||
scanSonstiges.Enabled = UStV_POS.UStVPo_daId_loeschbar 'Not UStV_POS.UStVPo_SchnittstellenNr > 0
|
||||
btnAPIUbload.Enabled = True 'hochladbar aber nicht einfügen lassen! UStV_POS.UStVPo_daId_loeschbar
|
||||
Else
|
||||
scanSonstiges.INIT(kdnr, "MDM", "MDM_DATEN", "USTVA_" & UStV_POS.UStVAn_ID & "_" & UStV_POS.UStVPo_ID)
|
||||
scanSonstiges.INIT(kdnr, "MDM", "MDM_DATEN", "USTVA_" & UStV_POS.UStVAn_ID & "_" & UStV_POS.UStVPo_interneNr)
|
||||
'scanSonstiges.INIT_daId(da_id)
|
||||
scanSonstiges.Enabled = True
|
||||
btnAPIUbload.Enabled = False
|
||||
|
||||
@@ -67,7 +67,7 @@ Public Class ustCntlUSTV_ErstattungPosition
|
||||
If UStV_ERS.UStVEr_daId IsNot Nothing AndAlso UStV_ERS.UStVEr_daId > 0 Then
|
||||
scanSonstigesErst.INIT_daId(UStV_ERS.UStVEr_daId)
|
||||
Else
|
||||
scanSonstigesErst.INIT(kdNr, "MDM", "MDM_DATEN", "USTVERS_" & UStV_ERS.UStVAn_ID & "_" & UStV_ERS.UStVEr_ID)
|
||||
scanSonstigesErst.INIT(kdNr, "MDM", "MDM_DATEN", "USTVERS_" & UStV_ERS.UStVAn_ID & "_" & UStV_ERS.UStVEr_interneNr)
|
||||
End If
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ Public Class ustCntlUSTV_ErstattungPosition
|
||||
If UStV_ERS Is Nothing Then
|
||||
UStV_ERS = New VERAG_PROG_ALLGEMEIN.cUStVErstattungPositionen()
|
||||
UStV_ERS.UStVEr_ID = UstV_AN.getMaxPosNrErst
|
||||
UStV_ERS.UStVEr_interneNr = UstV_AN.getMaxinternePosNrErst
|
||||
End If
|
||||
|
||||
UStV_ERS.UStVEr_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
|
||||
@@ -1391,8 +1391,14 @@ Public Class frmBelegNeu
|
||||
MsgBox(response)
|
||||
If returnCode = 0 Then 'Zahlung wurde erfolgreich durchgeführt
|
||||
setRKSV()
|
||||
ElseIf returnCode = 1000 Then 'Workaround, wenn nicht in Registry geschrieben wurden konnte.
|
||||
If vbYes = MsgBox("In der Registry wurde der Returncode 1000 abgegeben! " & vbNewLine & "Wurde die Zahlung dennoch vom Zahlungsterminal erfolgreich durchgeführt, dann mit Ja bestätigen", MsgBoxStyle.YesNoCancel) Then
|
||||
setRKSV()
|
||||
Else
|
||||
Me.Cursor = Cursors.Default
|
||||
End If
|
||||
Else
|
||||
Me.Cursor = Cursors.Default
|
||||
Me.Cursor = Cursors.Default
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1408,15 +1414,16 @@ Public Class frmBelegNeu
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
dt = SQL.loadDgvBySql("SELECT * FROM tblRKSV_POS WHERE [pos_aktiv] = 1 AND [pos_kasse]='" & cboKassen.SelectedItem.Value & "'", "FMZOLL")
|
||||
dt = SQL.loadDgvBySql("SELECT * FROM tblRKSV_POS WHERE [pos_aktiv] = 1 And [pos_kasse]='" & cboKassen.SelectedItem.Value & "'", "FMZOLL")
|
||||
|
||||
Select Case dt.Rows.Count
|
||||
Select Case dt.Rows.Count
|
||||
Case 0
|
||||
MsgBox("Für diese Kasse ist kein aktives POS-Terminal hinterlegt!")
|
||||
Case 1
|
||||
If Not printRoutine() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
SetRegEntries()
|
||||
|
||||
Case Else
|
||||
@@ -1488,6 +1495,7 @@ Public Class frmBelegNeu
|
||||
Else
|
||||
ZVTKey.SetValue("Kassedruck", 0, RegistryValueKind.DWord)
|
||||
End If
|
||||
|
||||
ZVTKey.SetValue("Ergebnis", 1000, RegistryValueKind.DWord) ' Zur Sicherheit, falls EasyZVT gar nicht installiert ist oder nicht gestartet werden kann
|
||||
ZVTKey.SetValue("ErgebnisText", "EasyZVT konnte nicht gestartet werden", RegistryValueKind.String)
|
||||
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
Imports System.Data.OleDb
|
||||
Imports System.IO
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports itextsharp.text.pdf
|
||||
Imports MDM_Worker
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmMDMDatenverarbetiung
|
||||
|
||||
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (
|
||||
ByVal hwnd As IntPtr,
|
||||
ByVal wMsg As Integer,
|
||||
ByVal wParam As Boolean,
|
||||
ByVal lParam As Integer) As Integer
|
||||
|
||||
Const WM_SETREDRAW As Integer = 11
|
||||
|
||||
Public LIEFERANT = ""
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
' Dim ProduktCode_NOT_IN = "SELECT plp_ProductCode FROM [tblPLOSE_Produktbeschreibung] WHERE [plp_einarbeiten]=0 "
|
||||
@@ -3729,7 +3738,6 @@ Public Class frmMDMDatenverarbetiung
|
||||
Panel2.Enabled = cbx.Checked
|
||||
End Sub
|
||||
|
||||
|
||||
Function pruefData_PLOSE() As Boolean
|
||||
|
||||
pruefData_PLOSE = True
|
||||
@@ -3750,85 +3758,207 @@ Public Class frmMDMDatenverarbetiung
|
||||
|
||||
checkFixeTaxeImOffert("PLOSE", VERAGKdNr_DT)
|
||||
|
||||
'------------------------------------------ALT--------------------------------------------------
|
||||
'------------------------------------------ALT--------------------------------------------------
|
||||
'------------------------------------------ALT--------------------------------------------------
|
||||
|
||||
'For Each r As DataGridViewRow In MyDatagridview1.Rows
|
||||
' 'KUNDEN-NR / PLOSE KD-NR
|
||||
' results = VERAGKdNr_DT.Select("PLOSEKundenNr = '" & r.Cells("plose_POLSEKundennummer").Value & "'")
|
||||
' If results.Length > 0 Then
|
||||
' 'Gefunden!
|
||||
' r.Cells("VERAGKdNr").Value = results(0)("PLOSEKundenNr")
|
||||
' r.Cells("VERAGKdNr").Style.BackColor = Color.MintCream
|
||||
' VERAGKdNr = results(0)("AdressenNr")
|
||||
' found = True
|
||||
' Else
|
||||
' r.Cells("VERAGKdNr").Style.BackColor = Color.PapayaWhip
|
||||
' pruefData_PLOSE = False
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' 'VERAG/PLOSE LEISTUNG
|
||||
' results = VERAGLeistungsNr_DT.Select("plp_ProductCode = '" & r.Cells("plose_ProduktCode").Value & "' AND plp_LeistungsNr is not null")
|
||||
' If results.Length > 0 Then
|
||||
' 'Gefunden!
|
||||
' VERAGLeistungsNr = results(0)("plp_LeistungsNr")
|
||||
' r.Cells("VERAGLeistungsNr").Value = results(0)("plp_LeistungsNr")
|
||||
' r.Cells("VERAGLeistungsNr").Style.BackColor = Color.MintCream
|
||||
' found = True
|
||||
' Else
|
||||
' r.Cells("VERAGLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
' pruefData_PLOSE = False
|
||||
' End If
|
||||
|
||||
|
||||
' 'VERAG OFFERT 80
|
||||
' 'Default -> Nicht gefunden
|
||||
' 'Dim OffertenNr_DT = SQL.loadDgvBySql("SELECT KundenNr,OffertenNr FROM [Offerten] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "'", "FMZOLL")
|
||||
' results = OffertenNr_DT.Select("KundenNr = '" & VERAGKdNr & "'")
|
||||
' If results.Length > 0 Then
|
||||
' 'Gefunden!
|
||||
' r.Cells("KundeOffertenNr").Value = results(0)("OffertenNr")
|
||||
' r.Cells("KundeOffertenNr").Style.BackColor = Color.MintCream
|
||||
' Else
|
||||
' pruefData_PLOSE = False
|
||||
' r.Cells("KundeOffertenNr").Style.BackColor = Color.PapayaWhip
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' 'VERAG LEISTUNGS-NR
|
||||
' 'Default -> Nicht gefunden
|
||||
' 'Dim KundeLeistungsNr_DT = SQL.loadDgvBySql("SELECT [LeistungsNr],KundenNr FROM [Offertenpositionen] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'", "FMZOLL")
|
||||
' results = KundeLeistungsNr_DT.Select("KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'")
|
||||
' If results.Length > 0 Then
|
||||
' 'Gefunden!
|
||||
' r.Cells("KundeLeistungsNr").Value = VERAGLeistungsNr
|
||||
' r.Cells("KundeLeistungsNr").Style.BackColor = Color.MintCream
|
||||
' Else
|
||||
' r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
' pruefData_PLOSE = False
|
||||
' End If
|
||||
|
||||
' If cnt Mod 5 = 0 Then
|
||||
' lblProzPruef.Text = CInt(cnt / cntTotal * 100) & " %"
|
||||
' lblProzPruef.Refresh()
|
||||
' 'Me.Refresh()
|
||||
' End If
|
||||
|
||||
' cnt += 1
|
||||
|
||||
'Next
|
||||
|
||||
''lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %" '100
|
||||
''lblProzPruef.Refresh()
|
||||
'Me.Refresh()
|
||||
|
||||
|
||||
|
||||
|
||||
'------------------------------------------NEU--------------------------------------------------
|
||||
'------------------------------------------NEU--------------------------------------------------
|
||||
'------------------------------------------NEU--------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
'MyDatagridview1.SuspendLayout()
|
||||
|
||||
Dim dictPloseKunden = VERAGKdNr_DT.AsEnumerable().
|
||||
GroupBy(Function(x) x("PLOSEKundenNr").ToString()).
|
||||
ToDictionary(Function(g) g.Key, Function(g) g.First())
|
||||
|
||||
Dim dictProdukt = VERAGLeistungsNr_DT.AsEnumerable().
|
||||
GroupBy(Function(x) x("plp_ProductCode").ToString()).
|
||||
ToDictionary(Function(g) g.Key,
|
||||
Function(g) g.First())
|
||||
|
||||
|
||||
Dim dictOfferte =
|
||||
OffertenNr_DT.AsEnumerable().
|
||||
GroupBy(Function(x) x("KundenNr").ToString()).
|
||||
ToDictionary(Function(g) g.Key,
|
||||
Function(g) g.First()("OffertenNr"))
|
||||
|
||||
Dim dictLeistung =
|
||||
KundeLeistungsNr_DT.AsEnumerable().
|
||||
GroupBy(Function(x) x("KundenNr").ToString()).
|
||||
ToDictionary(Function(g) g.Key,
|
||||
Function(g) g.Select(Function(r) r("LeistungsNr").ToString()).
|
||||
ToHashSet())
|
||||
|
||||
|
||||
SendMessage(MyDatagridview1.Handle, WM_SETREDRAW, False, 0)
|
||||
SuspendPainting(MyDatagridview1)
|
||||
|
||||
|
||||
For Each r As DataGridViewRow In MyDatagridview1.Rows
|
||||
'KUNDEN-NR / PLOSE KD-NR
|
||||
results = VERAGKdNr_DT.Select("PLOSEKundenNr = '" & r.Cells("plose_POLSEKundennummer").Value & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("VERAGKdNr").Value = results(0)("PLOSEKundenNr")
|
||||
|
||||
Dim ploseKunde = r.Cells("plose_POLSEKundennummer").Value?.ToString()
|
||||
Dim produktCode = r.Cells("plose_ProduktCode").Value?.ToString()
|
||||
|
||||
'KD lookup
|
||||
Dim rowKd As DataRow = Nothing
|
||||
If dictPloseKunden.TryGetValue(ploseKunde, rowKd) Then
|
||||
r.Cells("VERAGKdNr").Value = rowKd("PLOSEKundenNr")
|
||||
VERAGKdNr = CInt(rowKd("AdressenNr"))
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.MintCream
|
||||
VERAGKdNr = results(0)("AdressenNr")
|
||||
found = True
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
r.Cells("VERAGKdNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'VERAG/PLOSE LEISTUNG
|
||||
results = VERAGLeistungsNr_DT.Select("plp_ProductCode = '" & r.Cells("plose_ProduktCode").Value & "' AND plp_LeistungsNr is not null")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
VERAGLeistungsNr = results(0)("plp_LeistungsNr")
|
||||
r.Cells("VERAGLeistungsNr").Value = results(0)("plp_LeistungsNr")
|
||||
'Produkt lookup
|
||||
Dim rowProdukt As DataRow = Nothing
|
||||
If dictProdukt.TryGetValue(produktCode, rowProdukt) Then
|
||||
VERAGLeistungsNr = CInt(rowProdukt("plp_LeistungsNr"))
|
||||
r.Cells("VERAGLeistungsNr").Value = VERAGLeistungsNr
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.MintCream
|
||||
found = True
|
||||
Else
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
r.Cells("VERAGLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
|
||||
'VERAG OFFERT 80
|
||||
'Default -> Nicht gefunden
|
||||
'Dim OffertenNr_DT = SQL.loadDgvBySql("SELECT KundenNr,OffertenNr FROM [Offerten] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "'", "FMZOLL")
|
||||
results = OffertenNr_DT.Select("KundenNr = '" & VERAGKdNr & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("KundeOffertenNr").Value = results(0)("OffertenNr")
|
||||
'Offerte 80 lookup
|
||||
Dim offered80 As Object = Nothing
|
||||
If dictOfferte.TryGetValue(VERAGKdNr.ToString(), offered80) Then
|
||||
r.Cells("KundeOffertenNr").Value = offered80
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
pruefData_PLOSE = False
|
||||
r.Cells("KundeOffertenNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
'Leistung lookup
|
||||
Dim setLeist As HashSet(Of String) = Nothing
|
||||
If dictLeistung.TryGetValue(VERAGKdNr.ToString(), setLeist) AndAlso
|
||||
setLeist.Contains(VERAGLeistungsNr.ToString()) Then
|
||||
|
||||
|
||||
'VERAG LEISTUNGS-NR
|
||||
'Default -> Nicht gefunden
|
||||
'Dim KundeLeistungsNr_DT = SQL.loadDgvBySql("SELECT [LeistungsNr],KundenNr FROM [Offertenpositionen] where OffertenNr = 80 AND KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'", "FMZOLL")
|
||||
results = KundeLeistungsNr_DT.Select("KundenNr = '" & VERAGKdNr & "' AND LeistungsNr = '" & VERAGLeistungsNr & "'")
|
||||
If results.Length > 0 Then
|
||||
'Gefunden!
|
||||
r.Cells("KundeLeistungsNr").Value = VERAGLeistungsNr
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.MintCream
|
||||
Else
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
pruefData_PLOSE = False
|
||||
r.Cells("KundeLeistungsNr").Style.BackColor = Color.PapayaWhip
|
||||
End If
|
||||
|
||||
If cnt Mod 5 = 0 Then
|
||||
'UI update alle 100 Zeilen statt 5
|
||||
If cnt Mod 100 = 0 Then
|
||||
lblProzPruef.Text = CInt(cnt / cntTotal * 100) & " %"
|
||||
lblProzPruef.Refresh()
|
||||
'Me.Refresh()
|
||||
End If
|
||||
|
||||
cnt += 1
|
||||
|
||||
Next
|
||||
ResumePainting(MyDatagridview1)
|
||||
SendMessage(MyDatagridview1.Handle, WM_SETREDRAW, True, 0)
|
||||
MyDatagridview1.Refresh()
|
||||
|
||||
'lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %" '100
|
||||
'lblProzPruef.Refresh()
|
||||
lblProzPruef.Text = CInt(cnt / MyDatagridview1.Rows.Count() * 100) & " %" '100
|
||||
lblProzPruef.Refresh()
|
||||
Me.Refresh()
|
||||
|
||||
|
||||
MyDatagridview1.SuspendLayout()
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
pruefData_PLOSE = False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub SuspendPainting(ByVal parent As Control)
|
||||
SendMessage(parent.Handle, WM_SETREDRAW, False, 0)
|
||||
End Sub
|
||||
|
||||
Public Sub ResumePainting(ByVal parent As Control)
|
||||
SendMessage(parent.Handle, WM_SETREDRAW, True, 0)
|
||||
parent.Refresh()
|
||||
End Sub
|
||||
|
||||
Function pruefData_ASFINAG() As Boolean
|
||||
pruefData_ASFINAG = True
|
||||
Try
|
||||
@@ -4911,4 +5041,6 @@ RabattBerechnen:
|
||||
initDgv_IDS()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -278,6 +278,18 @@ Public Class cUSTVAntrag
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
Public Function getMaxPosinterneNr() As Integer
|
||||
Try
|
||||
Dim maxPosNr = -1
|
||||
|
||||
Return SQL.getValueTxtBySql("SELECT isnull(max([UStVPo_interneNr]),0)+1 FROM [tblUStVPositionen] where UStVAn_ID='" & UStVAn_ID & "'", "FMZOLL",,, "1")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
Public Function getMaxPosNrErst() As Integer
|
||||
Try
|
||||
Dim maxPosNr = -1
|
||||
@@ -290,6 +302,18 @@ Public Class cUSTVAntrag
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
Public Function getMaxinternePosNrErst() As Integer
|
||||
Try
|
||||
Dim maxPosNr = -1
|
||||
|
||||
Return SQL.getValueTxtBySql("SELECT isnull(max([UStVEr_interneNr]),0)+1 FROM [tblUStVErstattung] where UStVAn_ID='" & UStVAn_ID & "'", "FMZOLL",,, "1")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function DELETE() As Boolean
|
||||
@@ -323,6 +347,8 @@ Public Class cUStVPositionen
|
||||
Property UStVPo_LeistenderId As Integer '
|
||||
Property UStVPo_VZ As Boolean = False
|
||||
Property UStVPo_VZ_RKID As Object = Nothing '
|
||||
Property UStVPo_interneNr As Integer
|
||||
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
@@ -439,6 +465,7 @@ Public Class cUStVPositionen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_LeistenderId", UStVPo_LeistenderId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_VZ", UStVPo_VZ))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_VZ_RKID", UStVPo_VZ_RKID))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVPo_interneNr", UStVPo_interneNr))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -496,6 +523,7 @@ Public Class cUStVErstattungPositionen
|
||||
Property UStVEr_Sachbearbeiter As Object = Nothing
|
||||
Property UStVEr_Zeitstempel As Object = Nothing
|
||||
Property UStVEr_daId As Object = Nothing
|
||||
Property UStVEr_interneNr As Integer
|
||||
|
||||
Public hasEntry = False
|
||||
|
||||
@@ -521,6 +549,7 @@ Public Class cUStVErstattungPositionen
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_Sachbearbeiter", UStVEr_Sachbearbeiter))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_Zeitstempel", UStVEr_Zeitstempel))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_daId", UStVEr_daId))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStVEr_interneNr", UStVEr_interneNr))
|
||||
Return list
|
||||
End Function
|
||||
|
||||
@@ -646,6 +675,18 @@ Public Class cUStVErstattungPositionen
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
Public Function getMaxInternePosNr() As Integer
|
||||
Try
|
||||
Dim maxPosNr = -1
|
||||
|
||||
Return SQL.getValueTxtBySql("SELECT isnull(max([UStVEr_interneNr]),0)+1 FROM [tblUStVErstattung] where UStVAn_ID='" & UStVAn_ID & "'", "FMZOLL",,, "1")
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
Return -1
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
28
VERAG_PROG_ALLGEMEIN/frmDatumsabfrage.Designer.vb
generated
28
VERAG_PROG_ALLGEMEIN/frmDatumsabfrage.Designer.vb
generated
@@ -27,13 +27,13 @@ Partial Class frmDatumsabfrage
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
|
||||
Me.pnlKunde = New System.Windows.Forms.Panel()
|
||||
Me.cbxKunden = New System.Windows.Forms.CheckBox()
|
||||
Me.cboKundenkreis = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.dtp_date = New System.Windows.Forms.DateTimePicker()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.btn = New System.Windows.Forms.Button()
|
||||
Me.lbl = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.cbxKunden = New System.Windows.Forms.CheckBox()
|
||||
Me.MyPanel1.SuspendLayout()
|
||||
Me.pnlKunde.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
@@ -51,7 +51,7 @@ Partial Class frmDatumsabfrage
|
||||
Me.MyPanel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.MyPanel1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.MyPanel1.Name = "MyPanel1"
|
||||
Me.MyPanel1.Size = New System.Drawing.Size(264, 84)
|
||||
Me.MyPanel1.Size = New System.Drawing.Size(286, 84)
|
||||
Me.MyPanel1.TabIndex = 3
|
||||
'
|
||||
'pnlKunde
|
||||
@@ -64,6 +64,15 @@ Partial Class frmDatumsabfrage
|
||||
Me.pnlKunde.TabIndex = 26
|
||||
Me.pnlKunde.Visible = False
|
||||
'
|
||||
'cbxKunden
|
||||
'
|
||||
Me.cbxKunden.AutoSize = True
|
||||
Me.cbxKunden.Location = New System.Drawing.Point(12, 9)
|
||||
Me.cbxKunden.Name = "cbxKunden"
|
||||
Me.cbxKunden.Size = New System.Drawing.Size(15, 14)
|
||||
Me.cbxKunden.TabIndex = 5
|
||||
Me.cbxKunden.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboKundenkreis
|
||||
'
|
||||
Me.cboKundenkreis._allowedValuesFreiText = Nothing
|
||||
@@ -99,7 +108,7 @@ Partial Class frmDatumsabfrage
|
||||
Me.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnClose.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!, System.Drawing.FontStyle.Bold)
|
||||
Me.btnClose.ForeColor = System.Drawing.Color.White
|
||||
Me.btnClose.Location = New System.Drawing.Point(231, 0)
|
||||
Me.btnClose.Location = New System.Drawing.Point(253, 0)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.RightToLeft = System.Windows.Forms.RightToLeft.Yes
|
||||
Me.btnClose.Size = New System.Drawing.Size(31, 20)
|
||||
@@ -111,7 +120,7 @@ Partial Class frmDatumsabfrage
|
||||
'
|
||||
Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btn.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!)
|
||||
Me.btn.Location = New System.Drawing.Point(197, 48)
|
||||
Me.btn.Location = New System.Drawing.Point(219, 52)
|
||||
Me.btn.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btn.Name = "btn"
|
||||
Me.btn.Size = New System.Drawing.Size(57, 22)
|
||||
@@ -136,20 +145,11 @@ Partial Class frmDatumsabfrage
|
||||
Me.Label1.Size = New System.Drawing.Size(132, 18)
|
||||
Me.Label1.TabIndex = 6
|
||||
'
|
||||
'cbxKunden
|
||||
'
|
||||
Me.cbxKunden.AutoSize = True
|
||||
Me.cbxKunden.Location = New System.Drawing.Point(12, 9)
|
||||
Me.cbxKunden.Name = "cbxKunden"
|
||||
Me.cbxKunden.Size = New System.Drawing.Size(15, 14)
|
||||
Me.cbxKunden.TabIndex = 5
|
||||
Me.cbxKunden.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmDatumsabfrage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(264, 84)
|
||||
Me.ClientSize = New System.Drawing.Size(286, 84)
|
||||
Me.Controls.Add(Me.MyPanel1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
|
||||
Me.Name = "frmDatumsabfrage"
|
||||
|
||||
Reference in New Issue
Block a user