This commit is contained in:
2023-12-07 10:02:47 +01:00
4 changed files with 52 additions and 9 deletions

View File

@@ -365,4 +365,11 @@ Public Class EnvelopeEditorController
End If
End Function
Public Function GetLastNameByEmailAdress(pEmailAdress As String) As String
If (String.IsNullOrEmpty(pEmailAdress) = False) Then
Return ReceiverModel.GetLastUsedReceiverName(pEmailAdress, Envelope.UserId)
Else
Return String.Empty
End If
End Function
End Class

View File

@@ -419,4 +419,21 @@ Partial Public Class frmEnvelopeEditor
RibbonPageGroupAddSignature_Enabled()
End Sub
Private Sub ViewReceivers_CellValueChanging(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanging
'If e.Column.FieldName = "Email" Then
' Dim oEmailAdress As String = DirectCast(e.Value, String)
' Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
'End If
End Sub
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
If e.Column.FieldName = "Email" Then
Dim oLastCellValue = ViewReceivers.GetRowCellValue(e.RowHandle, "Name")
If oLastCellValue Is Nothing Then
Dim oEmailAdress As String = DirectCast(e.Value, String)
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns("Name"), oLastName)
End If
End If
End Sub
End Class

View File

@@ -35,7 +35,7 @@ Public Class frmMain
RefreshHelper = New RefreshHelper(ViewEnvelopes, "Id")
Try
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath)
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
If ConfigManager.Config.ConnectionString = String.Empty Then
Dim oSQLConfig As New frmSQLConfig(LogConfig)