Click or drag to resize

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
)

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: Boolean
insert data item?
Exceptions
ExceptionCondition
NotImplementedException
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