- Definizione ordine parametri da considerare per Sort di SectionXMaterial degli SParam in finestra Warehouse
This commit is contained in:
@@ -263,8 +263,8 @@
|
||||
</DataGridTemplateColumn>
|
||||
<!-- SectionXMaterial -->
|
||||
<DataGridComboBoxColumn x:Key="colSECTXMAT"
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
SortMemberPath="dDimension">
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
SortMemberPath="SectionXMaterialDisplayOrder">
|
||||
<DataGridComboBoxColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:WarehouseWndV}}}"/>
|
||||
|
||||
@@ -1274,6 +1274,7 @@ Public Class WarehouseWndVM
|
||||
End Class
|
||||
|
||||
Public Class SParam
|
||||
Implements IComparable
|
||||
|
||||
Public ReadOnly Property W_Msg As String
|
||||
Get
|
||||
@@ -1378,8 +1379,8 @@ Public Class SParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Proprietà per il sorting del SectionXMaterial in base alla prima dimensione della sezione
|
||||
Public ReadOnly Property dDimension As Double
|
||||
' proprietà per il sorting del SectionXMaterial in base alla prima dimensione della sezione
|
||||
Public ReadOnly Property dFirstDimension As Double
|
||||
Get
|
||||
If SectionXMaterial.nType = MachineType.BEAM AndAlso Not IsNothing(SectXMat) Then
|
||||
Return SectXMat.dW
|
||||
@@ -1391,6 +1392,17 @@ Public Class SParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' proprietà per il sorting del SectionXMaterial in base alla seconda dimensione della sezione
|
||||
Public ReadOnly Property dSecondDimension As Double
|
||||
Get
|
||||
If SectionXMaterial.nType = MachineType.BEAM AndAlso Not IsNothing(SectXMat) Then
|
||||
Return SectXMat.dH
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' proprieta' per finestra di aggiunta nuovo grezzo
|
||||
Public ReadOnly Property sDimension As String
|
||||
Get
|
||||
@@ -1484,6 +1496,27 @@ Public Class SParam
|
||||
Quantity_Visibility = Visibility.Visible
|
||||
End Sub
|
||||
|
||||
' definizione di CompareTo per il Sort degli SParam (Materiale -> 1^ dimensione -> 2^ dimensione)
|
||||
Public Function CompareTo(obj As Object) As Integer Implements IComparable.CompareTo
|
||||
Dim SParamItem As SParam = DirectCast(obj, SParam)
|
||||
If sMaterial.CompareTo(SParamItem.sMaterial) <> 0 Then
|
||||
Return sMaterial.CompareTo(SParamItem.sMaterial)
|
||||
Else
|
||||
If dFirstDimension.CompareTo(SParamItem.dFirstDimension) <> 0 Then
|
||||
Return dFirstDimension.CompareTo(SParamItem.dFirstDimension)
|
||||
Else
|
||||
Return dSecondDimension.CompareTo(SParamItem.dSecondDimension)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
' proprietà usata come SortMemberPath della colonna SectionXMaterial
|
||||
Public ReadOnly Property SectionXMaterialDisplayOrder As SParam
|
||||
Get
|
||||
Return Me
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WhWallParam
|
||||
|
||||
Reference in New Issue
Block a user