Feature/Bugfix -> Besucherbericht (Substring) gefixt, Filteroptionen verbessert
This commit is contained in:
@@ -15,14 +15,18 @@
|
||||
|
||||
Private Sub KdSearchBox1_TextChanged(sender As Object, e As EventArgs) Handles kdFirma.TextChanged
|
||||
|
||||
If kdFirma.KdNr_value > 0 AndAlso kdFirma.kdNrField IsNot Nothing Then
|
||||
If kdFirma.KdNr_value > 0 AndAlso kdFirma.KdNr IsNot Nothing Then
|
||||
Dim AD = kdFirma.KdData_ADRESSEN
|
||||
Dim KD = kdFirma.KdData_KUNDE
|
||||
|
||||
txtFirma.Enabled = True
|
||||
BB.bb_KundenNr = kdFirma.KdNr_value
|
||||
|
||||
|
||||
txtFirma.Text = If(AD.Name_1, "") & If(AD.Name_2, "")
|
||||
txtFirma.Text &= vbNewLine & If(AD.Straße, "")
|
||||
txtFirma.Text &= vbNewLine & If(AD.LandKz, "") & If(AD.PLZ, "") & If(AD.Ort, "")
|
||||
BB.bb_Kunde = If(txtFirma.Text, "-")
|
||||
txtFirma.Enabled = False
|
||||
Else
|
||||
txtFirma.Enabled = True
|
||||
@@ -50,7 +54,6 @@
|
||||
kdFirma.Enabled = False
|
||||
txtFirma.ReadOnly = True
|
||||
|
||||
|
||||
Else
|
||||
kdFirma.Enabled = True
|
||||
txtFirma.ReadOnly = False
|
||||
@@ -62,7 +65,7 @@
|
||||
|
||||
UsrcntlPDFScanList1.Enabled = True
|
||||
'UsrcntlPDFScanList1.INIT(-1, "BESUCHSBERICHTE", VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA, bb_id)
|
||||
UsrcntlPDFScanList1.INIT(BB.bb_KundenNr, "BESUCHSBERICHTE")
|
||||
UsrcntlPDFScanList1.INIT(BB.bb_KundenNr, "BESUCHSBERICHTE", bb_id)
|
||||
Else
|
||||
UsrcntlPDFScanList1.Enabled = False
|
||||
End If
|
||||
@@ -71,6 +74,7 @@
|
||||
End Sub
|
||||
|
||||
Sub setvalues(BB As VERAG_PROG_ALLGEMEIN.cBesuchsbericht)
|
||||
|
||||
kdFirma.Enabled = BB.bb_KundenNr <= 0
|
||||
kdFirma.KdNr = BB.bb_KundenNr
|
||||
datBesuchtAm._value = BB.bb_DatumBesuch
|
||||
@@ -96,9 +100,7 @@
|
||||
txtAuftraggeber.Text = If(BB.bb_Auftraggeber, "")
|
||||
txtTransportRoute.Text = If(BB.bb_Route, "")
|
||||
txtDerzeitigerLieferant.Text = If(BB.bb_DerzeitigerLieferant, "")
|
||||
'MsgBox("Before Set " & BB.bb_Zufrieden)
|
||||
cboZufrieden.changeItem(If(BB.bb_Zufrieden, ""))
|
||||
'MsgBox("After Set " & BB.bb_Zufrieden)
|
||||
|
||||
txtZufriedenNEIN.Text = If(BB.bb_ZufriedenNEIN, "")
|
||||
txtGarantie.Text = If(BB.bb_Garantie, "")
|
||||
@@ -119,9 +121,16 @@
|
||||
BB.bb_Teilnehmer = txtTeilgenommen.Text
|
||||
BB.bb_Kontaktart = cboKontaktart._value
|
||||
If If(BB.bb_KundenNr, -1) <= 0 Then
|
||||
BB.bb_Kunde = If(txtFirma.Text, "")
|
||||
If txtFirma.Text <> "" Then
|
||||
If txtFirma.Text.Length > 35 Then
|
||||
BB.bb_Kunde = txtFirma.Text.Substring(0, 35)
|
||||
Else
|
||||
BB.bb_Kunde = txtFirma.Text
|
||||
End If
|
||||
Else
|
||||
BB.bb_Kunde = "-" 'diese Fall kann nicht eintreten, wird im Formular abgefangen.
|
||||
End If
|
||||
End If
|
||||
|
||||
BB.bb_Geschaeftsfuehrer = txtGF.Text
|
||||
BB.bb_Anpsprechpartner = txtAnsprechpartner.Text
|
||||
BB.bb_Mail = txtMail.Text
|
||||
@@ -138,16 +147,14 @@
|
||||
BB.bb_Auftraggeber = txtAuftraggeber.Text
|
||||
BB.bb_Route = txtTransportRoute.Text
|
||||
BB.bb_DerzeitigerLieferant = txtDerzeitigerLieferant.Text
|
||||
'MsgBox("Before Get " & BB.bb_Zufrieden)
|
||||
BB.bb_Zufrieden = IIf(cboZufrieden._value = "", Nothing, cboZufrieden._value)
|
||||
'MsgBox("Before Get " & BB.bb_Zufrieden)
|
||||
|
||||
BB.bb_ZufriedenNEIN = txtZufriedenNEIN.Text
|
||||
BB.bb_Garantie = txtGarantie.Text
|
||||
BB.bb_Vermerk = txtVermerk.Text
|
||||
|
||||
BB.bb_Interesse_Zollabfertigung = cbxZollabfertigung.Checked
|
||||
BB.bb_Interesse_Zollabfertigung = cbxBrexit.Checked
|
||||
BB.bb_Interesse_Brexit = cbxBrexit.Checked
|
||||
BB.bb_Interesse_Parkplatz = cbxParkplatz.Checked
|
||||
BB.bb_Interesse_LagerUmschlag = cbxLagerUmschlag.Checked
|
||||
BB.bb_Interesse_Rola = cbxRola.Checked
|
||||
@@ -164,6 +171,7 @@
|
||||
If getvalues(BB) Then
|
||||
UsrcntlPDFScanList1.Enabled = True
|
||||
'UsrcntlPDFScanList1.INIT(-1, "BESUCHSBERICHTE", VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA, bb_id)
|
||||
|
||||
UsrcntlPDFScanList1.INIT(BB.bb_KundenNr, "BESUCHSBERICHTE")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -74,6 +74,7 @@ Public Class usrCntlBesuchsberichte
|
||||
initDGV()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
'MsgBox(ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -81,6 +82,8 @@ Public Class usrCntlBesuchsberichte
|
||||
Private Sub btnNew_Click(sender As Object, e As EventArgs) Handles btnNew.Click
|
||||
Dim f As New frmBesuchsberichte(-1, kdnr)
|
||||
f.ShowDialog(Me)
|
||||
initDGV()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click
|
||||
@@ -167,12 +170,10 @@ Public Class usrCntlBesuchsberichte
|
||||
Dim andstr As String = ""
|
||||
|
||||
If dgvFILTER.RowCount > 0 Then
|
||||
'MsgBox("Filter aktiviert")
|
||||
For Each c As DataGridViewCell In dgvFILTER.Rows(0).Cells
|
||||
If c.Value IsNot DBNull.Value Then
|
||||
If c.GetType Is GetType(DataGridViewTextBoxCell) Then
|
||||
If c.Value IsNot Nothing AndAlso c.Value <> "" Then
|
||||
'Noch prüfen, was hier genau gemacht wird!!!!
|
||||
Dim srchstr = getSqlText(c.Value.ToString.Trim)
|
||||
If c.OwningColumn.Name.Contains("SDLNr") Then
|
||||
filter &= andstr & " SDL.[" & c.OwningColumn.Name & "] LIKE '%" & srchstr & "%' "
|
||||
@@ -192,7 +193,6 @@ Public Class usrCntlBesuchsberichte
|
||||
End If
|
||||
End If
|
||||
andstr = " AND "
|
||||
'bis hier
|
||||
End If
|
||||
ElseIf c.GetType Is GetType(DataGridViewCheckBoxCell) Then
|
||||
If c.Value IsNot Nothing AndAlso c.Value.ToString <> "" Then
|
||||
|
||||
Reference in New Issue
Block a user