Advanced programming


Navigation-less business objects are intended for programs with which no data records are created, searched for or deleted. You can still work with a database context. The following buttons on the ribbon are intended for navigable as well as navigable business objects:

Commands on the ribbon
Iconmethod

This button is used for printing. The VBContent is "! QueryPrintDlg" . This method is already pre-declared in ACBSO and does not have to be declared explicitly in the derivation.

[ACMethodCommand("Query", "en{'Print'}de{'Drucken'}", (short)MISort.QueryPrintDlg)]
public void QueryPrintDlg()

This button is used to preview the print. The VBContent is "! QueryPreviewDlg" . This method has already been declared in ACBSO and does not have to be declared explicitly in the derivation.

[ACMethodCommand("Query", "en{'Preview'}de{'Vorschau'}", (short)MISort.QueryPreviewDlg)]
public void QueryPreviewDlg()

This button is used to manage and edit reports. The VBContent is "! QueryDesignDlg" . This method is already pre-declared in ACBSO and does not have to be declared explicitly in the derivation.

[ACMethodCommand("Query", "en{'Design'}de{'Entwurf'}", (short)MISort.QueryDesignDlg)]
public void QueryDesignDlg()

This button is used to cut out selected content. The VBContent is "! Cut" . This method is not declared in the business objects, but in certain UI controls that support clipping.

[ACMethodInteraction("", "en{'Cut'}de{'Ausschneiden'}", (short)MISort.Cut, false)]
public new void Cut()

This button is used to copy selected content. The VBContent is "! Copy" . This method is not declared in the business objects, but in certain UI controls that support copying.

[ACMethodInteraction("", "en{'Copy'}de{'Kopieren'}", (short)MISort.Copy, false)]
public new void Copy()

This button is used to insert selected content. The VBContent is "! Paste" . This method is not declared in the business objects, but in certain UI controls that support insertion.

[ACMethodInteraction("", "en{'Paste'}de{'Einfügen'}", (short)MISort.Paste, false)]
public new void Paste()

This button is used to undo the last change. The VBContent is "! Undo" . This method is not declared in the business objects, but in certain UI controls that support undo.

[ACMethodInteraction("", "en{'Undo'}de{'Rückgängig'}", (short)MISort.Undo, false)]
public new void Undo()

This button is used to restore. The VBContent is "! Redo" . This method is not declared in the business objects, but in certain UI controls that support restoring.

[ACMethodInteraction("", "en{'Redo'}de{'Wiederholen'}", (short)MISort.Redo, false)]
public new void Redo()

 


In order to display and change properties of business objects on the interface, the following things must be taken into account:

  1. Declare public properties with getter and setter.
  2. Publish your property using the ACPropertyInfo attribute class .
  3. Raise the PropertyChanged event when the value of your property has changed. Since ACComponents implement the INotifyPropertyChanged interface , you only have to call the method  .void OnPropertyChanged(string name)

 

Sample code in the BSO

private string _ExampleProp;
[ACPropertyInfo(201, "", "en{'Example'}de{'Beispiel'}", "", false)]
public string ExampleProp
{
get { return _ExampleProp; }
set
{
_ExampleProp = value;
OnPropertyChanged("ExampleProp");
}

Sample code in XAML

e.g. <Grid>... 
<vb:VBTextBox VBContent="RunScheduler"/>
...</Grid>

 


In order to display and change data collections of business objects on the surface, the following things must be taken into account:

  1. Declare two properties. One for the data collection and one for the selected element from the data collection.
  2. Publish the data collection with the ACPropertyList attribute class and selection property with the ACPropertySelected attribute class .
  3. Trigger the PropertyChanged event when the value of your selection property has changed. Since ACComponents implement the INotifyPropertyChanged interface , you only have to call the method  . You can also trigger the PropertyChanged event for data collection, then the iplus control element implemented by IVBSource updates itself. Your data collection can be a simple list and does not necessarily have to implement INotifyCollectionChanged .void OnPropertyChanged(string name)

 

Take a look at the example code in the IVBSource chapter.