- aggiunta gestione nome progetto
- miglioramenti filtri data
This commit is contained in:
+37
-13
@@ -12,8 +12,7 @@ Public Class NewOpenProjectFileDialogVM
|
||||
|
||||
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
m_ProjectType = ProjectType
|
||||
' carico colonne
|
||||
LoadColumns(ProjectType)
|
||||
|
||||
NotifyPropertyChanged(NameOf(FilterTypeList))
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
' carico lista progetti
|
||||
@@ -62,7 +61,7 @@ Public Class NewOpenProjectFileDialogVM
|
||||
If m_SelBTLDateType = BTLDateTypes.CREATEDATE Then
|
||||
DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, nRowQuantity, True)
|
||||
Else
|
||||
DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity, False)
|
||||
DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity, True)
|
||||
End If
|
||||
For Each Project In DbProjList
|
||||
' recupero path per verificare esista
|
||||
@@ -247,20 +246,23 @@ Public Class NewOpenProjectFileDialogVM
|
||||
'Dim ProjListIndex As Integer = m_ProjectList.IndexOf(SelProject)
|
||||
'If m_ProjectType = ProjectType.PROJ Then
|
||||
' ' verifico se proj selezionato e' il corrente
|
||||
' If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso SelProject.nProjId = Map.refProjManagerVM.CurrProj.nProjId Then
|
||||
' If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso SelProject.ProjFileList.Any(Function(x) x.nProjId = Map.refProjManagerVM.CurrProj.nProjId) Then
|
||||
' MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Return
|
||||
' End If
|
||||
' ' verifico se proj selezionato ha prod
|
||||
' If SelProject.nProdId > 0 Then
|
||||
' If Not IsNothing(SelProject.ProdFileVM) AndAlso SelProject.ProdFileVM.nProdId > 0 Then
|
||||
' MessageBox.Show(EgtMsg(61873), EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Return
|
||||
' End If
|
||||
' Map.refProjManagerVM.m_MruFiles.Remove(SelProject.sProjPath)
|
||||
' ' rimuovo dai progetti correnti
|
||||
' For Each Project In SelProject.ProjFileList
|
||||
' Map.refProjManagerVM.m_MruFiles.Remove(Project.sProjPath)
|
||||
' Next
|
||||
' Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
|
||||
' ' cancello progetto
|
||||
' ' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
' DbControllers.m_ProjController.DeleteProj(SelProject.nProjId, False)
|
||||
' DbControllers.m_ProjController.DeleteProj(SelProject.nProjId, True)
|
||||
' ' cancello cartella del Proj
|
||||
' Try
|
||||
' Directory.Delete(SelProject.sProjDirPath, True)
|
||||
@@ -268,12 +270,13 @@ Public Class NewOpenProjectFileDialogVM
|
||||
' EgtOutLog("Error in deleting directory " & SelProject.sProjDirPath)
|
||||
' End Try
|
||||
' ' aggiorno lista progetti
|
||||
' m_ProjectList.Clear()
|
||||
' Dim DbProjectList As New List(Of ProjFileM)
|
||||
' DbProjectList = DbControllers.m_ProjController.GetLastDesc(50, False)
|
||||
' For Each Project In DbProjectList
|
||||
' m_ProjectList.Add(New ProjFileVM(Project))
|
||||
' Next
|
||||
' RefreshProjectList()
|
||||
' 'm_ProjectList.Clear()
|
||||
' 'Dim DbProjectList As New List(Of ProjFileM)
|
||||
' 'DbProjectList = DbControllers.m_ProjController.GetLastDesc(50, False)
|
||||
' 'For Each Project In DbProjectList
|
||||
' ' m_ProjectList.Add(New ProjFileVM(Project))
|
||||
' 'Next
|
||||
'ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
' ' verifico se prod selezionato e' il corrente
|
||||
' If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso SelProject.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
|
||||
@@ -366,3 +369,24 @@ Public Class NewOpenProjectFileDialogVM
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ProdItem
|
||||
Inherits Core.ProdItem
|
||||
|
||||
Public Overrides Property sName As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sName, "")
|
||||
End Get
|
||||
Set(value As String)
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
DbControllers.m_ProdController.UpdateDescription(m_ProdFileVM.nProdId, value)
|
||||
m_ProdFileVM.sName = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVM As ProjectFileVM)
|
||||
MyBase.New(ProdFileVM, ProjFileVM)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user