LicenceManager 2.4c1: - Avviso scadenza licenza ora è riferito a 20 giorni prima del mese dell'anno dopo di ProductVersion
- Colonna LicenceFileContent sostituita con ExpirationDate in SearchLicencePage - Aggiunto riquadro Note a LicenceBox - Modificate larghezze colonne in SearchLicencePage
This commit is contained in:
@@ -44,8 +44,18 @@
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20">
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<TextBox Name="InfoLbl" Text="{Binding LicFileContentText}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" IsReadOnly="True" FontSize="12" TextWrapping="Wrap"/>
|
||||
<Grid Grid.Column="1" Grid.Row="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox Name="InfoLbl" Text="{Binding LicFileContentText}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" IsReadOnly="True" FontSize="12" TextWrapping="Wrap"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="Note:" VerticalAlignment="Center" Margin="0,5,0,0"/>
|
||||
<TextBox Name="NoteLbl" Text="{Binding LicNoteText}" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" IsReadOnly="True" FontSize="12" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -14,6 +14,16 @@ Public Class LicenceBoxVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_LicNoteText As String
|
||||
Public Property LicNoteText As String
|
||||
Get
|
||||
Return m_LicNoteText
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_LicNoteText = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Option1 As New ObservableCollection(Of KeyOption)
|
||||
Public ReadOnly Property Option1 As ObservableCollection(Of KeyOption)
|
||||
Get
|
||||
@@ -139,6 +149,7 @@ Public Class LicenceBoxVM
|
||||
|
||||
Friend Sub InitLicenceBox()
|
||||
LicFileContentText = CType(Map.refSearchLicencePageVM.Row.Item, Licence).LicFile
|
||||
LicNoteText = CType(Map.refSearchLicencePageVM.Row.Item, Licence).Note
|
||||
|
||||
m_ProductDeadline = CType(Map.refSearchLicencePageVM.Row.Item, Licence).ProductDeadline.ToShortDateString()
|
||||
NotifyPropertyChanged("ProductDeadline")
|
||||
|
||||
+10
-3
@@ -509,10 +509,17 @@ Public Class MainMenuVM
|
||||
" INNER JOIN " & DB_CLIENT &
|
||||
" ON " & DB_KEY & "." & DB_CLIENTID & " = " & DB_CLIENT & "." & DB_CLIENTID &
|
||||
" WHERE " & DB_CLIENT & "." & DB_CLIENTID & " IN (" & MULTIAX_ID & ", " & OMAG_ID & ", " & ESSETRE_ID & ")" &
|
||||
" AND DATEDIFF(" & DB_LICENCE & "." & DB_DATE & ", '" & Format(DateTime.Now.AddYears(-1), "yyyy-MM-dd") & "') > 0 " &
|
||||
" AND DATEDIFF(" & DB_LICENCE & "." & DB_DATE & ", '" & Format(DateTime.Now.AddYears(-1), "yyyy-MM-dd") & "') < " & DaysBeforeExpiration
|
||||
" AND DATEDIFF(" & DB_LICENCE & "." & DB_DATE & ", '" & Format(DateTime.Now.AddYears(-1), "yyyy-MM-dd") & "') > 0 "
|
||||
' & " AND DATEDIFF(" & DB_LICENCE & "." & DB_DATE & ", '" & Format(DateTime.Now.AddYears(-1), "yyyy-MM-dd") & "') < " & DaysBeforeExpiration
|
||||
|
||||
m_SearchResult = New ObservableCollection(Of SearchLicence)(ManageDb.ExecuteExpiringLicenceQuery(Query, ProductList, ClientList))
|
||||
Dim TempSearchResult As ObservableCollection(Of SearchLicence) = New ObservableCollection(Of SearchLicence)(ManageDb.ExecuteExpiringLicenceQuery(Query, ProductList, ClientList))
|
||||
m_SearchResult = New ObservableCollection(Of SearchLicence)
|
||||
For Each ItemToAdd In TempSearchResult
|
||||
If (New Date(ItemToAdd.ExpirationDate.Year, ItemToAdd.ExpirationDate.Month, ItemToAdd.ExpirationDate.Day) - Date.Now).TotalDays >= 0 And
|
||||
(New Date(ItemToAdd.ExpirationDate.Year, ItemToAdd.ExpirationDate.Month, ItemToAdd.ExpirationDate.Day) - Date.Now).TotalDays < DaysBeforeExpiration Then
|
||||
m_SearchResult.Add(ItemToAdd)
|
||||
End If
|
||||
Next
|
||||
NotifyPropertyChanged("SearchResult")
|
||||
|
||||
If m_SearchResult.Count > 0 Then
|
||||
|
||||
@@ -224,6 +224,18 @@ Public Class Licence
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExpirationDate As Date
|
||||
Get
|
||||
If ProductVersion.Length > 3 Then
|
||||
' Es. se ProductVersion = 2402 la licenza scade il 01/02/2023, dove 2023 è 24 + 1999
|
||||
Dim nYear As Integer = CInt(ProductVersion.Substring(0, 2)) + 1999
|
||||
Dim nMonth As Integer = CInt(ProductVersion.Substring(2, 2))
|
||||
Return New Date(nYear, nMonth, 1)
|
||||
End If
|
||||
Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LicFile As String
|
||||
Public ReadOnly Property LicFile As String
|
||||
Get
|
||||
|
||||
@@ -59,5 +59,5 @@ Imports System.Windows
|
||||
' usando l'asterisco '*' come illustrato di seguito:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.2.1")>
|
||||
<Assembly: AssemblyVersion("2.4.3.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.3.1")>
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
<DataGridTextColumn Header="ProductName"
|
||||
Binding="{Binding ProductName, Mode=OneWay}"
|
||||
Width="1*"/>
|
||||
Width="0.7*"/>
|
||||
<DataGridTextColumn Header="ProductVersion"
|
||||
Binding="{Binding ProductVersion, Mode=OneWay}"
|
||||
Width="SizeToHeader"/>
|
||||
@@ -265,16 +265,19 @@
|
||||
Width="1*"/>
|
||||
<DataGridTextColumn Header="File"
|
||||
Binding="{Binding File, Mode=OneWay}"
|
||||
Width="1*"/>
|
||||
Width="2*"/>
|
||||
<DataGridTextColumn Header="License Date"
|
||||
Binding="{Binding LicenseDate, Mode=OneWay, StringFormat=\{0:dd/MM/yyyy\}}"
|
||||
Width="SizeToHeader"/>
|
||||
<DataGridTextColumn Header="License File Content"
|
||||
<!--<DataGridTextColumn Header="License File Content"
|
||||
Binding="{Binding LicFile, Mode=OneWay}"
|
||||
Width="1*"/>
|
||||
Width="1*"/>-->
|
||||
<DataGridTextColumn Header="Expiration Date"
|
||||
Binding="{Binding ExpirationDate, Mode=OneWay, StringFormat=\{0:dd/MM/yyyy\}}"
|
||||
Width="SizeToHeader"/>
|
||||
<DataGridTextColumn Header="Note"
|
||||
Binding="{Binding Note, Mode=OneWay}"
|
||||
Width="1*"/>
|
||||
Width="2*"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user