Cancel Method
- Last UpdatedMar 17, 2026
- 1 minute read
The Cancel() method updates the sample status column with cancel (8) for the specified sample record in the Sample table.
'Declaration
Public Shared Function Cancel( _
ByVal sessionId As Integer, _
ByVal sampleId As Integer, _
ByRef lastEditAt As Nullable(Of Date) _
) As Boolean
'Usage
Dim sessionId As Integer
Dim sampleId As Integer
Dim lastEditAt As Nullable(Of Date)
Dim value As Boolean
value = Sample.Cancel(sessionId, sampleId, lastEditAt)
public static bool Cancel(
int sessionId,
int sampleId,
ref Nullable<DateTime> lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- sampleId
- Required. Sample Id that required to be cancelled
- lastEditAt
- In/Out parameter. Holds the datetime that this record was added.
Return Value
Returns true if the sample is cancelled and false if the sample cannot be cancelled.