Template file name Symphony_DataFormatted_v3_2.tpl
The Symphony_DataFormatted (version 3.2) provides the ability to utilize the field formatting and selection list values when building powerful repository based classes. Each numeric field in the respoistory structure that has a format or selection list assigned will create a read-only property exposing the resulting data as a string property.
The partial classe generated by this template is compatible with the Symphony_Data template.
The formatted class provides a number of powerful capabilities including:
- Numeric fields with assigned formats (like time values) are exposed as formatted string values, formatted.
- Numeric fields with selection list values will be exposed as a string value and return the appropriate value for the underlying data value.
The generated classes are designed to be used in Synergy .Net developments.
It is recommended that your generated code from the Symphony_Data template is created into a project sub-folder called Data.
CodeGen Template Tokens
Token |
Comments |
NAMESPACE |
Define the namespace within which the generated class will be placed (-n option). |
Symphony Tokens
There are no Symphony Tokens appropriate for this template.
CodeGen Command Examples
Data object |
|
codegen e -r -s PART -t Symphony_DataFormatted_v3_2 -o %ROOT%ControlLibrary\Data -n ControlLibrary.Data |
Example
;;
;; WARNING: This code was code generated. Any changes that you
;; make to this code will be overwritten if the code is regenerated!
;;
;; Template author: Richard C. Morris : RCP Consultants.
;;
;; Template Name: Symphony Framework : SYMPHONY_DATAFORMATTED_V3_2.tpl
;;
namespace ControlLibrary.Data
public partial class Part_Data
public property Part_status_formatted, string
method get
proc
using part_main.str_part_status select
(0), mreturn "Live"
(1), mreturn "Replaced"
(2), mreturn "Obsolete"
endusing
mreturn ""
endmethod
endproperty
endclass
endnamespace
See Also