Class JobFormFieldValueContainer
Holds a collection of job form field values.
Provides enumerated access to the field values as well as direct access to fields by id.
Inheritance
Inherited Members
Namespace: Moraware.JobTrackerAPI5
Assembly: JobTrackerAPI5.dll
Syntax
public class JobFormFieldValueContainer : IEnumerable<JobFormFieldValue>, IEnumerable
Methods
ContainsItemWithId(Int32)
Checks if an item with the given Id has already been added.
Declaration
public bool ContainsItemWithId(int id_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | id_ | Id to check for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if there is an item for the given id_. |
Count()
Number of items.
Declaration
public int Count()
Returns
| Type | Description |
|---|---|
| System.Int32 | Number of item's in the collection. |
GetEnumerator()
Provides an iterator over the collection members.
Declaration
public IEnumerator<JobFormFieldValue> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<JobFormFieldValue> | An iterator over the collection members. |
Remarks
This method is present primarily to support the For ... Each syntax.
GetFieldValue(Int32)
Returns the string value of the given field. If the field is not in the collection, an empty string is returned.
Declaration
public string GetFieldValue(int jobFormFieldId_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | jobFormFieldId_ | Field to look up. |
Returns
| Type | Description |
|---|---|
| System.String | The string value of the field. |
GetFieldValue(String)
Returns the string value of the given field. If the field is not in the collection, an empty string is returned.
Declaration
public string GetFieldValue(string jobFormFieldName_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | jobFormFieldName_ | Field to look up. |
Returns
| Type | Description |
|---|---|
| System.String | The string value of the field. |
Item(Int32)
Looks up the item with the given id.
Declaration
public JobFormFieldValue Item(int id_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | id_ | Id of the item to search for. |
Returns
| Type | Description |
|---|---|
| JobFormFieldValue | The item with the given id. |
Item(String, Boolean)
Looks up the item with the given name.
Declaration
public JobFormFieldValue Item(string name_, bool exceptionIfNotThere_ = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name_ | Name of JobFormField to search for. |
| System.Boolean | exceptionIfNotThere_ | If True and no such JobFormField name is found, an exception will be thrown. |
Returns
| Type | Description |
|---|---|
| JobFormFieldValue | The JobFormFieldValue with the given name. |
ItemAt(Int32)
Returns the item at the given index.
Declaration
public JobFormFieldValue ItemAt(int zeroBasedIndex_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | zeroBasedIndex_ | Index to retrieve. |
Returns
| Type | Description |
|---|---|
| JobFormFieldValue | The indicated item. |
SetFieldValue(Int32, String)
Set the value of a form field.
Declaration
public void SetFieldValue(int jobFormFieldId_, string fieldValue_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | jobFormFieldId_ | Field to be set. |
| System.String | fieldValue_ | Value to assign. |
SetFieldValueId(Int32, Nullable<Int32>)
Set the value of a form field.
Declaration
public void SetFieldValueId(int jobFormFieldId_, int? fieldValueId_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | jobFormFieldId_ | Field to be set. |
| System.Nullable<System.Int32> | fieldValueId_ | Value to assign. |
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Provides a strongly typed iterator over the collection members.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator | A strongly typed iterator over the collection members. |
Remarks
This method is present primarily to support the For ... Each syntax.