Class BizFormInfoProvider
- Namespace
- CMS.OnlineForms
- Assembly
- CMS.OnlineForms.dll
Class providing BizFormInfo management.
[ProviderInterface(typeof(IBizFormInfoProvider))]
public class BizFormInfoProvider : AbstractInfoProvider<BizFormInfo, BizFormInfoProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<BizFormInfo>, IBulkInfoProvider<BizFormInfo>, IBizFormInfoProvider, IInfoProvider<BizFormInfo>, IInfoByIdProvider<BizFormInfo>, IInfoByGuidProvider<BizFormInfo>, IInfoByNameProvider<BizFormInfo>
- Inheritance
-
objectBizFormInfoProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
BizFormInfoProvider()
Constructor.
public BizFormInfoProvider()
Methods
CreateBizFormDataClass(string, string, string, string, List<FormFieldInfo>)
Creates bizform data class definition based on the given parameters.
public static DataClassInfo CreateBizFormDataClass(string className, string displayName, string tableName, string primaryKeyName, List<FormFieldInfo> fields = null)
Parameters
classNamestringForm class name
displayNamestringForm display name
tableNamestringForm table name
primaryKeyNamestringTable primary key column name
fieldsList<FormFieldInfo>List of additional fields
Returns
Delete(BizFormInfo)
Deletes the info object from the underlying data store.
public override void Delete(BizFormInfo info)
Parameters
infoBizFormInfoInfo object to be deleted.
Exceptions
- ArgumentNullException
Thrown when
infois null.
DeleteBizFormFiles(string, string)
Deletes all files of the specified BizForm.
public static void DeleteBizFormFiles(string className, string column)
Parameters
classNamestringBizForm class name
columnstringName of the column where file information is stored, optional
DeleteBizFormFilesInternal(string, string)
Deletes all files of the specified BizForm.
protected void DeleteBizFormFilesInternal(string className, string column)
Parameters
classNamestringBizForm class name
columnstringName of the column where file information is stored, optional
DeleteBizFormRecordFiles(string, BizFormItem)
Deletes all files of specified BizForm record.
public static void DeleteBizFormRecordFiles(string classFormDefinition, BizFormItem item)
Parameters
classFormDefinitionstringBizForm class form definition
itemBizFormItemBizForm item
DeleteData(string)
Delete all bizform data.
public static void DeleteData(string formName)
Parameters
formNamestringForm name
DeleteDataInternal(string)
Delete all bizform data.
protected void DeleteDataInternal(string formName)
Parameters
formNamestringForm name
GenerateFormPrimaryKeyName(string)
Takes code name of the form and generates a primary key name from it. Generated primary key is safe to use in the database. It does not contain forbidden characters, does not start with a number, etc.
public static string GenerateFormPrimaryKeyName(string formCodeName)
Parameters
formCodeNamestringCode name of the FormInfo
Returns
- string
Primary key name of the form
Exceptions
- ArgumentException
formCodeNameis null or empty
GenerateFormPrimaryKeyNameInternal(string)
Takes code name of the form and generates a primary key name from it. Generated primary key is safe to use in the database. It does not contain forbidden characters, does not start with a number, etc.
protected string GenerateFormPrimaryKeyNameInternal(string formCodeName)
Parameters
formCodeNamestringCode name of the FormInfo
Returns
- string
Primary key name of the form
Exceptions
- ArgumentException
formCodeNameis null or empty
GetBizFormFileColumns(string)
Returns names of the columns where BizForm file information is stored.
public static string[] GetBizFormFileColumns(string classFormDefinition)
Parameters
classFormDefinitionstringBizForm's class form definition
Returns
- string[]
GetBizFormInfoForClass(int)
Returns the BizFormInfo structure for the specified class.
public static BizFormInfo GetBizFormInfoForClass(int classId)
Parameters
classIdintClass ID
Returns
GetFormAuthorizedRoles(int)
Returns DataSet with roles that are allowed for specified form.
public static InfoDataSet<RoleInfo> GetFormAuthorizedRoles(int formId)
Parameters
formIdintForm ID
Returns
GetFormAuthorizedRolesInternal(int)
Returns DataSet with roles that are allowed for specified form.
protected InfoDataSet<RoleInfo> GetFormAuthorizedRolesInternal(int formId)
Parameters
formIdintForm ID
Returns
RefreshDataCount(BizFormInfo)
Refresh bizform items count.
public static void RefreshDataCount(BizFormInfo bizForm)
Parameters
bizFormBizFormInfoBizForm info object
RefreshDataCount(string)
Refresh bizform items count.
public static void RefreshDataCount(string formName)
Parameters
formNamestringForm name
RefreshDataCountInternal(BizFormInfo)
Refresh bizform items count.
protected void RefreshDataCountInternal(BizFormInfo bzi)
Parameters
bziBizFormInfoBizFormInfo
Set(BizFormInfo)
Inserts or updates the info object in the underlying data store.
public override void Set(BizFormInfo info)
Parameters
infoBizFormInfoInfo object to be inserted or updated.
Exceptions
- ArgumentNullException
Thrown when
infois null.