Click or drag to resize

clsImportQualificationPlan Class

Imports an employee qualification plan. This links a qualification (clsImportQualification) to an employees (clsImportEmployee).

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

Use MPInterface.bImportQualificationPlan(clsImportQualificationPlan, clsImportBaseeImportMode) to import. MSAccess Import Table: MARIProjektImportWorkItemQualificationPlan.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportQualificationPlan

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

The clsImportQualificationPlan type exposes the following members.

Constructors
  NameDescription
Public methodclsImportQualificationPlan
Initializes a new instance of the clsImportQualificationPlan class
Top
Properties
  NameDescription
Public propertyCheckList
CheckList (int)
Public propertyCycleType
Cycle Type: Defines the recuurent cycle for the QualificationPlans. 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 propertyEmployeeNumber
Mandatory employee number.
Public propertyEndDate
WorkItemEnd End of the plan
Public propertyMatchcode
NVARCHAR (50) Name of the Qualificaion
Public propertyQualificationID
Link to the qualification (mandatory field). See clsImportQualification to create qualifications.
Public propertyQualificationPlanDocNum
INT (4) Visible ID based on Number Series. Will be created automatically. Leave this blank.
Public propertyQualificationPlanDocSeries
INT (4) ID of the number series
Public propertyQualificationPlanID
Internal ID of the qualification INT (4) Unique ID (via MPTAN). In access can be <100000 to align the positiosn
Public propertyQualificationPlanStatus
Public propertyScheduleType
Handling definition to create the plan dates for a service plan. See eScheduleType. When a ServicePlanTemplate (QualificationID) is linked and this value=None, the value is copied from the template.
Public propertyStartDate
StartDate start of the plan
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 qualification plan linked to an employee and a qualification
private int CreateQualificationPlan(string sEmployeeNumber, string sMatchcode, int lQualificationId, DateTime dtStartDate) {

    clsImportQualificationPlan NewPlan = new clsImportQualificationPlan();
    NewPlan.EmployeeNumber = sEmployeeNumber; //SELECT EmployeeNumber FROM MARIEmployeeMaster
    NewPlan.Matchcode = sMatchcode;
    NewPlan.StartDate = dtStartDate;
    NewPlan.EndDate = dtStartDate.AddYears(5);
    NewPlan.QualificationID = lQualificationId; // SELECT WorkItemID FROM MARIWorkItem where workitemtype=493
    NewPlan.CycleType = clsImportWorkItemServicePlanTemplate.ePlanTemplateCycleType.None; //copy cycle from Qualification
    if (oMPInterface.bImportQualificationPlan(NewPlan, clsImportBase.eImportMode.ValidateAndImport)) {
        return NewPlan.QualificationPlanID;
    } else {
        string sErrordetails;
        sErrordetails = oMPInterface.oErrors.PrintErrors(true);
        Assert.False(true, sErrordetails);
        return 0;
    }
}
Create a qualification to be linked to employees
private int CreateQualificationMaster(string sQualification, int GroupID) {

    string sErrordetails;
    clsImportQualification NewQualification = new clsImportQualification();
    NewQualification.Matchcode = sQualification;
    NewQualification.CycleType = clsImportWorkItemServicePlanTemplate.ePlanTemplateCycleType.Yearly;
    NewQualification.GroupId = GroupID; // SELECT GroupID FROM MARIGroups WHERE GroupType=10600 

    if (oMPInterface.bImportQualification(NewQualification, clsImportBase.eImportMode.ValidateAndImport)) {
        return NewQualification.QualificationID;
    } else {

        sErrordetails = oMPInterface.oErrors.PrintErrors(true);
        Assert.False(true, sErrordetails);
        return 0;
    }
}
See Also