Imports EgtWPFLib5 Public Class NewVersionPageVM Inherits VersionPageVM #Region "FIELDS & PROPERTIES" ' Definizione comandi Private m_cmdAddVersion As Command Private m_cmdCancel As Command #Region "Messages" Public ReadOnly Property NewVersionMsg As String Get Return "New version" End Get End Property Public ReadOnly Property AddMsg As String Get Return "Add" End Get End Property Public ReadOnly Property CancelMsg As String Get Return "Close" End Get End Property #End Region ' Messages #End Region ' FIELDS & PROPERTIES #Region "CONSTRUCTOR" Sub New() ' Imposto riferimento nella mappa Map.SetRefNewVersionPageVM(Me) End Sub #End Region ' CONSTRUCTOR #Region "COMMANDS" #Region "AddVersion" ' Returns a command that manage the MainWindow_Unloaded command Public ReadOnly Property AddVersion_Command As ICommand Get If m_cmdAddVersion Is Nothing Then m_cmdAddVersion = New Command(AddressOf AddVersion) End If Return m_cmdAddVersion End Get End Property Public Sub AddVersion(ByVal param As Object) ' Aggiungo un rivenditore al Db Dim Query As String = "INSERT INTO " & DB_VERSION & " (" & DB_VERSIONNUMBER & ", " & DB_PRODUCTID & ")" & " VALUES ('" & VersionNumber & "', " & "'" & SelProduct.ProductID & "')" ManageDb.ExecuteQuery(Query) ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. Map.refMainWindowVM.SelProjectMode = MainWindowVM.ProjectModeOpt.SEARCHVERSION End Sub #End Region ' AddVersion #Region "Cancel" ' Returns a command that manage the MainWindow_Unloaded command Public ReadOnly Property Cancel_Command As ICommand Get If m_cmdCancel Is Nothing Then m_cmdCancel = New Command(AddressOf Cancel) End If Return m_cmdCancel End Get End Property Public Sub Cancel(ByVal param As Object) ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. Map.refMainWindowVM.SelProjectMode = MainWindowVM.ProjectModeOpt.SEARCHVERSION End Sub #End Region ' Cancel #End Region ' COMMANDS End Class