Class BizFormItemProvider
- Namespace
- CMS.OnlineForms
- Assembly
- CMS.OnlineForms.dll
Class for retrieving BizForm items.
public class BizFormItemProvider : AbstractInfoProvider<BizFormItem, BizFormItemProvider>, IInfoProvider, ICustomizableProvider, IBulkOperationProvider, IWebFarmProvider, IInfoValidator<BizFormItem>, IInfoProvider<BizFormItem>, IInfoByIdProvider<BizFormItem>, IInfoByGuidProvider<BizFormItem>, IInfoByNameProvider<BizFormItem>, IBulkInfoProvider<BizFormItem>
- Inheritance
-
objectBizFormItemProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
BizFormItemProvider()
Constructor (Creates uninitialized provider.)
[Obsolete("This constructor is meant for system purposes, it shouldn't be used directly.")]
public BizFormItemProvider()
BizFormItemProvider(bool, string)
Initializes a new instance of the BizFormItemProvider class.
protected BizFormItemProvider(bool initialize, string className)
Parameters
initialize
boolIndicates if provider together with hash tables should be initialized.
className
stringClass name of the BizForm.
BizFormItemProvider(string)
Base constructor for inherited classes and internal purposes
[Obsolete("This constructor is meant for system purposes, it shouldn't be used directly.")]
public BizFormItemProvider(string className)
Parameters
className
stringClass name of the BizForm
Fields
BIZFORM_ITEM_PREFIX
BizFrom item prefix for object type.
public const string BIZFORM_ITEM_PREFIX = "bizformitem."
Field Value
- string
Properties
ClassName
Class name
public string ClassName { get; protected set; }
Property Value
- string
IsValid
Indicates if the provider instance is up-to-date and can be used to manage object instances.
public override bool IsValid { get; }
Property Value
- bool
Methods
CreateInfo(DataRow, bool)
Creates new BizForm item instance
protected override BizFormItem CreateInfo(DataRow dr = null, bool useGenerator = true)
Parameters
dr
DataRowDataRow with the data
useGenerator
boolIf true, the process allows using the generator to differentiate between particular info types based on data
Returns
DeleteItem(BizFormItem)
Deletes given BizForm item
public static void DeleteItem(BizFormItem item)
Parameters
item
BizFormItemBizForm item
DeleteItemInternal(BizFormItem)
Deletes given BizForm item
protected virtual void DeleteItemInternal(BizFormItem item)
Parameters
item
BizFormItemBizForm item
DeleteItems(string, string)
Deletes all items for given BizForm.
public static void DeleteItems(string className, string where = null)
Parameters
className
stringClass name of the BizForm
where
stringWhere condition to filter the items
DeleteItemsInternal(string)
Deletes all items for given class.
protected virtual void DeleteItemsInternal(string where)
Parameters
where
stringWhere condition to filter the items
GetClassName(string)
Gets BizForm item class name from given object type.
public static string GetClassName(string objectType)
Parameters
objectType
stringObject type
Returns
- string
GetItem(int, string)
Returns BizForm item of specified class name and item ID.
public static BizFormItem GetItem(int itemId, string className)
Parameters
itemId
intItem ID
className
stringClass name of the BizForm
Returns
GetItemInternal(int)
Returns BizForm item of specified class name and item ID.
protected virtual BizFormItem GetItemInternal(int itemId)
Parameters
itemId
intItem ID
Returns
GetItemName(BizFormItem, string)
Gets BizForm item name.
public static string GetItemName(BizFormItem item, string classDisplayName)
Parameters
item
BizFormItemBizFrom table item
classDisplayName
stringClass display name
Returns
- string
GetItemNameInternal(BizFormItem, string)
Gets BizForm item name.
protected virtual string GetItemNameInternal(BizFormItem item, string classDisplayName)
Parameters
item
BizFormItemBizForm item
classDisplayName
stringClass display name
Returns
- string
GetItem<TType>(int)
Returns BizForm item of specified type and item ID.
public static TType GetItem<TType>(int itemId) where TType : BizFormItem, new()
Parameters
itemId
intItem ID
Returns
- TType
Type Parameters
TType
GetItems(string)
Returns query of all data record for given BizForm.
public static ObjectQuery<BizFormItem> GetItems(string className)
Parameters
className
stringClass name of the BizForm
Returns
GetItemsInternal()
Returns query of all data record for given BizForm.
protected virtual ObjectQuery<BizFormItem> GetItemsInternal()
Returns
GetItems<TType>()
Returns query of all data records for given type.
public static ObjectQuery<TType> GetItems<TType>() where TType : BizFormItem, new()
Returns
- ObjectQuery<TType>
Type Parameters
TType
GetObjectType(string)
Gets BizForm item object type from given class name.
public static string GetObjectType(string className)
Parameters
className
stringClass name
Returns
- string
GetTypeInfo(string)
Returns the TypeInfo for specified class.
public static ObjectTypeInfo GetTypeInfo(string className)
Parameters
className
stringClass name
Returns
IsBizFormItemObjectType(string)
Indicates if given object type represents BizForm item.
public static bool IsBizFormItemObjectType(string objectType)
Parameters
objectType
stringObject type
Returns
- bool
SetItem(BizFormItem)
Sets given BizForm item
public static void SetItem(BizFormItem item)
Parameters
item
BizFormItemBizForm item
SetItemInternal(BizFormItem)
Sets given BizForm item
protected virtual void SetItemInternal(BizFormItem item)
Parameters
item
BizFormItemBizForm item