neu
This commit is contained in:
@@ -272,26 +272,32 @@ Public Class MySearchBox
|
||||
|
||||
|
||||
Public Sub SET_VALUE(KEYPARAM_Value, Optional showerror = True)
|
||||
If Not active Then Exit Sub
|
||||
Try
|
||||
|
||||
If Not active Then Exit Sub
|
||||
If KEYPARAM_Value Is Nothing Then KEYPARAM_Value = ""
|
||||
Dim SQLstr As String = "SELECT TOP 1 " & SQL_SELECT & " WHERE 1=1 "
|
||||
SQLstr &= " AND " & KEYPARAM & " = '" & KEYPARAM_Value & "' "
|
||||
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
|
||||
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
|
||||
' MsgBox(SQLstr)
|
||||
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
|
||||
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
|
||||
setMeValue(dttmp.Rows(0))
|
||||
Else
|
||||
If _allowFreitext Then
|
||||
Me.Text = KEYPARAM_Value
|
||||
Me._value = KEYPARAM_Value
|
||||
' MsgBox(SQLstr)
|
||||
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
|
||||
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
|
||||
setMeValue(dttmp.Rows(0))
|
||||
Else
|
||||
Me.Text = ""
|
||||
Me._value = ""
|
||||
If _allowFreitext Then
|
||||
Me.Text = KEYPARAM_Value
|
||||
Me._value = KEYPARAM_Value
|
||||
Else
|
||||
Me.Text = ""
|
||||
Me._value = ""
|
||||
End If
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
hideDgv(usrcntl)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user