clsHelpText¶
clsHelpText is a public class in SAIF.Business that inherits clsBusinessBase and represents a single help-text row retrieved by reference-key value.
Purpose¶
- Retrieves help text from
APPLICATION_HELP_DETAILfor a supplied key. - Exposes the retrieved key and help-text value on a read-only public surface.
- Provides null/empty detection, key-based equality, and a simple validity rule for retrieved help-text objects.
Context¶
- Namespace:
SAIF.Business - Assembly/package:
SAIF.Business
Public members¶
| Member | Signature | Purpose |
|---|---|---|
HelpText |
Public ReadOnly Property HelpText() As String |
Returns the help-text value through the backing clsSmartString. |
Key |
Public ReadOnly Property Key() As String |
Returns the reference-key value used to identify the help text. |
IsHelpTextNull |
Public Function IsHelpTextNull() As Boolean |
Returns whether the backing help-text value is empty. |
Equals |
Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean |
Returns True when both objects are clsHelpText instances with the same key. |
Equals |
Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean |
Compares this instance with another object by delegating to the typed Equals overload. |
Equals |
Public Overloads Function Equals(ByVal inObject As clsHelpText) As Boolean |
Returns True when the supplied help-text object's Key matches this object's Key. |
GetHashCode |
Public Overrides Function GetHashCode() As Integer |
Returns the hash code of the Key property. |
ToString |
Public Overrides Function ToString() As String |
Returns the help-text string value. |
GetHelpText |
Public Shared Function GetHelpText(ByVal inDataportal As IDataPortalInfo, ByVal inKey As String) As clsHelpText |
Retrieves a help-text object for the supplied key through the data-access layer. |
IsHelpTextValid |
Public Function IsHelpTextValid(ByVal target As Object, ByVal e As clsRuleArgs) As Boolean |
Validation rule that succeeds only when Key.Trim.Length > 0. |
Behavioral notes¶
BeforeRetrieveissues a result-set query built fromMyCriteria.RetrieveSQLand binds theKeyparameter with length 40.AfterRetrievefills the object only when the result set contains at least one row, then marks the object old.IsHelpTextNulldelegates tom_HelpText.IsEmpty.- Equality and hash-code behavior are based only on
Key, not on the help-text body. ToStringreturns the currentHelpTextvalue, which makes the object display as the help text itself.AddBusinessRulesregistersIsHelpTextValidwith the messageError: Help text not available.
Constraints and usage notes¶
- The public surface is read-only; this source file does not expose setters for
HelpTextorKey. - The criteria object supports retrieval only: its
CreateSQL,InsertSQL,UpdateSQL, andDeleteSQLmembers all throwApplicationException. - Instances are retrieved with
GetHelpText; the constructor isProtected Friend.
Sources¶
Business\SAIF.Business\clsHelpText.vb