41 lines
1.3 KiB
VB.net
41 lines
1.3 KiB
VB.net
Imports System.Runtime.CompilerServices
|
|
Imports DevExpress.XtraDashboardLayout
|
|
Imports DigitalData.Controls.DocumentViewer
|
|
Imports EnvelopeGenerator.Common
|
|
Imports EnvelopeGenerator.Common.Constants
|
|
|
|
Public Class frmEnvelopeMainData
|
|
|
|
Public Property EnvelopeTitle As String
|
|
Public Property EnvelopeContractType As ContractType = ContractType.Contract
|
|
|
|
Public Property State As State
|
|
|
|
Public Sub New()
|
|
InitializeComponent()
|
|
End Sub
|
|
|
|
Private Sub frmEnvelopeMainData_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Dim contractTypeList = [Enum].GetValues(GetType(ContractType)) _
|
|
.Cast(Of ContractType)().ToList()
|
|
cmbContractType.Properties.Items.AddRange(contractTypeList)
|
|
|
|
txtTitle.EditValue = EnvelopeTitle
|
|
cmbContractType.EditValue = EnvelopeContractType
|
|
End Sub
|
|
|
|
Private Sub btOK_Click(sender As Object, e As EventArgs) Handles btOK.Click
|
|
|
|
Dim Validator As Validator = New Validator(State.LogConfig, AdornerUIManager1)
|
|
Dim oMissingParams = Validator.Validate(txtTitle)
|
|
|
|
If oMissingParams = True Then
|
|
Me.DialogResult = DialogResult.None
|
|
txtTitle.Focus()
|
|
Return
|
|
End If
|
|
|
|
EnvelopeTitle = txtTitle.EditValue
|
|
EnvelopeContractType = cmbContractType.EditValue
|
|
End Sub
|
|
End Class |