MPInterfaceoGetGroups Method |
Namespace: MARIInterface
public List<clsKeyPair> oGetGroups( clsImportGroupseGroupType nGroupType )
Public Function oGetGroups ( nGroupType As clsImportGroupseGroupType ) As List(Of clsKeyPair)
public int GetOrCreateGroup(clsImportGroups.eGroupType nGroupType, string GroupName) { List<MARIInterface.clsKeyPair> ListOfGroup; //Load list all group values ListOfGroup = oMPInterface.oGetGroups(nGroupType); //Seach if groups is existing foreach (MARIInterface.clsKeyPair oPair in ListOfGroup) { if (oPair.sMatchcode.ToUpper() == GroupName.ToUpper()) { return Int32.Parse(oPair.sKeyInternal); } } //Group not found, create it clsImportGroups NewGroup = new clsImportGroups(); NewGroup.GroupType = nGroupType; NewGroup.Description = GroupName; if (oMPInterface.bImportGroup(NewGroup, clsImportBase.eImportMode.ValidateAndImport)) { return NewGroup.GroupID; } else { string sErrordetails = oMPInterface.oErrors.PrintErrors(true); Assert.False(true, sErrordetails); return 0; } }
© by MARINGO Computers GmbH, Cologne Germany