Handling InsertReceivers und kleinigkeiten frm Main
This commit is contained in:
parent
85e0bc3400
commit
69afea012b
@ -152,6 +152,9 @@ Public Class ElementModel
|
||||
pElement.Id = GetElementId(pElement)
|
||||
Return True
|
||||
Else
|
||||
|
||||
Dim filledSql As String = GetFilledSql(oCommand)
|
||||
Logger.Warn(filledSql)
|
||||
Return False
|
||||
End If
|
||||
|
||||
@ -161,6 +164,26 @@ Public Class ElementModel
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Function GetFilledSql(command As SqlCommand) As String
|
||||
Dim oSql As String = command.CommandText
|
||||
For Each oParam As SqlParameter In command.Parameters
|
||||
Dim oValue As String
|
||||
If oParam.Value Is Nothing OrElse oParam.Value Is DBNull.Value Then
|
||||
oValue = "NULL"
|
||||
ElseIf TypeOf oParam.Value Is String OrElse TypeOf oParam.Value Is Date Then
|
||||
oValue = $"'{oParam.Value.ToString().Replace("'", "''")}'"
|
||||
|
||||
ElseIf TypeOf oParam.Value Is Boolean Then
|
||||
oValue = If(CBool(oParam.Value), "1", "0")
|
||||
Else
|
||||
oValue = oParam.Value.ToString()
|
||||
End If
|
||||
oSql = oSql.Replace("@" & oParam.ParameterName, oValue)
|
||||
Next
|
||||
Return oSql
|
||||
End Function
|
||||
|
||||
|
||||
Public Function Update(pElement As DocumentReceiverElement) As Boolean
|
||||
Try
|
||||
Dim oSql = "UPDATE [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]
|
||||
|
||||
@ -271,7 +271,7 @@ Public Class frmMain
|
||||
If ViewEnvelopes.FocusedRowHandle < 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
sd
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
|
||||
|
||||
txtEnvelopeIdLabel.Caption = String.Format(txtEnvelopeIdLabel.Tag, oEnvelope.Id)
|
||||
@ -795,6 +795,10 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub bbtnitm2Faktor_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm2Faktor.ItemClick
|
||||
Show_MF_Info
|
||||
|
||||
End Sub
|
||||
Private Sub Show_MF_Info()
|
||||
If ViewEnvelopes.FocusedRowHandle < 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
@ -821,7 +825,6 @@ Public Class frmMain
|
||||
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
If txtEnvID.Text = String.Empty Then
|
||||
Exit Sub
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user