Table of Contents

Class HasAutoDataSet

Namespace
BpNexT.NET.Models.Internal
Assembly
BpNexT.NET.dll

Base class for objects that are part of an AutoDataSet.

public class HasAutoDataSet : IHasAutoDataSet, IDisposable
Inheritance
object
HasAutoDataSet
Implements
Extension Methods

Properties

Bookmark

Unique identifier for the object. From Büro+

[JsonIgnore]
[ValidateNever]
public string? Bookmark { get; set; }

Property Value

string

BpApp

The Büro+ application instance this object belongs to.

[JsonIgnore]
[ValidateNever]
public BpApplication BpApp { get; set; }

Property Value

BpApplication

DataSet

Access to the original AutoDataSet.

[JsonIgnore]
public AutoDataSet? DataSet { get; set; }

Property Value

AutoDataSet

HasChanges

Indicates whether the object has changes.

[JsonIgnore]
public bool HasChanges { get; }

Property Value

bool

true if the object has changes; otherwise, false.

Identifier

Unique identifier for the object.

[JsonIgnore]
[ValidateNever]
public string Identifier { get; set; }

Property Value

string

Parent

Parent object that contains this instance, if any.

[JsonIgnore]
public IHasAutoDataSet? Parent { get; set; }

Property Value

IHasAutoDataSet

ParentBookmark

Unique identifier for the parent object. From Büro+

[JsonIgnore]
[ValidateNever]
public string? ParentBookmark { get; set; }

Property Value

string

ParentDataSet

Access to the original Parent AutoDataSet, if any.

[JsonIgnore]
public AutoDataSet? ParentDataSet { get; set; }

Property Value

AutoDataSet

SelektionsFelder

SelektionsFelder of the DataSet.

[JsonIgnore]
public List<SelektionsFeld> SelektionsFelder { get; init; }

Property Value

List<SelektionsFeld>

Methods

As<T>(string[]?)

Converts the current generic instance to it's typed instance.

public T As<T>(string[]? includes = null) where T : IHasAutoDataSet, new()

Parameters

includes string[]

Optional: The names of the properties to include.

Returns

T

A new instance of the target type.

Type Parameters

T

The target type.

Exceptions

InvalidOperationException

Thrown when DataSet is null or the DataSet type does not match the target type name.

CopyFrom<T>(T)

Copies properties from another instance of HasAutoDataSet.

public void CopyFrom<T>(T other) where T : IHasAutoDataSet

Parameters

other T

The other instance to copy from.

Type Parameters

T

The type of the other instance.

Exceptions

ArgumentException

Thrown when the type of the other instance does not match the current type.

Dispose()

Releases the COM object

public void Dispose()

FillFrom<T>(T)

Fills empty properties from another instance of HasAutoDataSet.

public void FillFrom<T>(T other) where T : IHasAutoDataSet

Parameters

other T

The other instance to copy from.

Type Parameters

T

The type of the other instance.

Exceptions

ArgumentException

Thrown when the type of the other instance does not match the current type.

~HasAutoDataSet()

Finalizer for automatic cleanup by the Garbage Collector.

protected ~HasAutoDataSet()

GetAdjustedDataSet()

Retrieves the adjusted DataSet.

public AutoDataSet? GetAdjustedDataSet()

Returns

AutoDataSet

GetAdjustedParentDataSet()

Retrieves the adjusted parent DataSet.

public AutoDataSet? GetAdjustedParentDataSet()

Returns

AutoDataSet

GetSelektionsFeld(string)

Retrieves a SelektionsFeld object by its name or Bez property.

public SelektionsFeld? GetSelektionsFeld(string name)

Parameters

name string

The name or Bez of the SelektionsFeld to retrieve.

Returns

SelektionsFeld

The SelektionsFeld object if found; otherwise, null.

GetSelektionsFeldValue<T>(string)

Retrieves the value of a specific SelektionsFeld object and converts it to the specified type.

public T? GetSelektionsFeldValue<T>(string name)

Parameters

name string

The name of the SelektionsFeld whose value is to be retrieved.

Returns

T

The value of the SelektionsFeld converted to the specified type.

Type Parameters

T

The type to which the value should be converted.

Exceptions

InvalidOperationException

Thrown when the DataSet is not attached or the SelektionsFeld is not found.

GetSelektionsFelderValues()

Retrieves the values of all SelektionsFeld objects in a dictionary.

public List<SelektionsFeldValue> GetSelektionsFelderValues()

Returns

List<SelektionsFeldValue>

A dictionary containing the names and values of all SelektionsFeld objects.

Exceptions

InvalidOperationException

Thrown when the DataSet is not attached.

Remove()

Removes the current instance from the DataSet.

public void Remove()

Exceptions

InvalidOperationException

Thrown when DataSet is null.

ResetChanges()

Resets the change tracking. Does NOT reset the Object.

public void ResetChanges()

Save()

Saves the current state of the object to the DataSet.

public void Save()

Exceptions

InvalidOperationException

Thrown when DataSet is null.

UpdateNestedChangeTrackable<T>(ref T, T, string)

Updates a nested change trackable object and subscribes to its property changes.

protected void UpdateNestedChangeTrackable<T>(ref T obj, T value, string name)

Parameters

obj T
value T
name string

Type Parameters

T