Table of Contents

Class DokumenteExtensions

Namespace
BpNexT.NET.Extensions.Data
Assembly
BpNexT.NET.dll

Provides extension methods for IDokumente.

public static class DokumenteExtensions
Inheritance
object
DokumenteExtensions

Methods

Delete(IDokumente)

Deletes the document.

public static void Delete(this IDokumente dok)

Parameters

dok IDokumente

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

dok IDokumente

The document.

stream Stream

The 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

dok IDokumente

Returns

string

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

dok IDokumente

The document.

data byte[]

The byte array containing the document data.

fileName string

The 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.