Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9eb30b0697 | |||
| 0c73db4f52 | |||
| 23b2606cbc | |||
| 1f36c9a5b0 | |||
| ce20fa0eb3 | |||
| c32715a4b5 | |||
| 52c0b6b194 | |||
| a83752e565 | |||
| 60e72aaf22 | |||
| ec2ce96b3b | |||
| d131e0b42d | |||
| efea14db89 | |||
| c09d8a6b0f | |||
| 946ad1d29c | |||
| c5f1d1669f | |||
| 689e81219b | |||
| 05ec565f84 | |||
| 0e7866922d | |||
| fb92f9faea | |||
| f65d07ab22 | |||
| f140b6df54 | |||
| 441ddc4397 | |||
| 8c42493382 |
@@ -23,5 +23,8 @@
|
||||
Public Const COL_USAGE As String = "colUSAGE"
|
||||
Public Const COL_WASTE As String = "colWASTE"
|
||||
Public Const COL_ARCHIVED As String = "colARCHIVED"
|
||||
Public Const COL_PROJID As String = "colPROJID"
|
||||
Public Const COL_PRODID As String = "colPRODID"
|
||||
Public Const COL_CREATEDATE As String = "colCRTDATE"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
|
||||
<Compile Include="ProjectFileVM\ProdItem.vb" />
|
||||
<Compile Include="Utility\DimensionsIniFile.vb" />
|
||||
<Compile Include="Utility\Enum.vb" />
|
||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox ItemsSource="{Binding FilterTypeList}"
|
||||
SelectedItem="{Binding SelFilterType}"
|
||||
@@ -80,6 +81,17 @@
|
||||
Visibility="{Binding SearchText_Visibility}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="Page index"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Content="<"
|
||||
Command="{Binding PrevPage_Command}" />
|
||||
<TextBlock Text="{Binding nPageIndex}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<Button Content=">"
|
||||
Command="{Binding NextPage_Command}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding Rows_Msg}"
|
||||
Style="{StaticResource OptionTextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding RowQuantityList}"
|
||||
@@ -92,7 +104,7 @@
|
||||
|
||||
<EgtBEAMWALL:EgtDataGrid x:Name="MainDataGrid"
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding ProjectList}"
|
||||
ItemsSource="{Binding PageList}"
|
||||
SelectedItem="{Binding SelProject}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
@@ -104,10 +116,12 @@
|
||||
Margin="5"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
CellEditEnding="MainDataGrid_CellEditEnding"
|
||||
BindingColumns="{Binding ProdColumns}">
|
||||
BindingColumns="{Binding ProdColumns}"
|
||||
Sorting="MainDataGrid_Sorting">
|
||||
<DataGrid.Resources>
|
||||
<!-- ProdId -->
|
||||
<DataGridTextColumn x:Key="colPRODID" Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn x:Key="colPRODID"
|
||||
Binding="{Binding sProdId}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Id_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
@@ -115,7 +129,8 @@
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Name-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn x:Key="colNAME"
|
||||
Binding="{Binding sName}">
|
||||
<DataGridTextColumn.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -134,19 +149,23 @@
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Creation date -->
|
||||
<DataGridTextColumn x:Key="colCRTDATE" Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn x:Key="colCRTDATE"
|
||||
Binding="{Binding dtCreateDate}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.CreateDate_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Machine -->
|
||||
<DataGridTextColumn x:Key="colMACHINE" Binding="{Binding sMachine}">
|
||||
<DataGridTextColumn x:Key="colMACHINE"
|
||||
Binding="{Binding sMachine}"
|
||||
CanUserSort="False">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.Machine_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:NewOpenProjectFileDialogV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
</DataGridTextColumn>
|
||||
<!-- Archived -->
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED">
|
||||
<DataGridTemplateColumn x:Key="colARCHIVED"
|
||||
CanUserSort="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="\Resources\OpenProjectFileDialog\Archived.png"
|
||||
|
||||
@@ -83,4 +83,182 @@ Public Class NewOpenProjectFileDialogV
|
||||
'm_OpenProjFileDialogVM.SetIsEditNameActive(False)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Private Sub MainDataGrid_Sorting(sender As Object, e As DataGridSortingEventArgs)
|
||||
' aggiorno direziona colonna
|
||||
Dim column As DataGridColumn = e.Column
|
||||
column.SortDirection = If((column.SortDirection <> ListSortDirection.Ascending), ListSortDirection.Ascending, ListSortDirection.Descending)
|
||||
'' ricalcolo colonne sort
|
||||
'Dim datagrid As DataGrid = sender
|
||||
'ProdItemComparer.RefreshColumns()
|
||||
'' lancio sort custom
|
||||
'm_OpenProjFileDialogVM.RefreshProdItemSort()
|
||||
m_OpenProjFileDialogVM.SortPageList()
|
||||
m_OpenProjFileDialogVM.UpdatePageList()
|
||||
e.Handled = True
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Friend Class ProdItemComparer
|
||||
Implements IComparer
|
||||
|
||||
Private Shared DataGrid As DataGrid
|
||||
Friend Shared Sub SetDataGrid(value As DataGrid)
|
||||
DataGrid = value
|
||||
End Sub
|
||||
|
||||
Private Shared m_OpenProjFileDialogVM As NewOpenProjectFileDialogVM
|
||||
Friend Shared Sub SetOpenProjFileDialogVM(value As NewOpenProjectFileDialogVM)
|
||||
m_OpenProjFileDialogVM = value
|
||||
End Sub
|
||||
|
||||
Private Shared m_ColumnList As New List(Of DataGridColumn)
|
||||
Private Shared m_EgtColumnList As New List(Of EgtDataGridColumn)
|
||||
|
||||
Friend Shared Sub RefreshColumns()
|
||||
m_ColumnList.Clear()
|
||||
m_EgtColumnList.Clear()
|
||||
For Each col In DataGrid.Columns
|
||||
If Not IsNothing(col.SortDirection) Then
|
||||
m_ColumnList.Add(col)
|
||||
m_EgtColumnList.Add(m_OpenProjFileDialogVM.ProdColumns(col.DisplayIndex))
|
||||
End If
|
||||
Next
|
||||
' Map.refRawPartListVM.SetRawPartListSorted(m_ColumnList.Count > 0)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function Compare(x As Object, y As Object) As Integer Implements IComparer.Compare
|
||||
' Dim First As MyMachGroupVM = DirectCast(x, MyMachGroupVM)
|
||||
' Dim Second As MyMachGroupVM = DirectCast(y, MyMachGroupVM)
|
||||
' Dim bFirstProduced As Boolean = First.nProduction_State = Core.ItemState.WIP OrElse First.nProduction_State = Core.ItemState.Produced
|
||||
' Dim bSecondProduced As Boolean = Second.nProduction_State = Core.ItemState.WIP OrElse Second.nProduction_State = Core.ItemState.Produced
|
||||
' Dim bFirstInQueue As Boolean = First.bToBeProduced
|
||||
' Dim bSecondInQueue As Boolean = Second.bToBeProduced
|
||||
' ' verifico se gia' prodotti
|
||||
' If bFirstProduced AndAlso bSecondProduced Then
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' ElseIf bFirstProduced Then
|
||||
' Return -1
|
||||
' ElseIf bSecondProduced Then
|
||||
' Return 1
|
||||
' ElseIf bFirstInQueue AndAlso bSecondInQueue Then
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' ElseIf bFirstInQueue Then
|
||||
' Return -1
|
||||
' ElseIf bSecondInQueue Then
|
||||
' Return 1
|
||||
' Else
|
||||
' ' verifico ordine per colonne
|
||||
' Dim ColumnIndex = 0
|
||||
' While ColumnIndex <= m_EgtColumnList.Count - 1
|
||||
' Dim nDir As ListSortDirection = If(m_ColumnList(ColumnIndex).SortDirection, 1, -1)
|
||||
' Dim nCheck As Integer = Check(First, Second, nDir, m_EgtColumnList(ColumnIndex))
|
||||
' If nCheck <> 0 Then
|
||||
' Return nCheck
|
||||
' End If
|
||||
' ColumnIndex += 1
|
||||
' End While
|
||||
' ' se non trovo colonne, metto in ordine indice di produzione
|
||||
' If First.nProductionIndex > Second.nProductionIndex Then
|
||||
' Return 1
|
||||
' ElseIf First.nProductionIndex < Second.nProductionIndex Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' End If
|
||||
End Function
|
||||
|
||||
Private Function Check(First As MyMachGroupVM, Second As MyMachGroupVM, nDirection As Integer, Column As EgtDataGridColumn) As Integer
|
||||
Select Case Column.Name
|
||||
Case COL_NAME
|
||||
If First.nName > Second.nName Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.nName < Second.nName Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_STARTCUT
|
||||
If First.Id > Second.Id Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.Id < Second.Id Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_W
|
||||
If First.dW > Second.dW Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dW < Second.dW Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_H
|
||||
If First.dH > Second.dH Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dH < Second.dH Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_L
|
||||
If First.dL > Second.dL Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dL < Second.dL Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_POSZ
|
||||
'If First.posz > Second.dL Then
|
||||
' Return 1 * nDirection
|
||||
'ElseIf First.dL < Second.dL Then
|
||||
' Return -1 * nDirection
|
||||
'Else
|
||||
' Return 0
|
||||
'End If
|
||||
Case COL_MATERIAL
|
||||
If First.sMATERIAL > Second.sMATERIAL Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.sMATERIAL < Second.sMATERIAL Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_USAGE
|
||||
If First.dUsage > Second.dUsage Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dUsage < Second.dUsage Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
Case COL_WASTE
|
||||
If First.dWaste > Second.dWaste Then
|
||||
Return 1 * nDirection
|
||||
ElseIf First.dWaste < Second.dWaste Then
|
||||
Return -1 * nDirection
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Select
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -19,7 +19,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
EXPORTDATE = 1
|
||||
End Enum
|
||||
|
||||
Private Enum FilterTypes As Integer
|
||||
Protected Enum FilterTypes As Integer
|
||||
NULL = 0
|
||||
ID = 1
|
||||
BTLFILENAME = 2
|
||||
@@ -36,9 +36,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Enum
|
||||
|
||||
Public Enum RowQuantities As Integer
|
||||
FIFTY = 0
|
||||
HUNDRED = 1
|
||||
HUNDREDANDFIFTY = 2
|
||||
TEN = 0
|
||||
TWENTY = 1
|
||||
THIRTY = 2
|
||||
End Enum
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
@@ -67,6 +67,27 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colProjId_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colProjId_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colProjId_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colProdId_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colProdId_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colProdId_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_colCreateDate_Name As EgtDataGridColumn
|
||||
Public ReadOnly Property colCreateDate_Name As EgtDataGridColumn
|
||||
Get
|
||||
Return m_colCreateDate_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property ProjColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
@@ -106,7 +127,13 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public m_ProjectList_View As CollectionView = Nothing
|
||||
Private m_ProjectList_View As CollectionView = Nothing
|
||||
Public ReadOnly Property ProjectList_View As CollectionView
|
||||
Get
|
||||
Return m_ProjectList_View
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_ProjectList As New ObservableCollection(Of ProdItem)
|
||||
Public ReadOnly Property ProjectList As ObservableCollection(Of ProdItem)
|
||||
Get
|
||||
@@ -185,7 +212,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Set(value As Integer)
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -227,7 +255,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
NotifyPropertyChanged(NameOf(Date_Visibility))
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -242,7 +271,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_STARTDATE, lStartDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -257,7 +287,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_ENDDATE, lEndDate.ToString())
|
||||
' aggiorno lista da Db
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -275,7 +306,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelRowQuantity As RowQuantities
|
||||
Protected m_SelRowQuantity As RowQuantities
|
||||
Public Property SelRowQuantity As Integer
|
||||
Get
|
||||
Return m_SelRowQuantity
|
||||
@@ -283,7 +314,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Set(value As Integer)
|
||||
m_SelRowQuantity = value
|
||||
RefreshProjectList()
|
||||
m_ProjectList_View.Refresh()
|
||||
' m_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -308,7 +340,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
If Not IsNothing(SearchDate) Then SearchDate.Clear()
|
||||
' setto il Tipo Filtro a NULL e refresho la lista dei progetti (in modo da averli visibili tutti)
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
' ora setto il valore scelto come Tipo Filtro
|
||||
m_SelFilterType = value
|
||||
Select Case m_SelFilterType.Id
|
||||
@@ -332,7 +365,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_SearchText = value
|
||||
m_ProjectList_View.Refresh()
|
||||
'm_ProjectList_View.Refresh()
|
||||
UpdatePageList()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -390,9 +424,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Set(value As Boolean)
|
||||
m_bViewArchived = value
|
||||
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
|
||||
If Not IsNothing( m_colArchived_Name) Then
|
||||
m_colArchived_Name.Visible = value
|
||||
RefreshProjectList()
|
||||
If Not IsNothing(m_colArchived_Name) Then
|
||||
m_colArchived_Name.Visible = value
|
||||
RefreshProjectList()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -419,6 +453,30 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
NotifyPropertyChanged(NameOf(bDelete_IsEnabled))
|
||||
End Sub
|
||||
|
||||
Private m_PageList_View As ListCollectionView = Nothing
|
||||
Public ReadOnly Property PageList_View As ListCollectionView
|
||||
Get
|
||||
Return m_PageList_View
|
||||
End Get
|
||||
End Property
|
||||
Protected m_PageList As New ObservableCollection(Of ProdItem)
|
||||
Public Property PageList As ObservableCollection(Of ProdItem)
|
||||
Get
|
||||
Return m_PageList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of ProdItem))
|
||||
m_PageList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPageIndex As Integer = 1
|
||||
Public ReadOnly Property nPageIndex As Integer
|
||||
Get
|
||||
Return m_nPageIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Protected m_ChangeOpenedProjectOnCancel As Boolean = False
|
||||
|
||||
#Region "Messages"
|
||||
@@ -545,6 +603,8 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdArchive As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdPrevPage As ICommand
|
||||
Private m_cmdNextPage As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
@@ -555,6 +615,9 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
LoadColumns()
|
||||
m_colProdFile_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_NAME)
|
||||
m_colArchived_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_ARCHIVED)
|
||||
m_colProjId_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_PROJID)
|
||||
m_colProdId_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_PRODID)
|
||||
m_colCreateDate_Name = m_ProdColumns.FirstOrDefault(Function(x) x.Name = COL_CREATEDATE)
|
||||
' leggo valori per filtri
|
||||
m_SelDayType = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_DAYTYPE, 0)
|
||||
Select Case m_SelDayType
|
||||
@@ -589,6 +652,29 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Public Overridable Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
End Sub
|
||||
|
||||
|
||||
Private m_ProdItemComparer As ProdItemComparer
|
||||
Friend ReadOnly Property ProdItemComparer As ProdItemComparer
|
||||
Get
|
||||
Return m_ProdItemComparer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub SetPageListView()
|
||||
m_PageList_View = CollectionViewSource.GetDefaultView(m_PageList)
|
||||
m_ProdItemComparer = New ProdItemComparer
|
||||
m_PageList_View.CustomSort = m_ProdItemComparer
|
||||
NotifyPropertyChanged(NameOf(PageList_View))
|
||||
End Sub
|
||||
|
||||
Friend Sub RefreshProdItemSort()
|
||||
m_PageList_View.CustomSort = m_ProdItemComparer
|
||||
End Sub
|
||||
|
||||
Friend Sub SortPageList()
|
||||
' m_ProjectList = New ObservableCollection(Of ProdItem)(m_ProjectList.OrderBy(Of Integer)(Function(x) If(String.IsNullOrWhiteSpace(x.sProdId), 0, CInt(x.sProdId))))
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns()
|
||||
'If ProjectType = ProjectType.PROJ Then
|
||||
' carico le colonne della datagrid
|
||||
@@ -650,17 +736,69 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
Return AllFilesInDir.Any(Function(x) Path.GetExtension(x).ToLower() = ".nge")
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
'If TypeOf Proj Is ProjFileVM Then
|
||||
Dim CurrProj As ProdItem = DirectCast(Proj, ProdItem)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
(m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).dtExportDate.Date))) OrElse
|
||||
(m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'Protected Function ProjectFilter(Proj As Object) As Boolean
|
||||
' Dim bProjectOk As Boolean = True
|
||||
' 'If TypeOf Proj Is ProjFileVM Then
|
||||
' Dim CurrProj As ProdItem = DirectCast(Proj, ProdItem)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).dtExportDate.Date))) OrElse
|
||||
' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
' 'ElseIf TypeOf Proj Is ProdFileVM Then
|
||||
' ' Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
' ' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' ' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
' ' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' ' (m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' ' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' ' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
' 'End If
|
||||
' Return bProjectOk
|
||||
'End Function
|
||||
|
||||
Public Overridable Function UpdatePageList() As Boolean
|
||||
Dim FilteredList As IEnumerable(Of ProdItem) = m_ProjectList.Where(Function(x)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso
|
||||
((m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso x.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then Return False
|
||||
Return True
|
||||
End Function)
|
||||
Dim nPageRowQty As Integer = 0
|
||||
Select Case m_SelRowQuantity
|
||||
Case RowQuantities.TEN
|
||||
nPageRowQty = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nPageRowQty = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nPageRowQty = 30
|
||||
End Select
|
||||
Dim nStart = nPageIndex * nPageRowQty
|
||||
If (nPageIndex - 1) * nPageRowQty + 1 > FilteredList.Count() Then
|
||||
Return False
|
||||
End If
|
||||
' FilteredList = FilteredList.OrderBy(Of ProdItem)()
|
||||
' m_PageList = New ObservableCollection(Of ProdItem)(FilteredList.Skip((nPageIndex - 1) * nPageRowQty + 1).Take(nPageIndex * nPageRowQty).Select(Function(x) x))
|
||||
m_PageList.Clear()
|
||||
For Index = (nPageIndex - 1) * nPageRowQty + 1 To nPageIndex * nPageRowQty
|
||||
m_PageList.Add(FilteredList(Index))
|
||||
Next
|
||||
NotifyPropertyChanged(NameOf(PageList))
|
||||
Return True
|
||||
|
||||
'Dim bProjectOk As Boolean = True
|
||||
''If TypeOf Proj Is ProjFileVM Then
|
||||
'Dim CurrProj As ProdItem = DirectCast(PROJ, ProdItem)
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).dtExportDate.Date))) OrElse
|
||||
' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'ElseIf TypeOf Proj Is ProdFileVM Then
|
||||
' Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
@@ -670,6 +808,15 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'End If
|
||||
' Return bProjectOk
|
||||
End Function
|
||||
|
||||
Protected Function ProjectFilter(CurrProj As ProdItem) As Boolean
|
||||
Dim bProjectOk As Boolean = True
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
(m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
Return bProjectOk
|
||||
End Function
|
||||
|
||||
@@ -775,98 +922,61 @@ Public MustInherit Class NewOpenProjectFileDialogVM
|
||||
|
||||
#End Region ' Cancel
|
||||
|
||||
#Region "PrevPage"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property PrevPage_Command As ICommand
|
||||
Get
|
||||
If m_cmdPrevPage Is Nothing Then
|
||||
m_cmdPrevPage = New Command(AddressOf PrevPage)
|
||||
End If
|
||||
Return m_cmdPrevPage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub PrevPage()
|
||||
If m_nPageIndex > 1 Then
|
||||
m_nPageIndex -= 1
|
||||
End If
|
||||
UpdatePageList()
|
||||
NotifyPropertyChanged(NameOf(nPageIndex))
|
||||
End Sub
|
||||
|
||||
#End Region ' PrevPage
|
||||
|
||||
#Region "NextPage"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do New.
|
||||
''' </summary>
|
||||
Public ReadOnly Property NextPage_Command As ICommand
|
||||
Get
|
||||
If m_cmdNextPage Is Nothing Then
|
||||
m_cmdNextPage = New Command(AddressOf NextPage)
|
||||
End If
|
||||
Return m_cmdNextPage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the New. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Overridable Sub NextPage()
|
||||
m_nPageIndex += 1
|
||||
If Not UpdatePageList() Then
|
||||
m_nPageIndex -= 1
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nPageIndex))
|
||||
End Sub
|
||||
|
||||
#End Region ' NextPage
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ProdItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Shared m_delIsModifiedSetUp As Action(Of Boolean)
|
||||
|
||||
Protected m_ProdFileVM As ProdFileVM
|
||||
Public ReadOnly Property ProdFileVM As ProdFileVM
|
||||
Get
|
||||
Return m_ProdFileVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjFileList As New List(Of ProjectFileVM)
|
||||
Public ReadOnly Property ProjFileList As List(Of ProjectFileVM)
|
||||
Get
|
||||
Return m_ProjFileList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sProdId As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sProdId, "")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable 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
|
||||
m_ProdFileVM.sName = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtCreateDate As Date
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), {m_ProdFileVM.dtCreateDate, m_ProjFileList.Min(Function(x) x.dtCreateDate)}.Min(), m_ProjFileList.Min(Function(x) x.dtCreateDate))
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sCreateDate As String
|
||||
Get
|
||||
Return dtCreateDate.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sMachine As String
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.sMachine
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).sMachine
|
||||
Else Return ""
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bIsArchived As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.bIsArchived
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).bIsArchived
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Archived_Visibility As Visibility
|
||||
Get
|
||||
Return If(bIsArchived, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList.Add(ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProjFileVM As ProjFileVM)
|
||||
m_ProjFileList = New List(Of ProjectFileVM)({ProjFileVM})
|
||||
End Sub
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList = ProjFileVMList
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -42,6 +42,8 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Protected m_GoToProd As Boolean = False
|
||||
|
||||
Protected m_ProjectColumns As New ObservableCollection(Of EgtDataGridColumn)
|
||||
Public Property ProjectColumns As ObservableCollection(Of EgtDataGridColumn)
|
||||
Get
|
||||
@@ -438,7 +440,7 @@ Public MustInherit Class OpenProjectFileDialogVM
|
||||
#Region "METHODS"
|
||||
|
||||
Public MustOverride Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
Public Overridable Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
Public Overridable Sub RefreshProjectList()
|
||||
End Sub
|
||||
|
||||
Protected Sub LoadColumns(ProjectType As ProjectType)
|
||||
|
||||
@@ -14,6 +14,13 @@ Public Class ProdFileM
|
||||
m_nProjIdList = value
|
||||
End Sub
|
||||
|
||||
Protected m_ProjMList As List(Of ProjFileM)
|
||||
Public ReadOnly Property ProjMList As List(Of ProjFileM)
|
||||
Get
|
||||
Return m_ProjMList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected m_sName As String
|
||||
Public Property sName As String
|
||||
Get
|
||||
@@ -60,6 +67,24 @@ Public Class ProdFileM
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdFileM(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean, ProjMList As List(Of ProjFileM)) As ProdFileM
|
||||
Dim NewProjectFileM As New ProdFileM
|
||||
NewProjectFileM.m_nProdId = nProdId
|
||||
NewProjectFileM.m_nProjIdList = nProjIdList
|
||||
NewProjectFileM.m_dtCreateDate = dtCreateProjDate
|
||||
NewProjectFileM.m_sName = sName
|
||||
NewProjectFileM.m_nType = nType
|
||||
NewProjectFileM.m_sMachine = sMachine
|
||||
NewProjectFileM.m_sLockedBy = sLockedBy
|
||||
NewProjectFileM.m_dtLock = dtLock
|
||||
NewProjectFileM.m_bIsActive = bIsActive
|
||||
NewProjectFileM.m_bIsProduced = bIsProduced
|
||||
NewProjectFileM.m_bIsArchived = bIsArchived
|
||||
NewProjectFileM.m_ProjMList = ProjMList
|
||||
Return NewProjectFileM
|
||||
End Function
|
||||
|
||||
#End Region ' CONSTRUCTORS
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,119 @@
|
||||
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class ProdItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Shared m_delUpdateNameInDb As Action(Of Integer, String)
|
||||
Public Shared m_delIsModifiedSetUp As Action(Of Boolean)
|
||||
|
||||
Protected m_ProdFileVM As ProdFileVM
|
||||
Public ReadOnly Property ProdFileVM As ProdFileVM
|
||||
Get
|
||||
Return m_ProdFileVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjFileList As New List(Of ProjectFileVM)
|
||||
Public ReadOnly Property ProjFileList As List(Of ProjectFileVM)
|
||||
Get
|
||||
Return m_ProjFileList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sProdId As String
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), m_ProdFileVM.sProdId, "")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overridable 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
|
||||
m_delUpdateNameInDb(m_ProdFileVM.nProdId, value)
|
||||
m_ProdFileVM.sName = value
|
||||
m_delIsModifiedSetUp(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property dtCreateDate As Date
|
||||
Get
|
||||
Return If(Not IsNothing(m_ProdFileVM), {m_ProdFileVM.dtCreateDate, m_ProjFileList.Min(Function(x) x.dtCreateDate)}.Min(), m_ProjFileList.Min(Function(x) x.dtCreateDate))
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sCreateDate As String
|
||||
Get
|
||||
Return dtCreateDate.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sMachine As String
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.sMachine
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).sMachine
|
||||
Else Return ""
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property bIsArchived As Boolean
|
||||
Get
|
||||
If Not IsNothing(m_ProdFileVM) Then
|
||||
Return m_ProdFileVM.bIsArchived
|
||||
ElseIf Not IsNothing(m_ProjFileList(0)) Then
|
||||
Return m_ProjFileList(0).bIsArchived
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Archived_Visibility As Visibility
|
||||
Get
|
||||
Return If(bIsArchived, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList.Add(ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProjFileVM As ProjFileVM)
|
||||
m_ProjFileList = New List(Of ProjectFileVM)({ProjFileVM})
|
||||
End Sub
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
|
||||
m_ProdFileVM = ProdFileVM
|
||||
m_ProjFileList = ProjFileVMList
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Function CreateProdItem(nProdId As Integer, nProjIdList As List(Of Integer), dtCreateProjDate As DateTime, sName As String, nType As BWType,
|
||||
sMachine As String, sLockedBy As String, dtLock As DateTime, bIsActive As Boolean, bIsProduced As Boolean, bIsArchived As Boolean, ProjMList As List(Of ProjFileM)) As ProdItem
|
||||
|
||||
|
||||
Dim NewProdFileM = ProdFileM.CreateProdFileM(nProdId, nProjIdList, dtCreateProjDate, sName, nType, sMachine, sLockedBy, dtLock, bIsActive, bIsProduced, bIsArchived)
|
||||
Dim NewProdFileVM = New ProdFileVM(NewProdFileM)
|
||||
Dim NewProjFileVM As IEnumerable(Of ProjectFileVM)
|
||||
NewProjFileVM = ProjMList.Select(Of ProjFileVM)(Function(j) New ProjFileVM(j)).ToList
|
||||
Dim NewProdItem = New ProdItem(NewProdFileVM, NewProjFileVM.ToList)
|
||||
|
||||
Return NewProdItem
|
||||
End Function
|
||||
|
||||
Public Shared Function CreateProdItem(ProjFileM As ProjFileM) As ProdItem
|
||||
|
||||
Dim NewProdItem = New ProdItem(New ProjFileVM(ProjFileM))
|
||||
|
||||
Return NewProdItem
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -2,6 +2,7 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using static EgtBEAMWALL.Core.ConstBeam;
|
||||
|
||||
@@ -208,11 +209,11 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
/// <summary>
|
||||
/// Elenco prod
|
||||
/// </summary>
|
||||
/// <param name="numRecord">Num max record da recuperare</param>
|
||||
/// <param name="NumRecord">Num max record da recuperare</param>
|
||||
/// <param name="OnlyActive">Solo con ALMENO 1 PROJ attivo (senza cancellazione logica)</param>
|
||||
/// <param name="ShowArchived">Se true: mostra anche archiviati (default li nasconde)</param>
|
||||
/// <returns></returns>
|
||||
public List<Core.ProdFileM> GetLastDesc(int numRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
public List<Core.ProdFileM> GetLastDesc(int NumRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
{
|
||||
List<Core.ProdFileM> result = new List<Core.ProdFileM>();
|
||||
//List<ProdModel> dbResult = GetLastDbModelDesc(numRecord);
|
||||
@@ -220,9 +221,9 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
using (DatabaseContext localDbCtx = new DatabaseContext(DbConfig.CONNECTION_STRING))
|
||||
{
|
||||
// se numRecord = 0 --> passo tutti
|
||||
if (numRecord == 0)
|
||||
if (NumRecord == 0)
|
||||
{
|
||||
numRecord = localDbCtx.ProdList.Count();
|
||||
NumRecord = localDbCtx.ProdList.Count();
|
||||
}
|
||||
// retrieve
|
||||
dbResult = localDbCtx
|
||||
@@ -235,7 +236,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
(p, e) => p)
|
||||
.Distinct()
|
||||
.OrderByDescending(x => x.ProdId)
|
||||
.Take(numRecord)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -247,13 +248,13 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
/// <summary>
|
||||
/// Elenco prod
|
||||
/// </summary>
|
||||
/// <param name="dtStart">Inizio periodo estrazione</param>
|
||||
/// <param name="dtEnd">Fine periodo estrazione</param>
|
||||
/// <param name="numRecord">Num max record da recuperare</param>
|
||||
/// <param name="DtStart">Inizio periodo estrazione</param>
|
||||
/// <param name="DtEnd">Fine periodo estrazione</param>
|
||||
/// <param name="NumRecord">Num max record da recuperare</param>
|
||||
/// <param name="OnlyActive">Solo con ALMENO 1 PROJ attivo (senza cancellazione logica)</param>
|
||||
/// <param name="ShowArchived">Se true: mostra anche archiviati (default li nasconde)</param>
|
||||
/// <returns></returns>
|
||||
public List<Core.ProdFileM> GetLastDesc(DateTime dtStart, DateTime dtEnd, int numRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
public List<Core.ProdFileM> GetLastDesc(DateTime DtStart, DateTime DtEnd, int NumRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
{
|
||||
List<Core.ProdFileM> result = new List<Core.ProdFileM>();
|
||||
//List<ProdModel> dbResult = GetLastDbModelDesc(numRecord);
|
||||
@@ -261,14 +262,14 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
using (DatabaseContext localDbCtx = new DatabaseContext(DbConfig.CONNECTION_STRING))
|
||||
{
|
||||
// se numRecord = 0 --> passo tutti
|
||||
if (numRecord == 0)
|
||||
if (NumRecord == 0)
|
||||
{
|
||||
numRecord = localDbCtx.ProdList.Count();
|
||||
NumRecord = localDbCtx.ProdList.Count();
|
||||
}
|
||||
// retrieve
|
||||
dbResult = localDbCtx
|
||||
.ProdList
|
||||
.Where(x => x.DtCreated >= dtStart && x.DtCreated <= dtEnd && (!x.IsArchived || ShowArchived))
|
||||
.Where(x => x.DtCreated >= DtStart && x.DtCreated <= DtEnd && (!x.IsArchived || ShowArchived))
|
||||
// condizione join sui PROJ
|
||||
.Join(localDbCtx.ProjList.Where(x => x.IsActive || !OnlyActive),
|
||||
p => p.ProdDbId,
|
||||
@@ -276,7 +277,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
(p, e) => p)
|
||||
.Distinct()
|
||||
.OrderByDescending(x => x.ProdId)
|
||||
.Take(numRecord)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -285,6 +286,183 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco prod
|
||||
/// </summary>
|
||||
/// <param name="NumRecord">Num max record da recuperare</param>
|
||||
/// <param name="OnlyActive">Solo con ALMENO 1 PROJ attivo (senza cancellazione logica)</param>
|
||||
/// <param name="ShowArchived">Se true: mostra anche archiviati (default li nasconde)</param>
|
||||
/// <returns></returns>
|
||||
public List<Core.ProdItem> GetLastDescFull(int NumRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
{
|
||||
List<Core.ProdItem> result = new List<Core.ProdItem>();
|
||||
// elenco prod completi
|
||||
List<ProdModel> dbResultProd = new List<ProdModel>();
|
||||
// elenco proj "orfani"
|
||||
List<ProjModel> dbResultProj = new List<ProjModel>();
|
||||
using (DatabaseContext localDbCtx = new DatabaseContext(DbConfig.CONNECTION_STRING))
|
||||
{
|
||||
// se numRecord = 0 --> passo tutti
|
||||
if (NumRecord == 0)
|
||||
{
|
||||
NumRecord = localDbCtx.ProdList.Count();
|
||||
}
|
||||
// recupero PROD + proj relativi
|
||||
dbResultProd = localDbCtx
|
||||
.ProdList
|
||||
.Where(x => (!x.IsArchived || ShowArchived))
|
||||
//.Include(j => j.)
|
||||
// condizione join sui PROJ
|
||||
.Join(localDbCtx.ProjList.Where(x => x.IsActive || !OnlyActive),
|
||||
p => p.ProdDbId,
|
||||
e => e.ProdDbId,
|
||||
(p, e) => p)
|
||||
.Distinct()
|
||||
.Include(j => j.ProjListNav)
|
||||
.OrderByDescending(x => x.ProdId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
|
||||
// recupero i proj "orfani"
|
||||
dbResultProj = localDbCtx
|
||||
.ProjList
|
||||
.Where(x => (x.IsActive || !OnlyActive) && x.Prod == null)
|
||||
.OrderByDescending(x => x.ProjId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
// conversione
|
||||
result = dbResultProd.Select(x => coreItemConv(x)).ToList();
|
||||
var resProj = dbResultProj.Select(x => coreItemConv(x)).ToList();
|
||||
// sommo i risultati
|
||||
result.AddRange(resProj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco prod
|
||||
/// </summary>
|
||||
/// <param name="DtStart">Inizio periodo estrazione</param>
|
||||
/// <param name="DtEnd">Fine periodo estrazione</param>
|
||||
/// <param name="NumRecord">Num max record da recuperare</param>
|
||||
/// <param name="OnlyActive">Solo con ALMENO 1 PROJ attivo (senza cancellazione logica)</param>
|
||||
/// <param name="ShowArchived">Se true: mostra anche archiviati (default li nasconde)</param>
|
||||
/// <returns></returns>
|
||||
public List<Core.ProdItem> GetLastDescFull(DateTime DtStart, DateTime DtEnd, int NumRecord, bool OnlyActive, bool ShowArchived = false)
|
||||
{
|
||||
List<Core.ProdItem> result = new List<Core.ProdItem>();
|
||||
// elenco prod completi
|
||||
List<ProdModel> dbResultProd = new List<ProdModel>();
|
||||
// elenco proj "orfani"
|
||||
List<ProjModel> dbResultProj = new List<ProjModel>();
|
||||
using (DatabaseContext localDbCtx = new DatabaseContext(DbConfig.CONNECTION_STRING))
|
||||
{
|
||||
// se numRecord = 0 --> passo tutti
|
||||
if (NumRecord == 0)
|
||||
{
|
||||
NumRecord = localDbCtx.ProdList.Count();
|
||||
}
|
||||
// retrieve
|
||||
dbResultProd = localDbCtx
|
||||
.ProdList
|
||||
.Where(x => x.DtCreated >= DtStart && x.DtCreated <= DtEnd && (!x.IsArchived || ShowArchived))
|
||||
// condizione join sui PROJ
|
||||
.Join(localDbCtx.ProjList.Where(x => x.IsActive || !OnlyActive),
|
||||
p => p.ProdDbId,
|
||||
e => e.ProdDbId,
|
||||
(p, e) => p)
|
||||
.Distinct()
|
||||
.Include(j => j.ProjListNav)
|
||||
.OrderByDescending(x => x.ProdId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
|
||||
// recupero i proj "orfani"
|
||||
dbResultProj = localDbCtx
|
||||
.ProjList
|
||||
.Where(x => (x.IsActive || !OnlyActive) && x.Prod == null && (x.DtCreated >= DtStart && x.DtCreated <= DtEnd))
|
||||
.OrderByDescending(x => x.ProjId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
}
|
||||
// conversione
|
||||
result = dbResultProd.Select(x => coreItemConv(x)).ToList();
|
||||
var resProj = dbResultProj.Select(x => coreItemConv(x)).ToList();
|
||||
// sommo i risultati
|
||||
result.AddRange(resProj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco prod
|
||||
/// </summary>
|
||||
/// <param name="DtStart">Inizio periodo estrazione</param>
|
||||
/// <param name="DtEnd">Fine periodo estrazione</param>
|
||||
/// <param name="DtIsCreation">Ture: usa data creazione / False: usa data export</param>
|
||||
/// <param name="NumRecord">Num max record da recuperare</param>
|
||||
/// <param name="OnlyActive">Solo con ALMENO 1 PROJ attivo (senza cancellazione logica)</param>
|
||||
/// <param name="Machine">Nome Macchina (default vuoto = non usato)</param>
|
||||
/// <param name="BtlFileName">Nome file BTL (default vuoto = non usato)</param>
|
||||
/// <param name="ListName">Nome List (default vuoto = non usato)</param>
|
||||
/// <param name="ShowArchived">Se true: mostra anche archiviati (default li nasconde)</param>
|
||||
/// <returns></returns>
|
||||
public List<Core.ProdItem> GetLastDescFull(DateTime DtStart, DateTime DtEnd, bool DtIsCreation, int NumRecord, bool OnlyActive, string Machine = "", string BtlFileName = "", string ListName = "", bool ShowArchived = false)
|
||||
{
|
||||
List<Core.ProdItem> result = new List<Core.ProdItem>();
|
||||
List<ProdModel> dbResultProd = new List<ProdModel>();
|
||||
// elenco proj "orfani"
|
||||
List<ProjModel> dbResultProj = new List<ProjModel>();
|
||||
using (DatabaseContext localDbCtx = new DatabaseContext(DbConfig.CONNECTION_STRING))
|
||||
{
|
||||
// se numRecord = 0 --> passo tutti
|
||||
if (NumRecord == 0)
|
||||
{
|
||||
NumRecord = localDbCtx.ProdList.Count();
|
||||
}
|
||||
// retrieve
|
||||
dbResultProd = localDbCtx
|
||||
.ProdList
|
||||
.Where(x => (!x.IsArchived || ShowArchived))
|
||||
// condizione join sui PROJ
|
||||
.Join(localDbCtx.ProjList.Where(x =>
|
||||
(x.IsActive || !OnlyActive)
|
||||
&& (string.IsNullOrEmpty(Machine) || x.Machine.ToLower().Contains(Machine.ToLower()))
|
||||
&& (string.IsNullOrEmpty(BtlFileName) || x.BTLFileName.ToLower().Contains( BtlFileName.ToLower()))
|
||||
&& (string.IsNullOrEmpty(ListName) || x.ListName.ToLower().Contains(ListName.ToLower()))
|
||||
&& ((DtIsCreation && (x.DtCreated >= DtStart && x.DtCreated <= DtEnd)) || (!DtIsCreation && (x.DtExported >= DtStart && x.DtExported <= DtEnd)))
|
||||
),
|
||||
p => p.ProdDbId,
|
||||
e => e.ProdDbId,
|
||||
(p, e) => p)
|
||||
.Distinct()
|
||||
.Include(j => j.ProjListNav)
|
||||
.OrderByDescending(x => x.ProdId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
|
||||
// recupero i proj "orfani"
|
||||
dbResultProj = localDbCtx
|
||||
.ProjList
|
||||
.Where(x =>
|
||||
(x.IsActive || !OnlyActive)
|
||||
&& x.Prod == null
|
||||
&& (string.IsNullOrEmpty(Machine) || x.Machine.ToLower().Contains(Machine.ToLower()))
|
||||
&& (string.IsNullOrEmpty(BtlFileName) || x.BTLFileName.ToLower().Contains(BtlFileName.ToLower()))
|
||||
&& (string.IsNullOrEmpty(ListName) || x.ListName.ToLower().Contains(ListName.ToLower()))
|
||||
&& ((DtIsCreation && (x.DtCreated >= DtStart && x.DtCreated <= DtEnd)) || (!DtIsCreation && (x.DtExported >= DtStart && x.DtExported <= DtEnd))))
|
||||
.OrderByDescending(x => x.ProjId)
|
||||
.Take(NumRecord)
|
||||
.ToList();
|
||||
}
|
||||
// conversione
|
||||
result = dbResultProd.Select(x => coreItemConv(x)).ToList();
|
||||
var resProj = dbResultProj.Select(x => coreItemConv(x)).ToList();
|
||||
// sommo i risultati
|
||||
result.AddRange(resProj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fornisce nuovo indice VUOTO da usare (allocando sul DB)
|
||||
/// </summary>
|
||||
@@ -910,6 +1088,29 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
protected Core.ProdFileM coreConv(ProdModel currProd)
|
||||
{
|
||||
Core.ProdFileM answ = Core.ProdFileM.CreateProdFileM(currProd.ProdId, ProjIdByProd(currProd.ProdId), currProd.DtCreated, currProd.Description, currProd.PType, currProd.Machine, currProd.LockedBy, currProd.LockDate, currProd.IsActive, currProd.IsProduced, currProd.IsArchived);
|
||||
//Core.ProdFileM answ = Core.ProdFileM.CreateProdFileM(currProd.ProdId, ProjIdByProd(currProd.ProdId), currProd.DtCreated, currProd.Description, currProd.PType, currProd.Machine, currProd.LockedBy, currProd.LockDate, currProd.IsActive, currProd.IsProduced, currProd.IsArchived, currProd.ProjListNav.Select(j => Core.ProjFileM.CreateProjFileM(j.ProjId, currProd.ProdId, j.DtCreated, j.DtExported, j.ListName, j.BTLFileName, j.ProjDescription, j.IsNew, j.Locked, j.PType, j.Machine, j.IsActive, j.IsActive)).ToList());
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper conversione modelli verso prodItem
|
||||
/// </summary>
|
||||
/// <param name="currProd"></param>
|
||||
/// <returns></returns>
|
||||
protected Core.ProdItem coreItemConv(ProdModel currProd)
|
||||
{
|
||||
Core.ProdItem answ = Core.ProdItem.CreateProdItem(currProd.ProdId, ProjIdByProd(currProd.ProdId), currProd.DtCreated, currProd.Description, currProd.PType, currProd.Machine, currProd.LockedBy, currProd.LockDate, currProd.IsActive, currProd.IsProduced, currProd.IsArchived, currProd.ProjListNav.Select(j => Core.ProjFileM.CreateProjFileM(j.ProjId, currProd.ProdId, j.DtCreated, j.DtExported, j.ListName, j.BTLFileName, j.ProjDescription, j.IsNew, j.Locked, j.PType, j.Machine, j.IsActive, j.IsActive)).ToList());
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper conversione modelli verso prodItem da singolo proj
|
||||
/// </summary>
|
||||
/// <param name="currProd"></param>
|
||||
/// <returns></returns>
|
||||
protected Core.ProdItem coreItemConv(ProjModel currProj)
|
||||
{
|
||||
Core.ProdItem answ = Core.ProdItem.CreateProdItem(Core.ProjFileM.CreateProjFileM(currProj.ProjId, 0, currProj.DtCreated, currProj.DtExported, currProj.ListName, currProj.BTLFileName, currProj.ProjDescription, currProj.IsNew, currProj.Locked, currProj.PType, currProj.Machine, currProj.IsActive, currProj.IsActive));
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
var dbResult = localDbCtx
|
||||
.ProjList
|
||||
.Where(x => x.BTLFileName == BTLFileName)
|
||||
//valutare se usare solo attivi...
|
||||
//.Where(x => x.BTLFileName == BTLFileName && x.IsActive == true)
|
||||
.FirstOrDefault();
|
||||
|
||||
//se avesse trovato-- > riporto id...
|
||||
@@ -581,7 +583,7 @@ namespace EgtBEAMWALL.DataLayer.Controllers
|
||||
/// Update record su DB x elenco BTLParts
|
||||
/// </summary>
|
||||
/// <param name="ProjId"></param>
|
||||
/// <param name="newBTLFileName"></param>
|
||||
/// <param name="BtlPartList"></param>
|
||||
/// <returns></returns>
|
||||
public ProjModel UpdateBtlParts(int ProjId, List<Core.BTLPartM> BtlPartList)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,11 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public ProdModel()
|
||||
{
|
||||
ProjListNav = new HashSet<ProjModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiave univoca DB
|
||||
/// </summary>
|
||||
@@ -98,6 +103,11 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
[Column("IsArchived")]
|
||||
public bool IsArchived { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Collezione oggetti Proj associati (almeno 1 by design)
|
||||
/// </summary>
|
||||
public virtual ICollection<ProjModel> ProjListNav { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@ Public Class SupervisorMachGroupPanelVM
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Private m_MachGroupVMListComparer As MyComparer
|
||||
Friend ReadOnly Property MachGroupVMListComparer As MyComparer
|
||||
Get
|
||||
|
||||
@@ -11,13 +11,14 @@ Public Class OpenProjectFileDialogVM
|
||||
|
||||
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
m_ProjectType = ProjectType
|
||||
m_GoToProd = GoToProd
|
||||
' carico colonne
|
||||
LoadColumns(m_ProjectType)
|
||||
NotifyPropertyChanged(NameOf(FilterTypeList))
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
' carico lista progetti
|
||||
If IsNothing(CurrProjectList) OrElse CurrProjectList.Count = 0 Then
|
||||
RefreshProjectList(GoToProd)
|
||||
RefreshProjectList()
|
||||
Else
|
||||
m_ProjectList = New ObservableCollection(Of ProjectFileVM)(CurrProjectList)
|
||||
NotifyPropertyChanged(NameOf(ProjectList))
|
||||
@@ -26,7 +27,7 @@ Public Class OpenProjectFileDialogVM
|
||||
m_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
Public Overrides Sub RefreshProjectList()
|
||||
m_ProjectList.Clear()
|
||||
' calcolo periodo e righe
|
||||
Dim dtStart As DateTime
|
||||
|
||||
@@ -95,7 +95,9 @@ Public Class SupervisorManagerVM
|
||||
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
+108
-66
@@ -22,6 +22,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
|
||||
ProdItem.m_delUpdateNameInDb = AddressOf DbControllers.m_ProdController.UpdateDescription
|
||||
|
||||
NotifyPropertyChanged(NameOf(FilterTypeList))
|
||||
m_SelFilterType = m_FilterTypeList(0)
|
||||
@@ -33,8 +34,9 @@ Public Class NewOpenProjectFileDialogVM
|
||||
SetFixedProjectList(True)
|
||||
NotifyPropertyChanged(NameOf(ProjectList))
|
||||
End If
|
||||
m_ProjectList_View = CollectionViewSource.GetDefaultView(m_ProjectList)
|
||||
m_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
'm_ProjectList_View = CollectionViewSource.GetDefaultView(m_ProjectList)
|
||||
'm_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
UpdatePageList()
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
@@ -44,19 +46,19 @@ Public Class NewOpenProjectFileDialogVM
|
||||
Dim dtEnd As DateTime
|
||||
Dim nRowQuantity As Integer = 20
|
||||
Select Case SelRowQuantity
|
||||
Case RowQuantities.FIFTY
|
||||
nRowQuantity = 50
|
||||
Case RowQuantities.HUNDRED
|
||||
nRowQuantity = 100
|
||||
Case RowQuantities.HUNDREDANDFIFTY
|
||||
nRowQuantity = 150
|
||||
Case RowQuantities.TEN
|
||||
nRowQuantity = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nRowQuantity = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nRowQuantity = 30
|
||||
End Select
|
||||
Select Case m_SelDayType
|
||||
Case DayTypes.LASTMONTH
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
dtStart = dtEnd - TimeSpan.FromDays(30.5)
|
||||
dtEnd = DateTime.Today.AddDays(1)
|
||||
dtStart = dtEnd.AddMonths(-1)
|
||||
Case DayTypes.LAST3MONTHS
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
dtEnd = DateTime.Today.AddDays(1)
|
||||
dtStart = dtEnd - TimeSpan.FromDays(30.5 * 3)
|
||||
Case DayTypes.LAST6MONTHS
|
||||
dtEnd = DateTime.Today + TimeSpan.FromDays(1)
|
||||
@@ -70,31 +72,48 @@ Public Class NewOpenProjectFileDialogVM
|
||||
End Select
|
||||
' leggo da db
|
||||
If m_ProjectType = ProjectType.PROJ Then
|
||||
Dim DbProjList As New List(Of ProjFileM)
|
||||
If m_SelBTLDateType = BTLDateTypes.CREATEDATE Then
|
||||
DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
Else
|
||||
DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
End If
|
||||
For Each Project In DbProjList
|
||||
If IsNothing(Project.nProjId) OrElse Project.nProjId = 0 Then Continue For
|
||||
' verifico se ha prod
|
||||
If Not IsNothing(Project.nProdId) And Project.nProdId > 0 Then
|
||||
' verifico se prod e' gia' stato creato
|
||||
Dim SameProdItem As ProdItem = m_ProjectList.FirstOrDefault(Function(x) Not IsNothing(x.ProdFileVM) AndAlso Not IsNothing(x.ProdFileVM.nProdId) AndAlso x.ProdFileVM.nProdId = Project.nProdId)
|
||||
If Not IsNothing(SameProdItem) Then
|
||||
SameProdItem.ProjFileList.Add(New ProjFileVM(Project))
|
||||
Else
|
||||
' recupero Prod
|
||||
Dim NewDbProd As ProdFileM = DbControllers.m_ProdController.FindCoreByProdId(Project.nProdId)
|
||||
If Not IsNothing(NewDbProd) Then
|
||||
m_ProjectList.Add(New ProdItem(New ProdFileVM(NewDbProd), New ProjFileVM(Project)))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
m_ProjectList.Add(New ProdItem(New ProjFileVM(Project)))
|
||||
End If
|
||||
Next
|
||||
'Dim DbProjList As New List(Of ProjFileM)
|
||||
'If m_SelBTLDateType = BTLDateTypes.CREATEDATE Then
|
||||
' DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, 100000, True, bViewArchived)
|
||||
' 'DbProjList = DbControllers.m_ProjController.GetLastDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
'Else
|
||||
' DbProjList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived)
|
||||
'End If
|
||||
'For Each Project In DbProjList
|
||||
' If IsNothing(Project.nProjId) OrElse Project.nProjId = 0 Then Continue For
|
||||
' ' verifico se ha prod
|
||||
' If Not IsNothing(Project.nProdId) And Project.nProdId > 0 Then
|
||||
' ' verifico se prod e' gia' stato creato
|
||||
' Dim SameProdItem As ProdItem = m_ProjectList.FirstOrDefault(Function(x) Not IsNothing(x.ProdFileVM) AndAlso Not IsNothing(x.ProdFileVM.nProdId) AndAlso x.ProdFileVM.nProdId = Project.nProdId)
|
||||
' If Not IsNothing(SameProdItem) Then
|
||||
' SameProdItem.ProjFileList.Add(New ProjFileVM(Project))
|
||||
' Else
|
||||
' ' recupero Prod
|
||||
' Dim NewDbProd As ProdFileM = DbControllers.m_ProdController.FindCoreByProdId(Project.nProdId)
|
||||
' If Not IsNothing(NewDbProd) Then
|
||||
' m_ProjectList.Add(New ProdItem(New ProdFileVM(NewDbProd), New ProjFileVM(Project)))
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' m_ProjectList.Add(New ProdItem(New ProjFileVM(Project)))
|
||||
' End If
|
||||
'Next
|
||||
m_ProjectList = New ObservableCollection(Of Core.ProdItem)(DbControllers.m_ProdController.GetLastDescFull(dtStart, dtEnd, nRowQuantity * 3, True, bViewArchived))
|
||||
'Dim sMachine As String = ""
|
||||
'Dim sBtlFileName As String = ""
|
||||
'Dim sListName As String = ""
|
||||
'Dim bIsCreationDate As Boolean = True
|
||||
'If SelFilterType.Id = FilterTypes.ID Then
|
||||
' ' sMachine = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.BTLFILENAME Then
|
||||
' sBtlFileName = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.LISTNAME Then
|
||||
' sListName = SearchText
|
||||
'ElseIf SelFilterType.Id = FilterTypes.MACHINE Then
|
||||
' sMachine = SearchText
|
||||
'End If
|
||||
'm_ProjectList = New ObservableCollection(Of Core.ProdItem)(DbControllers.m_ProdController.GetLastDescFull(dtStart, dtEnd, bIsCreationDate, nRowQuantity * 3, True, sMachine, sBtlFileName, sListName, bViewArchived))
|
||||
NotifyPropertyChanged(NameOf(ProjectList))
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
Dim DbProdList As New List(Of ProdFileM)
|
||||
DbProdList = DbControllers.m_ProdController.GetLastDesc(dtStart, dtEnd, nRowQuantity, True, bViewArchived)
|
||||
@@ -135,6 +154,59 @@ Public Class NewOpenProjectFileDialogVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function UpdatePageList() As Boolean
|
||||
Dim FilteredList As IEnumerable(Of Core.ProdItem) = m_ProjectList.Where(Function(x)
|
||||
If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso
|
||||
((m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso x.ProjFileList.Any(Function(y) DirectCast(y, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
(m_SelFilterType.Id = FilterTypes.MACHINE AndAlso x.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then Return False
|
||||
Return True
|
||||
End Function)
|
||||
Dim nPageRowQty As Integer = 0
|
||||
Select Case m_SelRowQuantity
|
||||
Case RowQuantities.TEN
|
||||
nPageRowQty = 10
|
||||
Case RowQuantities.TWENTY
|
||||
nPageRowQty = 20
|
||||
Case RowQuantities.THIRTY
|
||||
nPageRowQty = 30
|
||||
End Select
|
||||
Dim nStart = (nPageIndex - 1) * nPageRowQty
|
||||
Dim nEnd = Math.Min((nPageIndex * nPageRowQty), FilteredList.Count())
|
||||
If nStart > FilteredList.Count() Then
|
||||
Return False
|
||||
End If
|
||||
' FilteredList = FilteredList.OrderBy(Of ProdItem)()
|
||||
m_PageList = New ObservableCollection(Of ProdItem)(FilteredList.Skip(nStart).Take(nPageRowQty).Select(Function(x) x))
|
||||
'm_PageList.Clear()
|
||||
'For Index = nStart To nEnd
|
||||
' m_PageList.Add(FilteredList(Index))
|
||||
'Next
|
||||
NotifyPropertyChanged(NameOf(PageList))
|
||||
Return True
|
||||
|
||||
'Dim bProjectOk As Boolean = True
|
||||
''If TypeOf Proj Is ProjFileVM Then
|
||||
'Dim CurrProj As ProdItem = DirectCast(PROJ, ProdItem)
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.EXPORTDATE AndAlso Not CurrProj.ProjFileList.Any(Function(x) SearchDate.Contains(DirectCast(x, ProjFileVM).dtExportDate.Date))) OrElse
|
||||
' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
'If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.LISTNAME AndAlso CurrProj.ProjFileList.Any(Function(x) DirectCast(x, ProjFileVM).sListName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'ElseIf TypeOf Proj Is ProdFileVM Then
|
||||
' Dim CurrProj As ProdFileVM = DirectCast(Proj, ProdFileVM)
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso (
|
||||
' (m_SelFilterType.Id = BTLDateTypes.CREATEDATE AndAlso Not SearchDate.Contains(CurrProj.dtCreateDate.Date))) Then bProjectOk = False
|
||||
' If m_SelFilterType.Id <> FilterTypes.NULL AndAlso m_SearchText <> String.Empty AndAlso (
|
||||
' (m_SelFilterType.Id = FilterTypes.ID AndAlso CurrProj.sProdId.ToString.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.BTLFILENAME AndAlso CurrProj.sBTLFileName.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0) OrElse
|
||||
' (m_SelFilterType.Id = FilterTypes.MACHINE AndAlso CurrProj.sMachine.IndexOf(SearchText, StringComparison.InvariantCultureIgnoreCase) < 0)) Then bProjectOk = False
|
||||
'End If
|
||||
' Return bProjectOk
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Archive()
|
||||
If IsNothing(SelProject) Then Return
|
||||
If Not IsNothing(SelProject.ProdFileVM) Then
|
||||
@@ -250,33 +322,3 @@ 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
|
||||
m_delIsModifiedSetUp(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
|
||||
MyBase.New(ProdFileVM, ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProjFileVM As ProjFileVM)
|
||||
MyBase.New(ProjFileVM)
|
||||
End Sub
|
||||
|
||||
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
|
||||
MyBase.New(ProdFileVM, ProjFileVMList)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -12,6 +12,7 @@ Public Class OpenProjectFileDialogVM
|
||||
|
||||
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
|
||||
m_ProjectType = ProjectType
|
||||
m_GoToProd = GoToProd
|
||||
' carico colonne
|
||||
LoadColumns(ProjectType)
|
||||
NotifyPropertyChanged(NameOf(FilterTypeList))
|
||||
@@ -19,7 +20,7 @@ Public Class OpenProjectFileDialogVM
|
||||
' carico lista progetti
|
||||
If IsNothing(CurrProjectList) OrElse CurrProjectList.Count = 0 Then
|
||||
SetFixedProjectList(False)
|
||||
RefreshProjectList(GoToProd)
|
||||
RefreshProjectList()
|
||||
Else
|
||||
SetFixedProjectList(True)
|
||||
m_ProjectList = New ObservableCollection(Of ProjectFileVM)(CurrProjectList)
|
||||
@@ -29,7 +30,7 @@ Public Class OpenProjectFileDialogVM
|
||||
m_ProjectList_View.Filter = AddressOf ProjectFilter
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RefreshProjectList(Optional GoToProd As Boolean = False)
|
||||
Public Overrides Sub RefreshProjectList()
|
||||
m_ProjectList.Clear()
|
||||
' calcolo periodo e righe
|
||||
Dim dtStart As DateTime
|
||||
@@ -66,30 +67,15 @@ Public Class OpenProjectFileDialogVM
|
||||
Else
|
||||
DbProjectList = DbControllers.m_ProjController.GetLastByExpDesc(dtStart, dtEnd, nRowQuantity, False)
|
||||
End If
|
||||
For Each Project In DbProjectList
|
||||
' 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
|
||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
DbControllers.m_ProjController.DeleteProj(Project.nProjId, False)
|
||||
EgtOutLog("Found project on Db without the folder and erased it! Proj number " & Project.nProjId.ToString("0000"))
|
||||
End If
|
||||
Next
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
Dim DbProjectList As New List(Of ProdFileM)
|
||||
DbProjectList = DbControllers.m_ProdController.GetLastDesc(dtStart, dtEnd, nRowQuantity, True)
|
||||
If GoToProd Then
|
||||
If m_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"
|
||||
Dim sPath As String = Map.refMainWindowVM.MainWindowM.sProjsDir & "\" & Project.nProjId.ToString("0000") & "\" & Project.nProjId.ToString("0000") & ".nge"
|
||||
If Project.sMachine = Map.refProjManagerVM.CurrProj.sMachine AndAlso
|
||||
Project.nType = Map.refProjManagerVM.CurrProj.nType Then
|
||||
If File.Exists(sPath) Then
|
||||
m_ProjectList.Add(New ProdFileVM(Project))
|
||||
m_ProjectList.Add(New ProjFileVM(Project))
|
||||
Else
|
||||
DbControllers.m_ProdController.DeleteProd(Project.nProdId, True)
|
||||
EgtOutLog("Found project on Db without the folder and erased it! Prod number " & Project.nProdId.ToString("0000"))
|
||||
@@ -99,16 +85,31 @@ Public Class OpenProjectFileDialogVM
|
||||
Else
|
||||
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 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 ProdFileVM(Project))
|
||||
m_ProjectList.Add(New ProjFileVM(Project))
|
||||
Else
|
||||
DbControllers.m_ProdController.DeleteProd(Project.nProdId, True)
|
||||
EgtOutLog("Found project on Db without the folder and erased it! Prod number " & Project.nProdId.ToString("0000"))
|
||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||
DbControllers.m_ProjController.DeleteProj(Project.nProjId, False)
|
||||
EgtOutLog("Found project on Db without the folder and erased it! Proj number " & Project.nProjId.ToString("0000"))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
ElseIf m_ProjectType = ProjectType.PROD Then
|
||||
Dim DbProjectList As New List(Of ProdFileM)
|
||||
DbProjectList = DbControllers.m_ProdController.GetLastDesc(dtStart, dtEnd, nRowQuantity, True)
|
||||
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 File.Exists(sPath) Then
|
||||
m_ProjectList.Add(New ProdFileVM(Project))
|
||||
Else
|
||||
DbControllers.m_ProdController.DeleteProd(Project.nProdId, True)
|
||||
EgtOutLog("Found project on Db without the folder and erased it! Prod number " & Project.nProdId.ToString("0000"))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -438,7 +438,7 @@ Public Class ProjManagerVM
|
||||
Dim OpenFile As New NewOpenProjectFileDialogV(Application.Current.MainWindow, OpenProdFileDialogVM)
|
||||
Dim DialogResult As Boolean? = OpenFile.EgtShowDialog(ProjectType.PROJ)
|
||||
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
|
||||
Dim TempProd As ProdItem = OpenProdFileDialogVM.SelProject
|
||||
Dim TempProd As Core.ProdItem = OpenProdFileDialogVM.SelProject
|
||||
If TempProd.ProjFileList.Count > 1 Then
|
||||
' apro dialogo di scelta Proj
|
||||
Dim OpenProjFileDialogVM As OpenProjectFileDialogVM = Nothing
|
||||
|
||||
@@ -68,8 +68,6 @@ Public Module DbControllers
|
||||
DataLayer.DbConfig.CheckMigrateDb()
|
||||
DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
|
||||
DataLayer.DbConfig.CheckViews(sUser, sPwd)
|
||||
' riattivare il dump per il backup
|
||||
'DataLayer.DbConfig.DumpDB("C:\Program Files\MariaDB 10.5\bin\mysqldump", "c:\Temp\Pippo.sql")
|
||||
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
|
||||
' imposto cartella condivisa
|
||||
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder)
|
||||
|
||||
Reference in New Issue
Block a user