clsImportEmployee Class |
This class contains several tables. In real data many of the tables are 1:n to the employee master. For the initial import, the subtables can be created in one go.
Namespace: MARIInterface
The clsImportEmployee type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportEmployee |
Create a new instance to store data for the new employee
|
| Name | Description | |
|---|---|---|
| AbsenceInternalProject | Project Template: Absence (internal project) projectnumber. clsImportProjecteProjectType | |
| AbsenceProject | Project Template: Absence projectnumber. clsImportProjecteProjectType | |
| AccCostRate | Accounting Cost Rate: First cost rate for the internal service charge modul | |
| AccCostRate2 | Accounting Cost Rate: Second cost rate for the internal service charge modul | |
| AccCostRate3 | Accounting Cost Rate: Third cost rate for the internal service charge modul | |
| AccCostRate4 | Accounting Cost Rate: Fourth cost rate for the internal service charge modul | |
| AccCurrency | Accounting Cost Rate: Currency for the internal service charge rates. Use ISO Currency code | |
| AccMode |
AccMode of the User
| |
| AddressBlock | Company Address Block | |
| AddressBuilding | Company Address Building | |
| AddressName3 | AddressName3 | |
| Adress | Salutation Like "Dear Sir John Doe" | |
| AdressMemo | AdressMemo | |
| BusinessUnit |
[Mandatory] Business Unit of the employee (1:1 for fixed employees, 1:n for freelancers). See dimension clsImportSetupBusinessUnits for details.
| |
| CalendarID |
Link to employee calendar. Link to the Calendar Table
| |
| ChangeDate |
Last change date. Filled automatically
| |
| ChangeUserID |
NVARCHAR(4) Last change user ID. Filled automatically
| |
| City | Company Address City | |
| CostCenter | Responsible Cost Centre (Company Business Unit) (Cost Centre) | |
| CostCenter2 | Responsible Cost Center dimenson 2 | |
| CostCenter3 | Responsible Cost Center dimenson 3 | |
| CostCenter4 | Responsible Cost Center dimenson 4 | |
| CostCenter5 | Responsible Cost Center dimenson 5 | |
| CostObjektive |
Responsible Cost Objektive (Company Business Unit) (field not used)
| |
| CostRatePolitical |
Costprice per hour for project planning and internal service charges. (Sales prices is defined in the sales contract position)
| |
| CostRatePolitical2 |
Second cost rate. Is only used when CostRateType = MainBusinessUnitOtherThanOthers | |
| CostRateType | Obsolete.
Please use PoliticalCostRatesType instead. Normaly an employee will have only one cost rate for all business units he/she is working for.
| |
| Country | Company Address Country | |
| County | Company AddressCounty | |
| CreateUser |
Check to create automatically a user in MARIProject
| |
| Creditor |
Cerditor (BusinessPartner) for travel expense processing (CompanyID from Business Unit)
| |
| CreditorCreditCard |
Business Partner for the Company Credit Card used by the employee
| |
| CreditorCreditCard2 | Business Partner for the second Company Credit Card used by the employee | |
| CreditorCreditCard3 | Business Partner for the third Company Credit Card used by the employee | |
| DateOfBirth | Date of birth | |
| DateOfEntry |
Beginning date in the company
| |
| Debitor | Linked Business Partner for Debitor processes | |
Email | ||
| EmployeeManager |
Responsible manager for this employee. Link to an existing employee in the database
| |
| EmployeeMemo | Memo field for the employee | |
| EmployeeName |
NVARCHAR(50) Copount Name: FirstName LastName. When this field is empty, it is calculated based on "FirstNameFamilyName".
| |
| EmployeeNumber |
Unique Employee ID to be formatted based on the settings of MARIProject Example "E200".
You can generate a new employee number using the function sGetNewEmployeeNumber. | |
| EmployeeSecondManager |
2nd Responsible manager for this employee. Link to an existing employee in the database
| |
| EmployeeStatus |
[Mandatory] Each employee can be either a regular employee or a free lancer. See clsImportEmployeeeEmployeeStatus.
| |
| ExchangeSyncMode | ExchangeSyncMode | |
| ExternalKey |
NVARCHAR(50) External Key of the employee. used by MARITimeTouch and RFID Reader. PDA Key
| |
| FamilyName | Employee Surname | |
| Fax | Company Fax | |
| FirstName |
Employees First Name
| |
| Flextime | Project Template: Flextime projectnumber. clsImportProjecteProjectType | |
| Funktion |
Functiontext e.g. Groupleader
| |
| GroupID |
Reference to the Employee Group 1. Link to MPGruppen WHERE GruppenArt=10001 EmployeeGroup | |
| GroupID2 |
Reference to the Employee Group 2. Link to MPGruppen WHERE GruppenArt=10006 EmployeeGroup2 | |
| GroupID3 |
Reference to the Employee Group 3. Link to MPGruppen WHERE GruppenArt=10007 EmployeeGroup3 | |
| IllnessProject | Project Template: Illness project. clsImportProjecteProjectType | |
| LeavingDate | Leaving Date | |
| LocationID | LocationID | |
| Matchcode |
NVARCHAR(50) Name for assortment. User "Name, Surname" or "Surname, Name". When this field is empty it is calculated based on "FamilyName, FirstName.
| |
| Mobile | Mobile | |
| OutOfOfficeStatus | OutOfOfficeStatus | |
| OutOfOfficeSubstitute | OutOfOfficeSubstitute eMail address | |
| OutOfOfficeText | OutOfOfficeText information for the approval | |
| OvertimeStart |
re- /set the overtime start value in hours for the given ValidFrom period.
| |
| PayrollCompany |
internal company id for payroll export
| |
| PayrollEmplNo |
Active employee number in the payroll accounting export
| |
| PayrollEmployeeNumber | Obsolete.
Please use PayrollEmplNo instead. Active employee number in the payroll accounting export.
| |
| PersonalType | Obsolete.
Please use EmployeeStatus instead. [Mandatory] Each employee can be either a regular employee or a free lancer. See clsImportEmployeeePersonalType and clsImportEmployeeeEmployeeStatus.
| |
| Phone | Company Phone | |
| PictureArrayOfBytes |
The picture can be transfered via a byte array instead of a PictureFileName.
| |
| PictureFileName | Linking a file name, will load this file into the database. The file content has to be accessable from the import process.
The picture content is stored in: View: MARIPictures : : Table: MPBilder | |
| PictureID | PictureID (for the import only existing key in table MPBilder supported. | |
| PlanningCapacity |
0 to 100 (if aplicable over 100).How far may this employee be taken into account (Planned working time * Planning capacity/100) = Planable hours
| |
| PoliticalCostRatesType |
Normaly an employee will have only one cost rate for all business units he/she is working for. See clsImportEmployeeeCostRateType.
| |
| PrimaryCreationDate |
Date of the createn of the dataset. Filled automatically
| |
| PrivateFax | PrivateFax | |
| PrivatePhone | Private Phone | |
| RoundingProject | Project Template: Rounding project. clsImportProjecteProjectType | |
| Salutation |
Title like "Mr., Mrs..."
| |
| SpecialLeave | Project Template: Special Leave projectnumber. clsImportProjecteProjectType | |
| StandardProject | Project Template: Projectnumber of the standard employee project. clsImportProjecteProjectType | |
| StandardService |
Can be used to store the first standard service to the employee
| |
| State | Company Address State Code (NY=New York State) | |
| Street | Company AddressStreet | |
| StreetNo | Company Street Number | |
| Title | Obsolete.
Please use Salutation instead. Title like "Mr., Mrs..."
| |
| TravelExpensesRule | TravelExpensesRule specially set, overwriting employee business unit setting. | |
| UnpaidAbsenceProject | Project Template: Unpaid absence projectnumber. clsImportProjecteProjectType | |
| UserCode |
NVARCHAR(4)4 character user initials. This field is used for the link between employee and user. It will be created automatically
Used, whenn CreateUser is true | |
| UserGroup |
The selected user groups of the user (flag set)
| |
| UserID |
NVARCHAR(4) Identification code of the user. Internal ID, created automatically
| |
| UserLevel |
User Level. See clsImportEmployeeeUserLevel for details.
| |
| UserName |
UserName for the newley created user
Used, whenn CreateUser is true | |
| UserNameShort | Obsolete.
Please use UserCode instead. 4 character user initials. This field is used for the link between employee and user. It will be created automatically.
Used, whenn CreateUser is true | |
| VacationCalendarPeriod | Vacation Periode 2016001 (not necessary. Filled by the VacationCalendarYear | |
| VacationCalendarYear | The year of the vacation 2016 | |
| VacationCompensation | Obsolete. Please use VacationCompensationCurrYear. Vacation compensation for special vacations. Property will stay for compatibility only. | |
| VacationCompensationCurrYear | Vacation compensation for special vacations | |
| VacationEntitlement | Obsolete. Please use VacationEntitlementCurrYear instead. Entry of Vacation Entitlment. Property will stay for compatibility only. | |
| VacationEntitlementCurrYear | Entry of Vacation Entitlment | |
| VacationForward | Obsolete. Please use VacationSpecialLeave. Carry over from the previous year. | |
| VacationPreviousYear | Remaining Vacation Days | |
| VacationProject | Project Template: Vacation project. clsImportProjecteProjectType | |
| VacationSpecialLeave | Carry over from the previous year. (Property name is wrong, but used for the carry over). | |
| ValidFrom | Period in the time organisation of MARIProject employee master (Period+Organisation). Format: 2016012 YYYYMMM | |
| ValidPeriodeFrom | Obsolete. Please use property ValidFrom instead. Period in the time organisation of MARIProject 2016012 YYYYMMM | |
| ZIPCode | Company Address Zip-Code |
| Name | Description | |
|---|---|---|
| bLoadEmployeeCurrentValidFrom |
Loads data for existing employee master data and sub tables, based on the current date with the matching "valid from" period.
Use bImportEmployee(clsImportEmployee, clsImportBaseeImportMode) with the option Update to save the changes. | |
| bLoadEmployeeValidFrom |
Loads data for existing employee master data and sub tables, based on the current date with the matching "valid from" period.
To Create a new valid from period. Simply change the lValidFromPeriod to the new requested period. Use bImportEmployee(clsImportEmployee, clsImportBaseeImportMode) with the option Update to save the changes. | |
| bReadFromDB |
Reads the employee data from the database and copies the values to the class
Only for internal use! To load data use your own SQL.
(Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB |
Internal Use Only (write example data to the access mdb)
(Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| GetListUserDefinedFields |
Returns the user defined field definition for the dimension "Employee Master". The fields have to be defined directly in MARIProject.
(Overrides clsImportBaseGetListUserDefinedFields(MPInterface).) |
| Name | Description | |
|---|---|---|
| SysMasterProperties |
Link this employee master to one or many SysMaster Properties. Having the ID in the list means, that the property is true.
See the clsImportSysMasterProperties description to create new properites. Alle selected properties must have a UsageFlag of ClassID033Employee. |
Import from the MS Access table MARIProjektImportEmployee.
private string CreateEmployee() { MARIInterface.clsImportEmployee NewEmployee = new MARIInterface.clsImportEmployee(); // MARIEmployeeMaster NewEmployee.EmployeeNumber = oMPInterface.sGetNewEmployeeNumber(); // creates a new free number based on the number sValue (ex. M0001) NewEmployee.EmployeeName = "Marc Import"; NewEmployee.Matchcode = "Marc Import"; //Field for search and display NewEmployee.Adress = "Dear Mr. Import"; NewEmployee.Salutation = "Mr."; NewEmployee.FirstName = "Marc"; NewEmployee.FamilyName = "Import"; NewEmployee.Street = "Cupertino Drive"; NewEmployee.StreetNo = "1"; NewEmployee.ZIPCode = "59000"; NewEmployee.Country = "US"; NewEmployee.County = "Cupertino"; NewEmployee.City = "Cupertino"; NewEmployee.Phone = "+1 212 456 798"; NewEmployee.DateOfBirth = new DateTime(1985, 8, 12); NewEmployee.ExternalKey = "98654631"; // Code of the RFID Chip //MARIEmployeesPeriod NewEmployee.EmployeeStatus = clsImportEmployee.eEmployeeStatus.FixedEmployee; // 1 NewEmployee.BusinessUnit = 1; // SELECT BusinessUnitID FROM MARIBusinessUnitMaster NewEmployee.ValidFrom = 2016005; //SELECT Period FROM MARIPeriods NewEmployee.Creditor = "71004"; // SELECT CardCode FROM OCRD WHERE CardType='S' NewEmployee.EmployeeManager = "0001"; //SELECT EmployeeNumber FROM MARIEmployeeMaster NewEmployee.PoliticalCostRatesType = clsImportEmployee.eCostRateType.OneCostRate; NewEmployee.CostRatePolitical = 50m; NewEmployee.AccCostRate = 45.46m; NewEmployee.OvertimeStart = 0m; NewEmployee.CalendarID = 100000; //SELECT CalendarID FROM MARICalendar NewEmployee.PlanningCapacity = 100; //100% //MARIEmployeeAnnualVacation NewEmployee.VacationCalendarYear = 2016; NewEmployee.VacationEntitlementCurrYear = 25; //MARIUser NewEmployee.CreateUser = true; NewEmployee.UserName = NewEmployee.FamilyName; Random rnd = new Random(); int n = rnd.Next(0, 999); NewEmployee.UserName += $"{n:000}"; //IN20250522 Benutzer ist schon da gewesen, also Zufall dran NewEmployee.UserLevel = clsImportEmployee.eUserLevel.ProjectManager; NewEmployee.UserGroup = 2052; //SELECT Groups FROM MARIUser. Flags depending on the defined user groups NewEmployee.AccMode = 1; //SELECT AccountingMode FROM MARIUser if (!oMPInterface.bImportEmployee(NewEmployee, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) { throw new Exception(oMPInterface.oErrors.PrintErrors()); } else { string sMessage = "New employee created. EmployeeNumber = " + NewEmployee.EmployeeNumber; return NewEmployee.EmployeeNumber; } }