08.01.2024

This commit is contained in:
Jonathan Jenne
2024-01-08 11:54:19 +01:00
parent 26fe798a68
commit b849a8d87b
14 changed files with 494 additions and 366 deletions

View File

@@ -64,12 +64,14 @@ Partial Public Class frmEnvelopeEditor
Controller = New EnvelopeEditorController(State)
' Get additional data
Dim oDataForm As New frmEnvelopeMainData() With {.State = State, .NewEnvelopeMode = True}
Dim oDataForm As New frmEnvelopeMainData() With {
.State = State,
.Envelope = Controller.Envelope,
.NewEnvelopeMode = True
}
Dim oResult As DialogResult = oDataForm.ShowDialog()
If oResult = DialogResult.OK Then
Controller.Envelope.Title = oDataForm.EnvelopeTitle
Controller.Envelope.ContractType = oDataForm.EnvelopeContractType
Else
If oResult = DialogResult.Cancel Then
Controller.DeleteEnvelopeFromDisk(Controller.Envelope)
Me.Close()
End If
@@ -329,15 +331,10 @@ Partial Public Class frmEnvelopeEditor
Dim oForm As New frmEnvelopeMainData() With
{
.State = State,
.EnvelopeTitle = Controller.Envelope.Title,
.EnvelopeContractType = Controller.Envelope.ContractType,
.Envelope = Controller.Envelope,
.NewEnvelopeMode = False
}
If oForm.ShowDialog() = DialogResult.OK Then
Controller.Envelope.Title = oForm.EnvelopeTitle
Controller.Envelope.ContractType = oForm.EnvelopeContractType
End If
oForm.ShowDialog()
SetFormTitle(Controller.Envelope.Title)
End Sub
@@ -446,7 +443,10 @@ Partial Public Class frmEnvelopeEditor
If oNameCellValue Is Nothing Then
Dim oEmailAdress As String = DirectCast(e.Value, String)
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
Dim oAccessCode As String = Guid.NewGuid().ToString("d").Substring(1, 6).ToUpper()
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns("Name"), oLastName)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns("AccessCode"), oAccessCode)
End If
End If
End If