Click or drag to resize

MapperExtensionBaseTextItems Property

Returns a collection of TextItems loaded from metadata related to this component.

Namespace:  NetQuarry.Data
Assembly:  EAP.Mapper (in EAP.Mapper.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public TextItems TextItems { get; set; }

Property Value

Type: TextItems

Implements

IExtensionTextItems
Remarks
You can store strings that you display to users in metadata and retrieve them at runtime. In general, any string that a user sees should be stored in metadata and not directly referenced in code. This allows for simpler localization (if required) and provides a centralized place to manage user-viewable strings.
Examples
This example shows how to use a string stored in metadata as an error message.
public override void RowBeforeUpdate(IMapper sender, EAPEventArgs e)
{
    OfferStatus statusID = (OfferStatus)EAPUtil.ToInt(sender.Fields["status_id"].Value);

    //--- The target amount can't be changed unless the deal is Active or Expired        

    if (!((statusID == OfferStatus.Active) || (statusID == OfferStatus.Expired)))
    {
        e.Error(this.TextItems.GetText("E_CANT_CHANGE_TARGET"));            
    }
}
See Also