Click or drag to resize

clsImportBPAuditTemplate Class

Imports a audit template master data. AuditTemplates will be used to link them via audit plans (clsImportBPAuditPlan) to business partner and plan recurring audits (clsImportBPAuditTask).

MS Access Table: MARIProjektImportWorkItemBPAuditTemplate. See clsImportBase.eImportMode relative tables in MS-Access.

Use MPInterface.bImportBPAuditTemplate(clsImportBPAuditTemplate, clsImportBaseeImportMode) to import. MSAccess Import Table: MARIProjectImportWorkItemBPAuditTemplate.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportBPAuditTemplate

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportBPAuditTemplate : clsImportBase

The clsImportBPAuditTemplate type exposes the following members.

Constructors
  NameDescription
Public methodclsImportBPAuditTemplate
Initializes a new instance of the clsImportBPAuditTemplate class
Top
Properties
  NameDescription
Public propertyAuditTemplateDocNum
INT (4) Visible ID based on Number Series. Will be created automatically. Leave this blank.
Public propertyAuditTemplateDocSeries
INT (4) ID of the number series
Public propertyAuditTemplateID
Internal ID of the audit template INT (4) Unique ID (via MPTAN). In access can be <100000 to align the positiosn
Public propertyAuditTemplateStatus
Public propertyCheckList
CheckList (int)
Public propertyCycleType
Cycle Type: Defines the recuurent cycle for the Audit Plans. Define as standard. Can be overwritten in the Plan
Public propertyCycleValue
Cycle Value = Number of month. For standard CycleType this value is set automatically
Public propertyMatchcode
NVARCHAR (50) Name of the Audit Template
Public propertyWorkDescription
NTEXT (0) Memo What to do
Public propertyWorkNotes
NTEXT (0) Memo for notes on site
Top
Methods
  NameDescription
Public methodGetListUserDefinedFields
Returns the user defined field definition for all dimension "WorkItem: Service Plan Template, Service Plan, Service Task, etc.". The fields have to be defined directly in MARIProject.
(Overrides clsImportBaseGetListUserDefinedFields(MPInterface).)
Top
Remarks
Examples
Create a audit template to be linked to business partners
public int CreateBPAuditTemplate(string sAuditTemplate) {
    Log($"CreateBPAuditTemplate({sAuditTemplate})");
    clsImportBPAuditTemplate oBPAuditTemplate = new clsImportBPAuditTemplate();

    oBPAuditTemplate.Matchcode = sAuditTemplate;
    oBPAuditTemplate.AuditTemplateStatus = clsImportBPAuditTemplate.eAuditTemplateStatus.InActive;
    oBPAuditTemplate.CycleType = clsImportWorkItemServicePlanTemplate.ePlanTemplateCycleType.Yearly;
    oBPAuditTemplate.WorkDescription = "This is a Audit Template Example.";


    if (!oMPInterface.bImportBPAuditTemplate(oBPAuditTemplate, clsImportBase.eImportMode.ValidateAndImport)) {
        // oTimeKeepingLine.oErrors contains all Errors
        LogFail(oMPInterface.oErrors.PrintErrors());
        return 0;
    } else {
        Log($"CreateBPAuditTemplate: {oBPAuditTemplate.AuditTemplateID}");
        return oBPAuditTemplate.AuditTemplateID;
    }
}
See Also