AppStandardDataItemClassImportItem Method | |
Import a data item
Namespace:
SOWIApp.Foundation
Assembly:
SOWIApp.Foundation (in SOWIApp.Foundation.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax protected virtual bool ImportItem(
ref DataItemClass pItem,
DataRow pItemImport,
List<DataGrid> pDataGridView
)
Protected Overridable Function ImportItem (
ByRef pItem As DataItemClass,
pItemImport As DataRow,
pDataGridView As List(Of DataGrid)
) As Boolean
Parameters
- pItem
- Type: DataItemClass
data item to database - pItemImport
- Type: System.DataDataRow
data item from import file - pDataGridView
- Type: System.Collections.GenericListDataGrid
Data Grid View about this data
Return Value
Type:
Booleaninsert data item?
Exceptions Remarks
this method has no code (not implemented) must method override
Examples
Implement example. Note: create a new data item
pItem = new SOWIData.App.Activity();
foreach (var itemDataGrid in pDataGridView)
{
if (itemDataGrid.CanEdit)
{
try
{
pItem[itemDataGrid.DataFieldName] = pItemImport[itemDataGrid.ColumnLabel];
}
catch { }
}
}
return true;
See Also