- Gestita assenza cartella in progetto presente su Db

- Correzione su solido con multiselezione
- Correzione su sezione selezionata dopo rotazione con selezione multipla
- Progetti Db senza cartella di progetto vengono eliminati da Db
- Rotazione pareti aggiunte da UpdateBTL se macchina girata
This commit is contained in:
Emmanuele Sassi
2022-05-04 19:38:00 +02:00
parent e9eaff2685
commit 22539226e6
5 changed files with 61 additions and 7 deletions
@@ -23,21 +23,45 @@ Public Class OpenProjectFileDialogVM
Dim DbProjectList As New List(Of ProjFileM)
DbProjectList = DbControllers.m_ProjController.GetLastDesc(5000)
For Each Project In DbProjectList
m_ProjectList.Add(New ProjFileVM(Project))
' recupero path per verificare esista
If IsNothing(Project.nProjId) OrElse Project.nProjId = 0 Then Continue For
Dim sPath As String = Map.refMainWindowVM.MainWindowM.sProjsDir & "\" & Project.nProjId.ToString("0000") & "\" & Project.nProjId.ToString("0000") & ".nge"
If File.Exists(sPath) Then
m_ProjectList.Add(New ProjFileVM(Project))
Else
DbControllers.m_ProjController.DeleteProj(Project.nProjId)
EgtOutLog("Found project on Db without the folder and erased it! Proj number " & Project.nProjId.ToString("0000"))
End If
Next
ElseIf ProjectType = ProjectType.PROD Then
Dim DbProjectList As New List(Of ProdFileM)
DbProjectList = DbControllers.m_ProdController.GetLastDesc(5000)
If GoToProd Then
For Each Project In DbProjectList
' recupero path per verificare esista
If IsNothing(Project.nProdId) OrElse Project.nProdId = 0 Then Continue For
Dim sPath As String = Map.refMainWindowVM.MainWindowM.sProdsDir & "\" & Project.nProdId.ToString("0000") & "\" & Project.nProdId.ToString("0000") & ".nge"
If Project.sMachine = Map.refProjManagerVM.CurrProj.sMachine AndAlso
Project.nType = Map.refProjManagerVM.CurrProj.nType Then
m_ProjectList.Add(New ProdFileVM(Project))
If File.Exists(sPath) Then
m_ProjectList.Add(New ProdFileVM(Project))
Else
DbControllers.m_ProdController.DeleteProd(Project.nProdId)
EgtOutLog("Found project on Db without the folder and erased it! Prod number " & Project.nProdId.ToString("0000"))
End If
End If
Next
Else
For Each Project In DbProjectList
m_ProjectList.Add(New ProdFileVM(Project))
' recupero path per verificare esista
If IsNothing(Project.nProdId) OrElse Project.nProdId = 0 Then Continue For
Dim sPath As String = Map.refMainWindowVM.MainWindowM.sProdsDir & "\" & Project.nProdId.ToString("0000") & "\" & Project.nProdId.ToString("0000") & ".nge"
If File.Exists(sPath) Then
m_ProjectList.Add(New ProdFileVM(Project))
Else
DbControllers.m_ProdController.DeleteProd(Project.nProdId)
EgtOutLog("Found project on Db without the folder and erased it! Prod number " & Project.nProdId.ToString("0000"))
End If
Next
End If
End If