DdsDecDateFieldTagHelper class
Estimated reading time: 2 minutes
Defines an input element to capture Dates for fields defined as decimal values.
Namespace: ASNA.QSys.Expo.Tags Assembly: ASNA.QSys.Expo.Tags.dll
Inheritance: Object –> TagHelper –> FieldBase –> DdsFieldBase –> DdsDateFieldTagHelper
Remarks
Legacy Applications more commonly used Dates as numeric values (with a particular EditWord, more than the proper Date type).
During Migration patterns are observed to identify such dates and convert them to DdsDecDateField
tag Helper to make the Calendar available on the Page (as if the proper Date type was used).
This alone provides automated Modernization.
<div Row="12" RowSpan="@SFLC_SubfilePage">
@for (int rrn=0; rrn < Model.SFLC.SFL1.Count; rrn++)
{
int row = 12 + rrn;
<DdsSubfileRecord RecordNumber="rrn" For="SFLC.SFL1">
<DdsDecDateField Col="41+1" For="SFLC.SFL1[rrn].SFDELDATE" DateFormat="ISO" DateSeparator="-" SuppressLeadingZeroes=true Color="Green : !61 , DarkBlue : 61" />
</DdsSubfileRecord>
}
</div>
Note how the DateFormat and DateSeparator
are defined in the Presentation (markup) and not in the model (as it is done for DdsDateField)
public class SFL1_Model : SubfileRecordModel
{
.
.
.
[Dec(8, 0)]
public decimal SFDELDATE { get; private set; }
.
.
.
}
The Model defines a decimal type (which knows nothing about DateFormat or DateSeparators). The Application Logic will process the numeric value as usual.
Properties
Type | Name | Description |
---|---|---|
DdsDateFormat | DateFormat | Gets the DateFormat from the Model. |
String | DateSeparator | Gets the Date Separator from the Model. |
DecAttribute | DecFieldAttribute | Gets the DecAttribute from the Model. |
FieldAttribute | FieldAttribute | Gets the Decimal FieldAttribute from the Model. |
Methods
Signature | Description |
---|---|
GetDateFormat() | Get the DdsDateFormat attribute from the Model. |
GetDateSeparator() | Gets the Data Separator from de Model. |
DdsDateFormat GetDateFormat()
Get the DdsDateFormat attribute from the Model.
DdsDateFormat GetDateFormat()
string GetDateSeparator()
Gets the Data Separator from de Model.
string GetDateSeparator()