74 lines
1.9 KiB
VB.net
74 lines
1.9 KiB
VB.net
Imports EgtBEAMWALL.Core
|
|
|
|
Public Class MainWindowVM
|
|
|
|
Private m_SupervisorId As String = "A"
|
|
|
|
Private m_MachGroupList As New List(Of MyMachGroup)
|
|
Public Property MachGroupList As List(Of MyMachGroup)
|
|
Get
|
|
Return m_MachGroupList
|
|
End Get
|
|
Set(value As List(Of MyMachGroup))
|
|
m_MachGroupList = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SelMachGroup As MyMachGroup
|
|
Public Property SelMachGroup As MyMachGroup
|
|
Get
|
|
Return m_SelMachGroup
|
|
End Get
|
|
Set(value As MyMachGroup)
|
|
m_SelMachGroup = value
|
|
End Set
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdCompletedRawPart As ICommand
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
'' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
|
|
'Map.BeginInit(Me)
|
|
'' Creo Model della MainWindow
|
|
'm_MainWindowM = New MainWindowM
|
|
Dim TempList As List(Of DataLayer.DatabaseModels.MachGroupModel) = DbControllers.m_MachGroupController.GetByAssign(m_SupervisorId)
|
|
For Each MachGroup In TempList
|
|
m_MachGroupList.Add(New BeamMachGroup(MachGroup.MachGroupDbId, 1, ""))
|
|
Next
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "CompletedRawPart"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property CompletedRawPart_Command As ICommand
|
|
Get
|
|
If m_cmdCompletedRawPart Is Nothing Then
|
|
m_cmdCompletedRawPart = New Command(AddressOf CompletedRawPart)
|
|
End If
|
|
Return m_cmdCompletedRawPart
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub CompletedRawPart()
|
|
If IsNothing(m_SelMachGroup) Then Return
|
|
DbControllers.m_MachGroupController.UpdateStatus(m_SelMachGroup.Id, DataLayer.ItemState.Produced)
|
|
End Sub
|
|
|
|
#End Region ' CompletedRawPart
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|