Class DokumenteExtensions
- Namespace
- BpNexT.NET.Extensions.Data
- Assembly
- BpNexT.NET.dll
Provides extension methods for IDokumente.
public static class DokumenteExtensions
- Inheritance
-
objectDokumenteExtensions
Methods
Delete(IDokumente)
Deletes the document.
public static void Delete(this IDokumente dok)
Parameters
dokIDokumente
Exceptions
- InvalidOperationException
Thrown when the document is not attached to a DataSet.
- Exception
Thrown when the application is not set.
GetDocumentData(IDokumente, Stream)
Returns the document data as a stream.
public static void GetDocumentData(this IDokumente dok, Stream stream)
Parameters
dokIDokumenteThe document.
streamStreamThe stream to write the document data to.
Exceptions
- InvalidOperationException
Thrown when the document is not attached to a DataSet.
- Exception
Thrown when the application is not set, the document is not found, or if there was an error reading the document stream.
GetRelationNr(IDokumente)
Gets the name of the relation number for the document.
public static string GetRelationNr(this IDokumente dok)
Parameters
dokIDokumente
Returns
SetDocumentData(IDokumente, byte[], string?)
Sets the document data from a byte array.
public static void SetDocumentData(this IDokumente dok, byte[] data, string? fileName = null)
Parameters
dokIDokumenteThe document.
databyte[]The byte array containing the document data.
fileNamestringThe name of the file. If null, the previous name is used.
Exceptions
- InvalidOperationException
Thrown when the document is not attached to a DataSet.
- Exception
Thrown when the application is not set.