From c6f4179ee544bdabe0cff7962c448cdf91f3571a Mon Sep 17 00:00:00 2001 From: Renzo Lanza Date: Wed, 8 Jan 2020 16:12:26 +0000 Subject: [PATCH] =?UTF-8?q?LicenceManager=202.2a1:=20-=20aggiunti=20i=20ca?= =?UTF-8?q?mpi=20NestKey=20e=20NestDeadline=20in=20New/UpdateLicencePage?= =?UTF-8?q?=20-=20NestKey=20e=20NestDeadline=20vengono=20scritti=20nel=20D?= =?UTF-8?q?B,=20mentre=20il=20solo=20NestKey=20viene=20scritto=20nei=20fil?= =?UTF-8?q?e=20.Kge=20e=20.lic=20-=20Nel=20LicenceBox=20NestKey=20=C3=A8?= =?UTF-8?q?=20nel=20contenuto=20del=20file=20mentre=20NestDeadline=20in=20?= =?UTF-8?q?un=20campo=20a=20s=C3=A8=20-=20correzione=20refresh=20tabella?= =?UTF-8?q?=20DB=20Licenze=20dopo=20l'Update=20di=20una=20Licenza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Constants/ConstDb.vb | 2 + LicenceBox/LicenceBoxV.xaml | 14 +++ LicenceBox/LicenceBoxVM.vb | 53 +++++++++ My Project/AssemblyInfo.vb | 4 +- NewLicencePage/NewLicencePageV.xaml | 31 ++++- NewLicencePage/NewLicencePageVM.vb | 82 ++++++++++++- SearchLicencePage/SearchLicencePageVM.vb | 12 +- UpdateLicencePage/UpdateLicencePageV.xaml | 33 ++++- UpdateLicencePage/UpdateLicencePageVM.vb | 139 ++++++++++++++++++++-- 9 files changed, 340 insertions(+), 30 deletions(-) diff --git a/Constants/ConstDb.vb b/Constants/ConstDb.vb index 42f1d4e..4e16596 100644 --- a/Constants/ConstDb.vb +++ b/Constants/ConstDb.vb @@ -37,5 +37,7 @@ Public Const DB_LICFILE As String = "LicFile" Public Const DB_NOTE As String = "Note" Public Const DB_SERIALE As String = "Seriale" + Public Const DB_NESTKEY As String = "NestKey" + Public Const DB_NESTDEADLINE As String = "NestDeadline" End Module diff --git a/LicenceBox/LicenceBoxV.xaml b/LicenceBox/LicenceBoxV.xaml index 62bbd28..87d725d 100644 --- a/LicenceBox/LicenceBoxV.xaml +++ b/LicenceBox/LicenceBoxV.xaml @@ -108,6 +108,7 @@ + @@ -136,6 +137,19 @@ Grid.Row="1" IsReadOnly="True" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/> + + + + diff --git a/LicenceBox/LicenceBoxVM.vb b/LicenceBox/LicenceBoxVM.vb index 865b9f6..2ea81ea 100644 --- a/LicenceBox/LicenceBoxVM.vb +++ b/LicenceBox/LicenceBoxVM.vb @@ -50,6 +50,38 @@ Public Class LicenceBoxVM End Set End Property + Private m_NestDeadline As String + Public Property NestDeadline As String + Get + Return m_NestDeadline + End Get + Set(value As String) + m_NestDeadline = value + End Set + End Property + + Private m_NestDlTxBl_Visibility As Visibility + Public Property NestDlTxBl_Visibility As Visibility + Get + Return m_NestDlTxBl_Visibility + End Get + Set(value As Visibility) + m_NestDlTxBl_Visibility = value + NotifyPropertyChanged("NestDlTxBl_Visibility") + End Set + End Property + + Private m_NestDlTxBx_Visibility As Visibility + Public Property NestDlTxBx_Visibility As Visibility + Get + Return m_NestDlTxBx_Visibility + End Get + Set(value As Visibility) + m_NestDlTxBx_Visibility = value + NotifyPropertyChanged("NestDlTxBx_Visibility") + End Set + End Property + Public ReadOnly Property Option1Msg As String Get Return "Option 1" @@ -74,6 +106,12 @@ Public Class LicenceBoxVM End Get End Property + Public ReadOnly Property NestDeadlineMsg As String + Get + Return "Nesting deadline" + End Get + End Property + Public ReadOnly Property DownloadMsg As String Get Return "Download" @@ -107,6 +145,21 @@ Public Class LicenceBoxVM m_OptionDeadline = CType(Map.refSearchLicencePageVM.Row.Item, Licence).OptionDeadline.ToShortDateString() NotifyPropertyChanged("OptionDeadline") + m_NestDlTxBl_Visibility = Visibility.Hidden + m_NestDlTxBx_Visibility = Visibility.Hidden + + ' Cerco NestDeadline associato alla Licenza, se presente lo visualizzo + Dim licId As String = CType(Map.refSearchLicencePageVM.Row.Item, Licence).LicenceID + Dim Query As String = "SELECT " & DB_NESTDEADLINE & " FROM " & DB_LICENCE & " WHERE " & DB_LICENCEID & " = " & licId + Dim NestDl As String = ManageDb.ExecuteStringQuery(Query, DB_NESTDEADLINE)(0) + If Not String.IsNullOrWhiteSpace(NestDl) Or Not String.IsNullOrEmpty(NestDl) Then + m_NestDlTxBl_Visibility = Visibility.Visible + m_NestDlTxBx_Visibility = Visibility.Visible + m_NestDeadline = NestDl + NotifyPropertyChanged("NestDeadline") + End If + + ' Inizializzo liste opzioni LoadOptions(1, m_Option1) LoadOptions(2, m_Option2) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index fc938de..5719c6b 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -59,5 +59,5 @@ Imports System.Windows ' usando l'asterisco '*' come illustrato di seguito: ' - - + + diff --git a/NewLicencePage/NewLicencePageV.xaml b/NewLicencePage/NewLicencePageV.xaml index 5d70d2e..fe32e17 100644 --- a/NewLicencePage/NewLicencePageV.xaml +++ b/NewLicencePage/NewLicencePageV.xaml @@ -34,6 +34,7 @@ + @@ -164,8 +165,30 @@ Grid.Row="4" Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left" Width="Auto" /> + + + + + + + + + Grid.Row="6" Grid.ColumnSpan="4"> @@ -185,7 +208,7 @@ + Grid.Row="7" Grid.ColumnSpan="4"> @@ -208,14 +231,14 @@