Merge branch 'newMaster2024' of https://git.it.verag.ag/edv/SDL into newMaster2024
This commit is contained in:
@@ -8,23 +8,18 @@ Public Class KdSearchBox
|
||||
Inherits System.Windows.Forms.TextBox
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
' Dim sql As New SDL.SQL
|
||||
' Dim KUNDENSQL As New SDL.kundenSQL
|
||||
Dim form As Form = Me.FindForm
|
||||
'Public KdData As SDL.cKundenFMZOLL
|
||||
|
||||
Public KdData_KUNDE As cKunde = Nothing
|
||||
Public KdData_ADRESSEN As cAdressen = Nothing
|
||||
Public KdData_KUNDE_ERW As cKundenErweitert = Nothing
|
||||
|
||||
Public Property searchActive As Boolean = True
|
||||
Public Property _AllowSetValue As Boolean = False
|
||||
Public Property _displayFullName As Boolean = False ' nur wenn _loadKdData
|
||||
Public Property _display_Name1 As Boolean = False ' nur wenn _loadKdData
|
||||
|
||||
Public Property _ValueKdAndName As Boolean = True
|
||||
Public Property _searchName1 As Boolean = True
|
||||
Public Property _loadKdData As Boolean = False
|
||||
|
||||
Public Property _hideIfListEmpty As Boolean = True
|
||||
Public Property _displayWoelflKd As Boolean = False
|
||||
Public Property _displayAVISO_Email As Boolean = False
|
||||
@@ -80,7 +75,11 @@ Public Class KdSearchBox
|
||||
KdSearchBox_KeyUp(Me, New KeyEventArgs(Keys.Space))
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
Public Sub RESARCH(Kundenlimit As Integer)
|
||||
KdSearchBox_KeyUp(Me, New KeyEventArgs(Keys.Space), Kundenlimit)
|
||||
End Sub
|
||||
|
||||
Private Sub KdSearchBox_KeyUp(sender As Object, e As KeyEventArgs, Optional topKunden As Integer = 10) Handles Me.KeyUp
|
||||
Try
|
||||
'Console.WriteLine(String.Format("TEEST 01"))
|
||||
If Not searchActive Then Exit Sub
|
||||
@@ -153,7 +152,7 @@ Public Class KdSearchBox
|
||||
Eingabe_verarbeitet = False
|
||||
last_eingabe = Now
|
||||
|
||||
doKeyDown(Now)
|
||||
doKeyDown(Now, topKunden)
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Es ist ein Fehler beim Kunden-Such-Feld aufgetreten!",,,, "ERR_KDS_02")
|
||||
@@ -169,127 +168,12 @@ Public Class KdSearchBox
|
||||
End If
|
||||
|
||||
Try
|
||||
'Eingabe_verarbeitet = False
|
||||
'last_eingabe = Now
|
||||
'doKeyDown(Now, GlobalAnzahlKunden)
|
||||
'Eingabe_verarbeitet = True
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
usrcntl.Width = usrcntlWIDTH
|
||||
usrcntl.Height = usrcntlHEIGHT
|
||||
|
||||
Dim locationOnForm As Point = Nothing
|
||||
If Me.FindForm IsNot Nothing Then
|
||||
If dgvpos = "LEFT" Or dgvpos = "" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
ElseIf dgvpos = "RIGHT" Then
|
||||
locationOnForm = Me.FindForm().PointToClient(Me.Parent.PointToScreen(Me.Location))
|
||||
locationOnForm.X = locationOnForm.X - (usrcntl.Width - Me.Width)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If locationOnForm.Y + usrcntl.Height + Me.Height > form.ClientRectangle.Height Then
|
||||
usrcntl.Height = form.ClientRectangle.Height - locationOnForm.Y - Me.Height
|
||||
End If
|
||||
|
||||
usrcntl.Location = locationOnForm
|
||||
usrcntl.Top += Me.Height
|
||||
End If
|
||||
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenAktiv IsNot Nothing Then
|
||||
|
||||
With usrcntl.dgvKundenAktiv
|
||||
|
||||
If usrcntl.Visible = False Then
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.ReadOnly = True
|
||||
.MultiSelect = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.BackgroundColor = Color.White
|
||||
.ForeColor = Color.Black
|
||||
Try
|
||||
.GridColor = Color.White
|
||||
Catch ex As Exception
|
||||
'Keine Ahnung warum hier ein Fehler kommt
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'THREADING AKTIV
|
||||
Me.ThreadInitAKTIV(GlobalAnzahlKunden)
|
||||
|
||||
|
||||
End With
|
||||
End If
|
||||
|
||||
If nurAktive Then
|
||||
usrcntl.dgvKundenInAktiv.Visible = False
|
||||
usrcntl.Panel1.Visible = False
|
||||
Else
|
||||
If usrcntl IsNot Nothing AndAlso usrcntl.dgvKundenInAktiv IsNot Nothing Then
|
||||
|
||||
With usrcntl.dgvKundenInAktiv
|
||||
If usrcntl.Visible = False Then
|
||||
.AllowUserToAddRows = False
|
||||
.AllowUserToDeleteRows = False
|
||||
.AllowUserToOrderColumns = False
|
||||
.AllowUserToResizeColumns = False
|
||||
.AllowUserToResizeRows = False
|
||||
.ReadOnly = True
|
||||
.MultiSelect = False
|
||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||
.BackgroundColor = Color.White
|
||||
.ForeColor = Color.Black
|
||||
Try
|
||||
.GridColor = Color.White
|
||||
Catch ex As Exception
|
||||
'Keine Ahnung warum hier ein Fehler kommt
|
||||
End Try
|
||||
.DefaultCellStyle.ForeColor = Color.Gray
|
||||
End If
|
||||
|
||||
|
||||
Me.ThreadInitINAKTIV()
|
||||
'THREADING INAKTIV
|
||||
'Dim ThreadInitINAKTIV = New System.Threading.Thread(AddressOf Me.ThreadInitINAKTIV)
|
||||
'ThreadInitINAKTIV.IsBackground = True
|
||||
'ThreadInitINAKTIV.Start()
|
||||
|
||||
End With
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If _hideIfListEmpty Then
|
||||
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
If False Then
|
||||
|
||||
'THREADING ThreadWaitAndSee
|
||||
Dim ThreadWaitAndSee = New System.Threading.Thread(Sub()
|
||||
Threading.Thread.Sleep(200)
|
||||
If usrcntl.dgvKundenAktiv.RowCount = 0 And usrcntl.dgvKundenInAktiv.RowCount = 0 Then
|
||||
setObjectVisible(usrcntl, False)
|
||||
Else
|
||||
setObjectVisible(usrcntl, True)
|
||||
End If
|
||||
End Sub)
|
||||
ThreadWaitAndSee.IsBackground = True
|
||||
ThreadWaitAndSee.Start()
|
||||
End If
|
||||
Else
|
||||
usrcntl.Visible = True
|
||||
usrcntl.Show()
|
||||
usrcntl.BringToFront()
|
||||
End If
|
||||
Eingabe_verarbeitet = True
|
||||
last_search = Now
|
||||
RESARCH(GlobalAnzahlKunden)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
@@ -479,10 +363,10 @@ Public Class KdSearchBox
|
||||
' If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Or _AlleFirmenCLUSTER Or _UseFIRMA <> "" Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstr &= " FROM [Adressen] "
|
||||
SQLstr &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=COALESCE(Kunden.FilialenNr, 4803)"
|
||||
SQLstr &= " WHERE 1=1 "
|
||||
SQLstr &= " AND ( "
|
||||
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
SQLstr &= " Ordnungsbegriff_AI LIKE '" & srch & "%' "
|
||||
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstr &= " ) "
|
||||
@@ -563,14 +447,16 @@ Public Class KdSearchBox
|
||||
SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstr &= " FROM [Adressen] "
|
||||
SQLstr &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=COALESCE(Kunden.FilialenNr, 4803) "
|
||||
SQLstr &= " WHERE 1=1 "
|
||||
SQLstr &= " AND ( "
|
||||
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
SQLstr &= " Ordnungsbegriff_AI LIKE '" & srch & "%' "
|
||||
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstr &= " ) "
|
||||
If srch2 <> "" Then SQLstr &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
If srch2 <> "" Then
|
||||
SQLstr &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
End If
|
||||
' SQLstr &= " AND [Auswahl]='I' "
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'Keine
|
||||
' SQLstr &= " AND isnull(Kunden.[FilialenNr],0) NOT IN ('5701') "
|
||||
@@ -657,14 +543,16 @@ Public Class KdSearchBox
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Or _AlleFirmenCLUSTER Or _UseFIRMA <> "" Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstrEnd &= " FROM [Adressen] "
|
||||
SQLstrEnd &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstrEnd &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstrEnd &= " INNER JOIN Filialen on Filialen.FilialenNr=COALESCE(Kunden.FilialenNr, 4803) "
|
||||
SQLstrEnd &= " WHERE 1=1 "
|
||||
SQLstrEnd &= " AND ( "
|
||||
SQLstrEnd &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
SQLstrEnd &= " Ordnungsbegriff_AI LIKE '" & srch & "%' "
|
||||
If IsNumeric(srch) Then SQLstrEnd &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstrEnd &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstrEnd &= " ) "
|
||||
If srch2 <> "" Then SQLstrEnd &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
If srch2 <> "" Then
|
||||
SQLstrEnd &= " AND (Filialen.Firma LIKE '" & srch2 & "%' OR ( Adressen.PLZ LIKE '" & srch2 & "%' OR Adressen.Ort LIKE '" & srch2 & "%' OR Adressen.LandKz LIKE '" & srch2 & "%' OR Adressen.Straße LIKE '" & srch2 & "%' )) "
|
||||
End If
|
||||
SQLstrEnd &= " AND [Auswahl]='A' "
|
||||
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.CLUSTER <> "" Then
|
||||
@@ -710,7 +598,10 @@ Public Class KdSearchBox
|
||||
'End If
|
||||
If Not _displayWoelflKd Then SQLstrEnd &= " AND AdressenNr NOT LIKE '15%'"
|
||||
|
||||
setDS(True, usrcntl.dgvKundenAktiv, SQL.loadDgvBySql(SQLstr & SQLstrEnd & " order by Ordnungsbegriff ", "FMZOLL"), topAnz, IIf(srch.Count > 2, SQL.getValueTxtBySql(SQLstrCount & SQLstrEnd, "FMZOLL"), ""))
|
||||
Dim searchstring = SQLstr & SQLstrEnd & " order by Ordnungsbegriff "
|
||||
|
||||
|
||||
setDS(True, usrcntl.dgvKundenAktiv, SQL.loadDgvBySql(searchstring, "FMZOLL"), topAnz, IIf(srch.Count > 2, SQL.getValueTxtBySql(SQLstrCount & SQLstrEnd, "FMZOLL"), ""))
|
||||
|
||||
End With
|
||||
|
||||
@@ -739,10 +630,10 @@ Public Class KdSearchBox
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Or VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Or _AlleFirmenCLUSTER Or _UseFIRMA <> "" Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AVISO_IMEX", "AVISO") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_FREMD_VERAGIMEX", "SDL") Then SQLstr &= ", Filialen.Firma as Firma_Intern "
|
||||
SQLstr &= " FROM [Adressen] "
|
||||
SQLstr &= " INNER JOIN Kunden on KundenNr=AdressenNr "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=isnull(Kunden.FilialenNr,4803) "
|
||||
SQLstr &= " INNER JOIN Filialen on Filialen.FilialenNr=COALESCE(Kunden.FilialenNr, 4803) "
|
||||
SQLstr &= " WHERE 1=1 "
|
||||
SQLstr &= " AND ( "
|
||||
SQLstr &= " Ordnungsbegriff COLLATE Latin1_General_CI_AI LIKE '" & srch & "%' COLLATE Latin1_General_CI_AI "
|
||||
SQLstr &= " Ordnungsbegriff_AI LIKE '" & srch & "%' "
|
||||
If IsNumeric(srch) Then SQLstr &= " OR AdressenNr LIKE '" & srch & "%' "
|
||||
If _searchName1 Then SQLstr &= " OR Adressen.[Name 1] LIKE '" & srch & "%' "
|
||||
SQLstr &= " ) "
|
||||
|
||||
@@ -314,7 +314,7 @@ Public Class cAdressen
|
||||
|
||||
Try
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL(False)
|
||||
Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & UIDNr & "') AND WölflKundenNr = " & woelflKdNr & " OR weitereWölflKundenNr " & woelflKdNr, conn)
|
||||
Using cmd As New SqlCommand("Select TOP(1) * FROM Adressen WHERE (UstIdKz + UstIdNr='" & UIDNr & "' or Steuernummer ='" & UIDNr & "') AND WölflKundenNr = " & woelflKdNr & " OR weitereWölflKundenNr = " & woelflKdNr, conn)
|
||||
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
|
||||
@@ -626,6 +626,11 @@ Public Class frmUeberstundenauszahlen
|
||||
Dim stichtag As Integer = 25
|
||||
Dim ignoreAuszahlungsdatum As Boolean = False
|
||||
|
||||
If cbxoverwrite.Checked AndAlso (CDbl(txtSummeAuszb.Text) < CDbl(txtAuszManuell.Text) Or CDbl(txtSummeAuszb.Text) < CDbl(txtAuszManuell_hhmm.Text) Or CDbl(txtSummeAuszb.Text) < (CDbl(txtAusz100Netto.Text) + CDbl(txtAusz50.Text) + CDbl(txtAusz50vonSaldo.Text))) Then
|
||||
MsgBox("Auszahlungssumme übersteigt den aktuellen Saldo!" & vbNewLine & "Vorgang wird abgebrochen")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Select Case IIf(MA.mit_firma = "ALL", MA.mit_FirmaHaupt, MA.mit_firma)
|
||||
'25.02.2025: ATILLA ist bereits auf das einheitliche Auszahlungsschema umgestiegen!
|
||||
'Case "ATILLA"
|
||||
|
||||
Reference in New Issue
Block a user