Corretto Proj in Part

Aggiornamenti per gestione Prod
This commit is contained in:
Emmanuele Sassi
2021-03-05 18:32:45 +01:00
parent 52d592ff71
commit 268f7c412f
9 changed files with 44 additions and 14 deletions
@@ -100,7 +100,13 @@ Public Class OpenProjectFileDialogVM
m_ProjectType = ProjectType
If IsNothing(ProjectList) OrElse ProjectList.Count = 0 Then
' leggo da db
For Each Project In DbControllers.m_ProjController.GetLastDesc(50)
Dim DbProjectList As New List(Of Core.ProjectFile)
If ProjectType = ProjectType.PROJ Then
DbProjectList = DbControllers.m_ProjController.GetLastDesc(50)
ElseIf ProjectType = ProjectType.PROD Then
DbProjectList = DbControllers.m_ProdController.GetLastDesc(50)
End If
For Each Project In DbProjectList
m_ProjectList.Add(New ProjectFile(Project.nProjectType, Project.nProjId, Project.nProdId, Project.BTLFileName))
Next
'' cartella da cui leggere i programmi
@@ -139,6 +145,9 @@ Public Class OpenProjectFileDialogVM
'End Function
Friend Function VerifySelected() As Boolean
If SelProject.nProjectType = Core.ConstBeam.ProjectType.PROJ Then
' verifico se esiste ProdId
For Each File In SelProject.sProjDirPath
If Path.GetExtension(File).ToLower() = ".nge" Then
Return True