Table of Contents

Class VorgangExtensions

Namespace
BpNexT.NET.Extensions.Vorgang
Assembly
BpNexT.NET.dll

Provides extension methods for the IVorgang interface.

public static class VorgangExtensions
Inheritance
object
VorgangExtensions

Methods

AddProtokollEintrag<T>(T, VorgangProtokollTyp, string, int?, string?)

Adds a protocol entry (VPtk) to the Vorgang.

public static void AddProtokollEintrag<T>(this T vorgang, VorgangProtokollTyp typ, string text, int? quellVorgangArt = null, string? quellBelegNr = null) where T : IVorgang, IHasNestedDataSets

Parameters

vorgang T

The Vorgang to add the protocol entry to.

typ VorgangProtokollTyp

The type of protocol entry.

text string

The text for the protocol entry (max 100 characters).

quellVorgangArt int?

Optional: The Vorgangsart that triggered this entry.

quellBelegNr string

Optional: The BelegNr that triggered this entry.

Type Parameters

T

Type that implements both IVorgang and IHasNestedDataSets.

BucheLagerplatzbewegungsvorschlag(IVorgang, bool)

Creates or removes warehouse location movement suggestions (requires chaotic warehouse management).

public static bool BucheLagerplatzbewegungsvorschlag(this IVorgang vorgang, bool erzeugen)

Parameters

vorgang IVorgang

The Vorgang to process.

erzeugen bool

True to create suggestions, false to remove them.

Returns

bool

True if successful, false otherwise.

Buchen(IVorgang)

Books the current Vorgang.

public static bool Buchen(this IVorgang vorgang)

Parameters

vorgang IVorgang

Returns

bool

Exceptions

InvalidOperationException

CalculateFracht(IVorgang)

Recalculates shipping costs based on current values (address, weight, etc.).

public static void CalculateFracht(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to recalculate.

CalculatePreis(IVorgang)

Recalculates prices from current values without fetching new defaults.

public static void CalculatePreis(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to recalculate.

CalculateRabatt(IVorgang)

Recalculates discounts and prices using minimum prices and discounts from microtech.

public static void CalculateRabatt(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to recalculate.

CalculateSteuer(IVorgang)

Recalculates taxes. Useful when the destination address differs from the original (e.g., non-EU).

public static void CalculateSteuer(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to recalculate.

CalculateWaehrung(IVorgang)

Converts the Vorgang to a different currency using exchange rates from the program.

public static void CalculateWaehrung(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to convert.

GetLayoutBuilder(IVorgang, string)

Gets a layout builder for the Vorgang.

public static LayoutBuilder GetLayoutBuilder(this IVorgang vorgang, string layoutName = "default")

Parameters

vorgang IVorgang
layoutName string

Optional layout name. Default will use the first available layout for the Vorgang.Art

Returns

LayoutBuilder

Exceptions

InvalidOperationException
Exception

GetLieferbarStatus(IVorgang)

Gets the delivery status of the Vorgang. Only returns a value if: the Vorgangsart belongs to "Bestellung vom Kunden", "Teillieferbarinfo-Felder bereitstellen" is active, and the Vorgang has no processed booking parameters.

public static LieferbarStatus GetLieferbarStatus(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to check.

Returns

LieferbarStatus

The LieferbarStatus enum value.

GetPossibleStornoArten(IVorgang)

Gets possible Storno types for this Vorgang as numeric values.

public static int[] GetPossibleStornoArten(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to check.

Returns

int[]

Array of possible Vorgangsart numbers for Storno.

GetPossibleStornoArtenStrings(IVorgang)

Gets possible Storno types for this Vorgang as readable names.

public static string[] GetPossibleStornoArtenStrings(this IVorgang vorgang)

Parameters

vorgang IVorgang

The Vorgang to check.

Returns

string[]

Array of Vorgangsart names for Storno.

SetLieferAnschrift(IVorgang, IAnschriften)

Sets the Lieferanschrift for the Vorgang.

public static void SetLieferAnschrift(this IVorgang vorgang, IAnschriften ans)

Parameters

vorgang IVorgang
ans IAnschriften

SetLieferAnsprechpartner(IVorgang, IAnsprechpartner)

Sets the Liefer Ansprechpartner for the Vorgang.

public static void SetLieferAnsprechpartner(this IVorgang vorgang, IAnsprechpartner asp)

Parameters

vorgang IVorgang
asp IAnsprechpartner

SetRechnungAnschrift(IVorgang, IAnschriften)

Sets the Rechnung Anschrift for the Vorgang.

public static void SetRechnungAnschrift(this IVorgang vorgang, IAnschriften ans)

Parameters

vorgang IVorgang
ans IAnschriften

SetRechnungAnsprechpartner(IVorgang, IAnsprechpartner)

Sets the Rechnung Ansprechpartner for the Vorgang.

public static void SetRechnungAnsprechpartner(this IVorgang vorgang, IAnsprechpartner asp)

Parameters

vorgang IVorgang
asp IAnsprechpartner

Stornieren(IVorgang, bool, bool, int)

Storniert den aktuellen Vorgang.

public static bool Stornieren(this IVorgang vorgang, bool archiv, bool gutschrift, int gutschriftArt)

Parameters

vorgang IVorgang

The Vorgang to cancel.

archiv bool

Move the original record to archive after creating the credit note.

gutschrift bool

Create a credit note (Gutschrift).

gutschriftArt int

Vorgangsart for the credit note (from BEARBEITEN - PARAMETER - ARTEN).

Returns

bool

True if successful, false otherwise.

Wandeln(IVorgang, int)

Creates a WandelnBuilder to convert this Vorgang to a different Vorgangsart.

public static WandelnBuilder Wandeln(this IVorgang vorgang, int targetVorgangArt)

Parameters

vorgang IVorgang

The source Vorgang to convert.

targetVorgangArt int

The target Vorgangsart number (from BEARBEITEN - PARAMETER - ARTEN).

Returns

WandelnBuilder

A WandelnBuilder for fluent configuration.

Exceptions

InvalidOperationException

Thrown when the Vorgang is not attached to a DataSet or has no BelegNr.