GetParts(MDPartsDatabaseItemPropertyList,MDPartsDatabaseItemPropertyList) Method
Gets the specified properties of all filtered parts that are stored in the parts database. With parameter properties you can define the properties you want to 'preload' on query. Use that method when you need only a few properties as read-only values from a lot of articles. When the filter is empty, than all parts are read.
Parameters
- filter
- properties
MDPartsDatabaseItemPropertyList filter = new MDPartsDatabaseItemPropertyList();
MDPartsDatabaseItemPropertyList properties = new MDPartsDatabaseItemPropertyList();
properties.ARTICLE_ERPNR = "-";
properties.ARTICLE_PARTNR = "-";
properties.ARTICLE_FREE_DATA_VALUE = "-";
//filter is empty => all parts
MDPart[] arrParts = m_MDPartsDatabase.GetParts(filter, properties);
foreach (Eplan.EplApi.MasterData.MDPart oPart in arrParts)
{
string strPartNr = oPart.PartNr;
string erpNum = oPart.Properties.ARTICLE_ERPNR;
}