DdsCheckboxFieldTagHelper class

Defines a toggle two-state input element.

Namespace: ASNA.QSys.Expo.Tags Assembly: ASNA.QSys.Expo.Tags.dll

Inheritance: Object –> TagHelper –> FieldBase –> DdsFieldBase

Remarks

A Checkbox is a good candidate to replace the typical Legacy Yes/No - constant and field - combination, with a User-Friendly element.

For example, the following Legacy Markup:

<DdsConstant Col="47" Text="Send Confirmation" />
<DdsCharField Col="58" ColSpan="2" For="CUSTREC.SFYN01" VirtualRowCol="18,27" />
<DdsConstant Col="61" Text="(Y/N)" />

Is a good candidate to be replaced by:

<DdsCheckboxField Col="47" Text="Send Confirmation" For="CUSTREC.SFYN01" VirtualRowCol="18,27" />

On the Model source file, you would have to decorate the field, providing meta-information for the value we want to designate as the checked (or true) value, and which for unchecked (or false) value.

The Values attribute for DdsCheckboxField expects the first value to be the checked and the second the unchecked.

[Char(1)]
[Values(typeof(string), "Y", "N")]
public string SFYN01 { get; set; }

Note: The Business Logic (program using the Display Page), does not need to change - or be recompiled -.

Properties

Type Name Description
CharAttribute CharAttribute Gets a CharAttribute defined by the field, from the Model.
DecAttribute DecAttribute Gets a DecAttribute defined by the field, from the Model.
FieldAttribute FieldAttribute Gets a FieldAttribute defined by the field, from the Model.
String Text Gets or sets a value to provide a description for the checkbox.