Feature Offertenarchivierung

This commit is contained in:
2022-11-21 16:42:29 +01:00
parent 579d56e057
commit 4b07117bf3
3 changed files with 91 additions and 35 deletions

View File

@@ -436,11 +436,12 @@ Public Class cOfferteArchiv
End Function
Public Function SAVE() As Boolean
Public Function UPDATE() As Boolean
Dim sqlstr = " BEGIN " & getInsertCmd() & " End "
Dim sqlstr = " BEGIN " & getUpdateCmd() & " End "
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
OfID = SQL.doSQLVarListID(OfID, sqlstr, "FMZOLL", , list)
Return OfID
End Function
Public Function SAVERETURNID() As Integer
@@ -547,24 +548,24 @@ Public Class cOfferteArchiv
Return ""
End Function
'Public Function getUpdateCmd() As String
' Try
' Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
' Dim str As String = ""
' For Each i In list
' If Not i.isPrimaryParam Then
' str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
' End If
' Next
' str = str.Substring(0, str.Length - 1) 'wg. ','
' Return (" UPDATE [OffertenArchiv] SET " & str & " WHERE KundenNr=@KundenNr and OffertenNr=@OffertenNr ")
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [OffertenArchiv] SET " & str & " WHERE IfID=@OfID ")
' 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 ""
'End Function
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 ""
End Function
'Function RESET_STANDARTOFFERTEN(Sachbearbeiter) As Boolean