Files
LicenceManager/NewVersionPage/NewVersionPageVM.vb
T
Renzo Lanza 08237de2d8 LicenceManager 2.1c6:
- In UpdateLicencePage viene mostrato il nome del Prodotto della Licenza che si sta aggiornando 
- Ogni pulsante "Close" fa ritornare alla pagina precedente (Correzione simile per i vari pulsanti Update e New, mentre Delete rimane nella stessa pagina)
- Correzione pulsanti del Main Menu (non hanno più la scritta "Cerca...")
- I DataGrid non tagliano più l'ultima riga visibile ma si aggiustano in base al numero intero di righe visibili (implementato per tutte le pagine Search tranne che per Product per via di errori che non riesco a risolvere
2019-03-25 08:58:31 +00:00

98 lines
2.4 KiB
VB.net

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