Processing floating-point numbers
Possibility to configure the decimal point character was added:
Possibility to process optional parameters 'separator between the integer part and fractional part of the number', 'date display template'.
To configure these parameters, it is necessary to set values in section Parameters in the import mapping settings file.
Example of the section:
SkipEmptyReferences
true
DecimalSeparator
.
DatePattern
dd/MM/yyyy
Database User Settings Store
- A static method for deletion of the user settings in the DatabaseUserSettingsStore based on the UserName was added.
- A possibility to delete the user settings from the Database was added.
Business operation customization events are divided by the business operation type:
Business operation customization events of BOExecViewController are accessible using indexed field BOExecViewController.BOEvents. The type of the business operation or the ID of the business operation can be used as the index. If the event processing subscription is made without the specification of the business operation, then the subscriber will receive messages on all business operations. Below is an example of making an event processing subscription in the code of the controller:
protected override void OnActivated()
{
base.OnActivated();
_boExecViewController = Frame.GetController();
if (_boExecViewController != null)
{
// Subscription for processing the controller's events for specific business operations.
_boExecViewController.BOEvents[typeof(CalcOrderTotalList)].BusinessOperationExecuting += CalcOrderTotalListExecuting;
_boExecViewController.BOEvents[typeof(ReversibleOperation)].BusinessOperationCustomExecute += ReversibleOperationCustomExecute;
_boExecViewController.BOEvents[typeof(ChangeFreightContext)].CreateCustomBusinessOperationInstance += CreateCustomChangeFreightContextInstance;
// Subsription for processing the controller's events for all business operations.
_boExecViewController.BOEvents.CustomizeResultViewParameters += CustomizeResultViewParameters;
}
}
Functions for generating hyperlinks for use in the Drill-Down reports have been added
Functions for generating hyperlinks based on ViewShortcut, which can be used in the Drill-Down reports, have been added to the platform (module Xafari). The function is accessible using the global instance of the hyperlink manager: Xafari.XafariUrlManager.Intsance.BuildUrl(ViewShortcut shortcut)
Currently hyperlinks can be generated only in the Web version of the application. For a correct generation of hyperlinks in the web-application it is necessary to add a key to section appSettings in the configuration file of the application:
- BuildUrl() — it generates the URL based on an instance of ViewShortcut
- SetCollectionSourceCriteria(CriteriaOperator criteria) — it specifies the criterion of the data source for the list view.
- public XafariViewShortcut(String viewId, CriteriaOperator collectionSourceCriteria)
- public XafariViewShortcut(Type objectClass, CriteriaOperator collectionSourceCriteria, String viewId) Example of generating a hyperlink in the script of the report:
using Xafari;
// Display the list form for specification of the current order.
private void OrderDetailsUrl_GetValue(object sender, DevExpress.XtraReports.UI.GetValueEventArgs e)
{
e.Value = string.Empty;
var dataObject = e.Row;
if (dataObject == null) return;
var objectSpace = XPObjectSpace.FindObjectSpaceByObject(dataObject);
if (objectSpace == null) return;
var objectType = typeof(OrderDetails);
var viewId = XafariModule.Application.GetListViewId(objectType);
if (string.IsNullOrEmpty(viewId)) return;
var criteria = CriteriaOperator.Parse("Order.Oid = ?", objectSpace.GetKeyValue(dataObject));
// Creating the shortcut for the View
var shortcut = new XafariViewShortcut(viewId, criteria); // Producing the hyperlink
e.Value = shortcut.BuildUrl();
}
// Displaying the detail form for the current order.
private void OrderUrl_GetValue(object sender, DevExpress.XtraReports.UI.GetValueEventArgs e)
{
e.Value = string.Empty;
var dataObject = e.Row;
if (dataObject == null) return;
var objectSpace = XPObjectSpace.FindObjectSpaceByObject(dataObject);
if (objectSpace == null) return;
var objectType = dataObject.GetType();
var objectKey = objectSpace.GetKeyValueAsString(dataObject);
if (String.IsNullOrEmpty(objectKey)) return;
var viewId = XafariModule.Application.GetDetailViewId(objectType);
if (string.IsNullOrEmpty(viewId)) return;// Creating the shortcut for the View
var shortcut = new XafariViewShortcut(objectType, objectKey, viewId);
// Producing the hyperlink
e.Value = shortcut.BuildUrl();
};
Electronic reports, a new type of Xafari reports, has been implemented
Generating reports as files in the required format (text files, xml, csv, etc.) for the presentation of various reports and documentation to other institutions in the electronic form (for example, by E-mail) is the intended use of the electronic reports. The functionality is implemented as modules:
Xafari.Reports.File.Win
Xafari.Reports.File.Web
The registration is performed in a method of class UpdateDatabaseAfterUpdateSchema(), which is an updater to the module in which the generator is implemented. Upon registration, the developed electronic report will appear in the template list for the report specified in the Xafari registration method. When the electronic report is executed, a zip-archive containing all data streams as files are loaded into the client's local machine, the file names match the names of the streams passed to method GetStream.
The name of the zip-archive is specified in field TemplateFileName of electronic report template ITemplateFileReport. ObjectFormatter is used when generating the file name for the archive. Fields Parameters and DataSource are available in the formatter, allowing to specify the report parameters and the data source for the report, respectively.
Excel reports of the Xafari reports system have been improved
- Excel reports have been implemented as modules:
Xafari.Reports.Excel.Web
Xafari.Reports.Excel.Win
Xafari.Excel.Template
Xafari.Excel.Template.Win
- In order to use Excel reports, it is necessary to add the following modules to the application:
- Platform-independent: Xafari.Reports.Excel, Xafari.Excel.Template;
- Modules for Windows-version: Xafari.Reports.Excel.Win, Xafari.Excel.Template.Win;
- Modules for Web-version: Xafari.Reports.Excel.WebThe following functions are available in the Windows-version of the application:
- Editing the template of the Excel report using Microsoft Office Excel
- Previewing the Excel using Microsoft Office Excel
- The following functions are available in the Web-version of the application:
- Previewing the Excel report by means of component ASPxSpreadSheet;
- Downloading the Excel report file to the client's local machine using the standard browser functionality.
In the Web-version of the application, by default, the report templates are stored in folder ~App_DataExcelTemplates of the web-server, also folder ~App_DataExcelReports must exist in the webserver and must be accessible for writing.
To change the path to the default folders, you need to redefine controller WebExcelReportExecuterController in the application, with redefined methods CreateReport and PreviewReport, with properly configured fields ExcelReportsPath and ExcelTemplatesPath for the instance of class WebExcelReportExecuter.
Actions 'Report types' and 'Report list' have been moved to category 'Hidden'
Actions 'Report types' (SimpleAction saListReport) and 'Report list' (SimpleAction saListParameters) have been moved to category 'Hidden'. It means that they do not appear in the application toolbar by default. If you want to display these actions in the application, then you need to add them in the form of ARM element 'action' or to move them to the required category by means of the model configuration. The specified actions are implemented in module Xafari.Reports.
New ARM element (ArmItemReport) has been implemented
A possibility to add a specific report to the ARMs has been added to the Xafari report system. A new ARM element type, ArmItemReport (Xafari Report), has been developed for this purpose. The functionality is implemented as a separate module Xafari.Reports.Arm.
The report is presented in the hierarchical form:
+- Parameter set 1
+- Parameter set 2
…
A view of the report configuration appears when node 'Edit' is selected.
If no parameter sets were specified for the report, then the report is represented by a root node only in the ARMs. When the node is selected, a view of the reports configuration appears.
The longtime operation logging mechanism has been redesigned
The logging of longtime operations is performed in a separate stream.
AdvancedBandedListEditor for the Win platform has been added
- AdvancedBandedListEditor has been ported from Ranet.XF, where it has name AdvBandedListEditor.
- An example has been added to the FeatureCenter. The editor provides the possibility to group columns for list forms. The column groups can be configured directly in the code or in the model designer. To configure it in the code, it is necessary that the class inherits interface Xafari.IAdvBanded. Attribute 'Band' must be configured for each property that is a member of the group. The value of the attribute for an object can be determined in the code by means of CustomAttribute: [CustomAttribute("Band", "BandId")]. The value of 'BandId' specifies the ID of the group, to which the property marked with the attribute must belong. If you execute command Add Band from the context menu for node Bands, the group will be added to the model. It is possible to add any number of rows for each group using command Add Row from the context menu. It is possible to add any number of columns for each group using command Add Column from the context menu.
Common data
- Subdivision has been added to new common data, and fields have been added for the Employee from the Person, for compatibility.
Logging
- Methods for work with terms have been added
- Class DomainLogicBase has been modified
Exporting to an xml file using the Atlantis application format
- Export to XML using the Atlantis application format has been implemented. All mapping settings and export commands remain the same. XML files are generated in the course of export in compliance with the name in the TableName parameter.
Restriction of values in the list form
- A possibility to restrict values in the list form in the editing mode has been added.
- Editors WinLongPropertyEditor, WinIntegerPropertyEditor, WinFloatPropertyEditor, WinDoublePropertyEditor, WinDecimalPropertyEditor, WinBytePropertyEditor have been renamed to XafariLongPropertyEditor, XafariIntegerPropertyEditor, XafariFloatPropertyEditor, XafariDoublePropertyEditor, XafariDecimalPropertyEditor, XafariBytePropertyEditor, respectively.
External module connection with subscription to events
- A mechanism for connecting event processors from an external module, that come into action in the course of import, has been implemented.
Deserializing the mapping configuration
- It is possible to leave out the TableName tag in the mapping scheme; then the input data will for the respective type not be loaded from the data source. However, the mapping structure for the type will be loaded to the scheme.
An error related to access to rights for the action was rectified
- Method XafariSecuritySystem.Setup has become outdated.
- Use XafariModule.Application.Mode to get the list of actions instead.
Additional improvements
- Method BreakLinksToControl is called when changing the current View
- Template support functionality has been added
- The mechanism for getting the user settings for DatabaseUserSettingsStore has been corrected
- Operation of numerators CustomNumerator has been corrected
- AdvancedBandedListEditor for the Win platform has been added
- Editors Xafari.Editors.Win.XafariDatePropertyEditor and ASPxXafariDateTimePropertyEditor, offering the possibility to enter the value without entering the separator, have been added
- Text of control MultipleLookup is updated when updating the View
- Updating the longtime operation form in the course of quick execution
- Operation of XafariLookupEditor with an empty field value has been corrected
- At the start of the Web-version of the application, the main page of the application is displayed after the workplace selection (after the login procedure)
- Assembly EntityAssembly is saved to the disc and is updated no sooner than necessary
- An error in the numerators, when the template was inserted instead of the number, has been corrected
- Specific size values for the control have been removed
- An example of the reaction to the change of the link to the model has been added (to applications FeatureCenter and Northwind.DC).