75 lines
1.7 KiB
Plaintext
75 lines
1.7 KiB
Plaintext
VERSION 5.00
|
|
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} CreateWorkerDlg
|
|
Caption = "Äîáàâëåíèå ñîòðóäíèêà"
|
|
ClientHeight = 2745
|
|
ClientLeft = 45
|
|
ClientTop = 435
|
|
ClientWidth = 5385
|
|
OleObjectBlob = "CreateWorkerDlg.frx":0000
|
|
StartUpPosition = 1 'CenterOwner
|
|
End
|
|
Attribute VB_Name = "CreateWorkerDlg"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = False
|
|
Attribute VB_PredeclaredId = True
|
|
Attribute VB_Exposed = False
|
|
Option Explicit
|
|
|
|
Private workers_ As DB_Workers
|
|
Public isCanceled_ As Boolean
|
|
|
|
Private Sub UserForm_Initialize()
|
|
isCanceled_ = True
|
|
Call PositionInMiddle(Me)
|
|
End Sub
|
|
|
|
Public Function Init(iWorkers As DB_Workers)
|
|
isCanceled_ = True
|
|
Set workers_ = iWorkers
|
|
End Function
|
|
|
|
Public Property Get WorkerID() As String
|
|
WorkerID = TBWorkerID.Value
|
|
End Property
|
|
|
|
Public Property Get WorkerName() As String
|
|
WorkerName = TBWorkerName.Value
|
|
End Property
|
|
|
|
Public Property Get Path() As String
|
|
Path = TBPath.Value
|
|
End Property
|
|
|
|
Public Function GetUserInput() As ItemInputWorker
|
|
Dim iWorker As New ItemInputWorker
|
|
With iWorker
|
|
.path_ = Path
|
|
.workerID_ = WorkerID
|
|
.workerName_ = WorkerName
|
|
End With
|
|
Set GetUserInput = iWorker
|
|
End Function
|
|
|
|
' =======
|
|
Private Sub BtnPath_Click()
|
|
Dim sFile$: sFile = UserInteraction.PromptFileFilter(ThisWorkbook.Path & "\", "Âûáåðèòå ôàéë", "*.xlsx")
|
|
If sFile = vbNullString Then _
|
|
Exit Sub
|
|
TBPath.Text = sFile
|
|
End Sub
|
|
|
|
Private Sub BtnOk_Click()
|
|
If workers_.Contains(WorkerID) Then
|
|
Call UserInteraction.ShowMessage(EM_WORKER_ALREADY_EXISTS, WorkerID)
|
|
Exit Sub
|
|
End If
|
|
|
|
isCanceled_ = False
|
|
Call Me.Hide
|
|
End Sub
|
|
|
|
Private Sub BtnCancel_Click()
|
|
isCanceled_ = True
|
|
Call Me.Hide
|
|
End Sub
|