Click or drag to resize

clsImportEmployeeSkillLink Class

Import for table MPPersonenSkills: Employee Master: Employee Skill link. Use MPInterface.bImportEmployeeSkillLink(clsImportEmployeeSkillLink, clsImportBaseeImportMode) to import. Reads the MARIProjektImportData.mdb and the tables MARIProjektImportEmployeeSkillLink.
Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportEmployeeSkillLink

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

The clsImportEmployeeSkillLink type exposes the following members.

Constructors
  NameDescription
Public methodclsImportEmployeeSkillLink
Initializes a new instance of the clsImportEmployeeSkillLink class
Top
Properties
  NameDescription
Public propertyChangeDate
ChangeDate: For the import automtically set to NOW()
Public propertyChangeUser
ChangeUser: Create user. User loged in to MARIInterface
Public propertyCreateDate
CreateDate: Automatically set to NOW()
Public propertyEmployeeNumber
EmployeeNumber Key field to the employee. See clsImportEmployeeMaster for Master Data Creation
Public propertyEmployeeSkillMemo
Memo
Public propertyKnowledge
Additional Knowledge text in the skill table
Public propertyPriority
Priority in the linked skills. 0..100
Public propertyReminder
Reminder extra field for manual queries to remind a renewal of skills
Public propertySkillID
Link to the skill id: View: MARISkillMaster.EmployeeGroupID: :Table: MPSkills.GruppenID
Public propertyValidFrom
ValidFrom optional
Public propertyValidTo
ValidTo optional
Top
Methods
Remarks
Examples
Link a skill to an existing employee
public void AddSkill2Employee(string sEmployeeNumber) {

    MARIInterface.clsImportEmployeeSkillLink NewEmployeeSkillLink = new MARIInterface.clsImportEmployeeSkillLink();
    NewEmployeeSkillLink.EmployeeNumber = sEmployeeNumber;
    NewEmployeeSkillLink.SkillID = 100006; //SELECT EmployeeGroupID FROM MARISkillMaster WHERE TreeType=1
    NewEmployeeSkillLink.ValidFrom = new DateTime(2015, 12, 1);
    NewEmployeeSkillLink.Knowledge = "perfect";

    if (!oMPInterface.bImportEmployeeSkillLink(NewEmployeeSkillLink, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        throw new Exception(oMPInterface.oErrors.PrintErrors());
    }
}
Create new skills
public void CreateSkills() {

    int lParent = CreateSkillMaster("Language Skills");
    if (lParent != 0) {
        CreateSkillMaster("English", lParent);
        CreateSkillMaster("German", lParent);
        CreateSkillMaster("Spanish", lParent);
        CreateSkillMaster("Frensh", lParent);
    }
}

public int CreateSkillMaster(string sDescription, int lParent = 0) {

    MARIInterface.clsImportSkill NewSkill = new clsImportSkill();
    NewSkill.Description = sDescription;
    if (lParent == 0) {
        NewSkill.Indent = 1;
    } else {
        NewSkill.Parent = lParent;
        NewSkill.Indent = 2;
    }

    if (!oMPInterface.bImportSkill(NewSkill, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        throw new Exception(oMPInterface.oErrors.PrintErrors());
    } else {
        return NewSkill.SkillID;
    }
}
See Also