LicenceManager 2.3e2: -aggiunti Try-Catch e Msg errore per l'esecuzione non corretta di KeyGenerator
-Trim degli spazi iniziali e finali del nome del cliente nuovo o aggiornato
This commit is contained in:
@@ -59,5 +59,5 @@ Imports System.Windows
|
||||
' usando l'asterisco '*' come illustrato di seguito:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.5.1")>
|
||||
<Assembly: AssemblyVersion("2.3.5.2")>
|
||||
<Assembly: AssemblyFileVersion("2.3.5.2")>
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class NewClientPageVM
|
||||
Not IsNothing(SelReseller) Then
|
||||
' Aggiungo un rivenditore al Db
|
||||
Dim Query As String = "INSERT INTO " & DB_CLIENT & " (" & DB_NAME & ", " & DB_RESELLERID & ", " & DB_EMAIL & ")" &
|
||||
" VALUES ('" & m_Name & "', " &
|
||||
" VALUES ('" & Trim(m_Name) & "', " &
|
||||
"'" & SelReseller.ResellerID & "', " &
|
||||
"'" & m_Email & "')"
|
||||
ManageDb.ExecuteQuery(Query)
|
||||
|
||||
@@ -580,15 +580,25 @@ Public Class NewLicencePageVM
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & fileName & """ 1"
|
||||
Dim proc As Process = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
Dim proc As Process = Nothing
|
||||
Try
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & fileName & """ 1"
|
||||
proc = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
Catch ex As Exception
|
||||
If File.Exists(Map.refMainWindowVM.MainWindowM.sKeygenPath) Then
|
||||
MessageBox.Show("Errore nell'esecuzione di KeyGenerator", "LicenceManager Error")
|
||||
Else
|
||||
MessageBox.Show("Il percorso di KeyGenerator specificato nel file INI non esiste", "LicenceManager Error")
|
||||
End If
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Errore nella generazione della licenza
|
||||
If proc.ExitCode <> 0 Then
|
||||
|
||||
@@ -130,7 +130,7 @@ Public Class UpdateClientPageVM
|
||||
Query &= " SET "
|
||||
If Not String.IsNullOrWhiteSpace(Name) Then
|
||||
EvalWhere(bFirstWhere, Query)
|
||||
Query &= DB_NAME & " = '" & Name & "' "
|
||||
Query &= DB_NAME & " = '" & Trim(Name) & "' "
|
||||
End If
|
||||
If Not String.IsNullOrWhiteSpace(Email) Then
|
||||
EvalWhere(bFirstWhere, Query)
|
||||
|
||||
@@ -664,15 +664,25 @@ Public Class UpdateLicencePageVM
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & FilePath & """ 1"
|
||||
Dim proc As Process = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
Dim proc As Process = Nothing
|
||||
Try
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & FilePath & """ 1"
|
||||
proc = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
Catch
|
||||
If File.Exists(Map.refMainWindowVM.MainWindowM.sKeygenPath) Then
|
||||
MessageBox.Show("Errore nell'esecuzione di KeyGenerator", "LicenceManager Error")
|
||||
Else
|
||||
MessageBox.Show("Il percorso di KeyGenerator specificato nel file INI non esiste", "LicenceManager Error")
|
||||
End If
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Errore nella generazione della licenza
|
||||
If proc.ExitCode <> 0 Then
|
||||
@@ -842,15 +852,25 @@ Public Class UpdateLicencePageVM
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & FilePath & """ 1"
|
||||
Dim proc As Process = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
Dim proc As Process = Nothing
|
||||
Try
|
||||
' Lancio il generatore di licenza
|
||||
Dim sParams As String = """" & FilePath & """ 1"
|
||||
proc = Process.Start(Map.refMainWindowVM.MainWindowM.sKeygenPath, sParams)
|
||||
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
' Attendo il termine del processo
|
||||
While Not proc.HasExited
|
||||
proc.Refresh()
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End While
|
||||
Catch
|
||||
If File.Exists(Map.refMainWindowVM.MainWindowM.sKeygenPath) Then
|
||||
MessageBox.Show("Errore nell'esecuzione di KeyGenerator", "LicenceManager Error")
|
||||
Else
|
||||
MessageBox.Show("Il percorso di KeyGenerator specificato nel file INI non esiste", "LicenceManager Error")
|
||||
End If
|
||||
Return
|
||||
End Try
|
||||
|
||||
' Errore nella generazione della licenza
|
||||
If proc.ExitCode <> 0 Then
|
||||
|
||||
Reference in New Issue
Block a user