LicenceManager 2.2g1 :

- aggiunti i campi Lock ID e Seriale (non modificabili) in UpdateLicencePage 
- aggiunto Seriale ai filtri di ricerca in SearchLicencePage
This commit is contained in:
Renzo Lanza
2020-07-23 15:25:40 +00:00
parent 15ae61c0f6
commit 6eff288068
5 changed files with 123 additions and 6 deletions
+2 -2
View File
@@ -59,5 +59,5 @@ Imports System.Windows
' usando l'asterisco '*' come illustrato di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.2.3.1")>
<Assembly: AssemblyFileVersion("2.2.3.1")>
<Assembly: AssemblyVersion("2.2.7.1")>
<Assembly: AssemblyFileVersion("2.2.7.1")>
+10
View File
@@ -140,6 +140,16 @@
Grid.Row="4"
Style="{StaticResource ParametersComboBox}"/>
<TextBlock Text="{Binding SerialNumberMsg}"
Grid.Column="2"
Grid.Row="4"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SerialNumber}"
Grid.Column="3"
Grid.Row="4"
Style="{StaticResource ParameterTextBox}"/>
<GroupBox Name="Option1"
Header="{Binding Option1Msg}"
Grid.Row="5" Grid.ColumnSpan="4">
+24
View File
@@ -141,6 +141,17 @@ Public Class SearchLicencePageVM
End Set
End Property
Private m_SerialNumber As String
Public Property SerialNumber As String
Get
Return m_SerialNumber
End Get
Set(value As String)
m_SerialNumber = value
NotifyPropertyChanged("SerialNumber")
End Set
End Property
Private m_IsDongleList As New List(Of String)({"Hardware", "Software", "---ANY---"})
Public ReadOnly Property IsDongleList As List(Of String)
Get
@@ -282,6 +293,12 @@ Public Class SearchLicencePageVM
End Get
End Property
Public ReadOnly Property SerialNumberMsg As String
Get
Return "Seriale"
End Get
End Property
Public ReadOnly Property NewMsg As String
Get
Return "New"
@@ -348,6 +365,8 @@ Public Class SearchLicencePageVM
NotifyPropertyChanged("SelProductLevel")
File = String.Empty
NotifyPropertyChanged("File")
SerialNumber = String.Empty
NotifyPropertyChanged("SerialNumber")
ProductDeadline = Nothing
NotifyPropertyChanged("ProductDeadline")
@@ -502,6 +521,7 @@ Public Class SearchLicencePageVM
Not String.IsNullOrWhiteSpace(LockID) OrElse
Not IsNothing(LicenseDate) OrElse
Not String.IsNullOrWhiteSpace(File) OrElse
Not String.IsNullOrWhiteSpace(SerialNumber) OrElse
Not IsNothing(m_SelIsDongle) Then
Query &= " WHERE "
If Not IsNothing(m_SelProduct) Then
@@ -546,6 +566,10 @@ Public Class SearchLicencePageVM
EvalWhere(bFirstWhere, Query)
Query &= DB_FILE & " LIKE '%" & File & "%' "
End If
If Not String.IsNullOrWhiteSpace(SerialNumber) Then
EvalWhere(bFirstWhere, Query)
Query &= DB_SERIALE & " LIKE '%" & SerialNumber & "%' "
End If
If Not IsNothing(LicenseDate) Then
EvalWhere(bFirstWhere, Query)
Query &= DB_LICENCE & "." & DB_DATE & " LIKE '%" & Format(LicenseDate, "yyyy-MM-dd") & "%' "
+41 -4
View File
@@ -14,10 +14,47 @@
BorderThickness="1"
Height="75"
Grid.Row="0">
<TextBlock Height="50"
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Height="50"
Text="{Binding UpdateLicenceMsg}"
FontSize="30"
TextAlignment="Center"/>
TextAlignment="Center"
Grid.RowSpan="2"
Grid.ColumnSpan="6"/>
<TextBlock Text="{Binding LockIdMsg}"
Grid.Column="4"
Grid.Row="0"
Style="{StaticResource ParametersTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding LockId}"
Grid.Column="5"
Grid.Row="0"
Style="{StaticResource ParameterTextBox}" IsReadOnly="True" TextAlignment="Left" Width="Auto" />
<TextBlock Text="{Binding SerialNumberMsg}"
Grid.Column="4"
Grid.Row="1"
Style="{StaticResource ParametersTextBlock}" Margin="10,0,10,10"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SerialNumber}"
Grid.Column="5"
Grid.Row="1"
Style="{StaticResource ParameterTextBox}" IsReadOnly="True" TextAlignment="Left" Width="Auto" Margin="10,0,10,10" />
</Grid>
</Border>
<Grid Grid.Row="1">
@@ -34,8 +71,8 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
+46
View File
@@ -37,6 +37,28 @@ Public Class UpdateLicencePageVM
End Set
End Property
Private m_LockId As String
Public Property LockId As String
Get
Return m_LockId
End Get
Set(value As String)
m_LockId = value
NotifyPropertyChanged("LockId")
End Set
End Property
Private m_SerialNumber As String
Public Property SerialNumber As String
Get
Return m_SerialNumber
End Get
Set(value As String)
m_SerialNumber = value
NotifyPropertyChanged("SerialNumber")
End Set
End Property
Private m_ProductName As String
Public Property ProductName As String
Get
@@ -326,6 +348,18 @@ Public Class UpdateLicencePageVM
End Get
End Property
Public ReadOnly Property LockIdMsg As String
Get
Return "Lock ID"
End Get
End Property
Public ReadOnly Property SerialNumberMsg As String
Get
Return "Serial number"
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR"
@@ -358,6 +392,18 @@ Public Class UpdateLicencePageVM
FileName = Licence.File ' String.Empty
NotifyPropertyChanged("File")
' Carico LockId della Licenza selezionata da aggiornare
LockId = Licence.Number
NotifyPropertyChanged("LockId")
' Carico Seriale della Chiave che contiene la Licenza selezionata da aggiornare
Dim nQuery As String = "SELECT * FROM " & DB_KEY & " WHERE " & DB_LOCKID & " = '" & Licence.Number & "'"
'SerialNumber = ManageDb.ExecuteKeyQuery(nQuery).FirstOrDefault().Seriale
Dim keyDummy As Key = ManageDb.ExecuteKeyQuery(nQuery).FirstOrDefault()
SerialNumber = If(IsNothing(keyDummy), Nothing, keyDummy.Seriale)
NotifyPropertyChanged("SerialNumber")
' Carico ProductName della Licenza selezionata da aggiornare
Dim ProdQuery As String = "SELECT * FROM " & DB_PRODUCT & " WHERE " & DB_PRODUCTID & " = " & Licence.ProductID
ProductName = ManageDb.ExecuteProductQuery(ProdQuery)(0).ProductName
NotifyPropertyChanged("ProductName")