Class UIFormFieldsManager
Provides CRUD operations over UI form fields and categories.
public class UIFormFieldsManager : AbstractFieldManager, IUIFormFieldsManager, IDataClassFieldsManager, ICategoryFieldsManager
- Inheritance
-
objectAbstractFieldManagerUIFormFieldsManager
- Implements
- Extension Methods
Constructors
UIFormFieldsManager()
Initializes a new instance of the UIFormFieldsManager class.
public UIFormFieldsManager()
Methods
CreateCategory(string, FormCategoryInfo)
Tries to create a new category with data from formCategory.
public FieldValidationResult CreateCategory(string className, FormCategoryInfo formCategory)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
formCategoryFormCategoryInfoCategory containing the data of the new category.
Returns
- FieldValidationResult
Instance of FieldValidationResult, if the validation result is valid, new category was created. Otherwise it was not and validation result indicates why.
Exceptions
- ArgumentNullException
No category definition was provided.
- InvalidOperationException
The corresponding data class was not found.
CreateField(string, FormFieldInfo)
Tries to create a new field with data from formField.
public FieldValidationResult CreateField(string className, FormFieldInfo formField)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
formFieldFormFieldInfoField containing the data of the new field.
Returns
- FieldValidationResult
Instance of FieldValidationResult, if the validation result is valid, new field was created. Otherwise it was not and validation result indicates why.
Exceptions
- ArgumentNullException
No field definition was provided.
- InvalidOperationException
The corresponding data class was not found.
DeleteField(string, string)
Tries to delete a field specified by fieldName
public FieldValidationResult DeleteField(string className, string fieldName)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
fieldNamestringName of the field to be deleted.
Returns
- FieldValidationResult
Instance of FieldValidationResult if the validation result is valid and the field was deleted. Otherwise, it is not deleted and the validation result indicates why.
Exceptions
- InvalidOperationException
The corresponding data class was not found.
MoveField(string, int, int)
Updates the form definition for the given className reordering it's fields.
public void MoveField(string className, int sourceIndex, int destinationIndex)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
sourceIndexintIndex of the field to be moved in the form fields collection.
destinationIndexintIndex where to move the field in the form fields collection.
Exceptions
- InvalidOperationException
Unknown
classNameprovided.- ArgumentOutOfRangeException
sourceIndexordestinationIndexare out of range of the form field collection of the class.
UpdateCategory(string, string, FormCategoryInfo)
Tries to update a category given by categoryName with data from formCategory.
public FieldValidationResult UpdateCategory(string className, string categoryName, FormCategoryInfo formCategory)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
categoryNamestringName of a category that is being updated.
formCategoryFormCategoryInfoCategory which contains updated data.
Returns
- FieldValidationResult
Instance of FieldValidationResult, if the validation result is valid, update was performed. Otherwise it was not and validation result indicates why.
Exceptions
- ArgumentNullException
No category definition provided.
- InvalidOperationException
Unknown
classNameorcategoryNameprovided.
UpdateField(string, string, FormFieldInfo)
Tries to update a field given by fieldName with data from formField.
public FieldValidationResult UpdateField(string className, string fieldName, FormFieldInfo formField)
Parameters
classNamestringClass name or alternative form name of the form the field belongs to.
fieldNamestringName of a field that is being updated.
formFieldFormFieldInfoField which contains updated data.
Returns
- FieldValidationResult
Instance of FieldValidationResult, if the validation result is valid, update was performed. Otherwise it was not and validation result indicates why.
Exceptions
- ArgumentNullException
No field definition provided.
- InvalidOperationException
Unknown
classNameorfieldNameprovided.