First Working Version with New parser
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
Namespace Schemas.Orders
|
||||
Public Class Helpers
|
||||
Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
|
||||
Dim oHead As T = pData.Items.
|
||||
Where(Function(i) TypeOf i Is T).
|
||||
FirstOrDefault()
|
||||
Return oHead
|
||||
End Function
|
||||
'Public Class Helpers
|
||||
' Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
|
||||
' Dim oHead As T = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' FirstOrDefault()
|
||||
' Return oHead
|
||||
' End Function
|
||||
|
||||
Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
|
||||
Dim oHead As T = pData.Items.
|
||||
Where(Function(i) TypeOf i Is T).
|
||||
SetValue(Sub(pObject As T)
|
||||
pUpdateFunction(pObject)
|
||||
End Sub).
|
||||
FirstOrDefault()
|
||||
' Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
|
||||
' Dim oHead As T = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' SetValue(Sub(pObject As T)
|
||||
' pUpdateFunction(pObject)
|
||||
' End Sub).
|
||||
' FirstOrDefault()
|
||||
|
||||
End Sub
|
||||
' End Sub
|
||||
|
||||
Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
|
||||
Dim oPositions As List(Of T) = pData.Items.
|
||||
Where(Function(i) TypeOf i Is T).
|
||||
Select(Of T)(Function(i) i).
|
||||
ToList()
|
||||
Return oPositions
|
||||
End Function
|
||||
End Class
|
||||
' Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
|
||||
' Dim oPositions As List(Of T) = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' Select(Of T)(Function(i) i).
|
||||
' ToList()
|
||||
' Return oPositions
|
||||
' End Function
|
||||
'End Class
|
||||
End Namespace
|
||||
|
||||
Reference in New Issue
Block a user