private void krishh_employeeCreateUsingService(container _c)
{
HcmWorkerImportService hcmWorkerImportService;
HcmWorkerImport hcmWorkerImport;
HcmWorkerImport_HcmWorker hcmWorkerImport_HcmWorker;
HcmWorkerImport_DirPerson_DirPerson hcmWorkerImport_DirPerson_DirPerson;
HcmWorkerImport_HcmPersonPrivateDetails hcmWorkerImport_HcmPersonPrivateDetails;
HcmWorkerImport_DirPersonName hcmWorkerImport_DirPersonName;
HcmWorkerImport_DirPartyPostalAddressVie hcmWorkerImport_DirPartyPostalAddressVie;
HcmWorkerImport_HcmEmployment hcmWorkerImport_HcmEmployment;
HcmWorkerImport_HcmEmploymentDetail hcmWorkerImport_HcmEmploymentDetail;
HcmWorkerImport_HcmWorkerTitle hcmWorkerImport_HcmWorkerTitle;
;
// creating the service object
hcmWorkerImportService = HcmWorkerImportService::construct();
hcmWorkerImport = new HcmWorkerImport();
hcmWorkerImport_HcmWorker =hcmWorkerImport.createHcmWorker().addNew();
hcmWorkerImport_HcmWorker.parmPersonnelNumber(conpeek(_c, EmployeeNumber));
hcmWorkerImport_DirPerson_DirPerson =hcmWorkerImport_HcmWorker.createDirPerson().addNew();
hcmWorkerImport_DirPerson_DirPerson.parmInitials(conpeek(_c, Initials));
hcmWorkerImport_DirPerson_DirPerson.parmProfessionalTitle(conpeek(_c, Position));
hcmWorkerImport_DirPersonName =hcmWorkerImport_DirPerson_DirPerson.createDirPersonName().addNew();
hcmWorkerImport_DirPersonName.parmFirstName(conpeek(_c, FirstName));
hcmWorkerImport_DirPersonName.parmMiddleName(conpeek(_c, MiddleName));
hcmWorkerImport_DirPersonName.parmLastName(conpeek(_c, LastName));
hcmWorkerImport_HcmPersonPrivateDetails =hcmWorkerImport_DirPerson_DirPerson.createHcmPersonPrivateDetails().addNew();
hcmWorkerImport_HcmPersonPrivateDetails.parmBirthDate(HrmImportEmployeeMasterdata::convDate(conpeek(_c, BirthDate)));
hcmWorkerImport_HcmPersonPrivateDetails.parmGender(HrmImportEmployeeMasterdata::convGender(conpeek(_c, Gender)));
hcmWorkerImport_DirPartyPostalAddressVie =hcmWorkerImport_DirPerson_DirPerson.createDirPartyPostalAddressView().addNew();
hcmWorkerImport_DirPartyPostalAddressVie.parmCountryRegionId(HrmImportEmployeeMasterdata::defaultCountryRegionId());
hcmWorkerImport_DirPartyPostalAddressVie.parmRoles(HrmImportEmployeeMasterdata::defaultRole());
hcmWorkerImport_DirPartyPostalAddressVie.parmStreet(conpeek(_c, Address));
hcmWorkerImport_DirPartyPostalAddressVie.parmStreetNumber(conpeek(_c, streetnum)));
hcmWorkerImport_DirPartyPostalAddressVie.parmZipCode(conpeek(_c, PostalCode));
hcmWorkerImport_HcmEmployment =hcmWorkerImport_HcmWorker.createHcmEmployment().addNew();
hcmWorkerImport_HcmEmployment.parmLegalEntity(curext());
hcmWorkerImport_HcmEmploymentDetail =hcmWorkerImport_HcmEmployment.createHcmEmploymentDetail().addNew();
hcmWorkerImport_HcmEmploymentDetail.parmWorkerStartDate(
datetobeginUtcDateTime(HrmImportEmployeeMasterdata::convDate(conpeek(_c, DateOfHiring)), DateTimeUtil::getUserPreferredTimeZone()));
hcmWorkerImportService.create(hcmWorkerImport);
}
{
HcmWorkerImportService hcmWorkerImportService;
HcmWorkerImport hcmWorkerImport;
HcmWorkerImport_HcmWorker hcmWorkerImport_HcmWorker;
HcmWorkerImport_DirPerson_DirPerson hcmWorkerImport_DirPerson_DirPerson;
HcmWorkerImport_HcmPersonPrivateDetails hcmWorkerImport_HcmPersonPrivateDetails;
HcmWorkerImport_DirPersonName hcmWorkerImport_DirPersonName;
HcmWorkerImport_DirPartyPostalAddressVie hcmWorkerImport_DirPartyPostalAddressVie;
HcmWorkerImport_HcmEmployment hcmWorkerImport_HcmEmployment;
HcmWorkerImport_HcmEmploymentDetail hcmWorkerImport_HcmEmploymentDetail;
HcmWorkerImport_HcmWorkerTitle hcmWorkerImport_HcmWorkerTitle;
;
// creating the service object
hcmWorkerImportService = HcmWorkerImportService::construct();
hcmWorkerImport = new HcmWorkerImport();
hcmWorkerImport_HcmWorker =hcmWorkerImport.createHcmWorker().addNew();
hcmWorkerImport_HcmWorker.parmPersonnelNumber(conpeek(_c, EmployeeNumber));
hcmWorkerImport_DirPerson_DirPerson =hcmWorkerImport_HcmWorker.createDirPerson().addNew();
hcmWorkerImport_DirPerson_DirPerson.parmInitials(conpeek(_c, Initials));
hcmWorkerImport_DirPerson_DirPerson.parmProfessionalTitle(conpeek(_c, Position));
hcmWorkerImport_DirPersonName =hcmWorkerImport_DirPerson_DirPerson.createDirPersonName().addNew();
hcmWorkerImport_DirPersonName.parmFirstName(conpeek(_c, FirstName));
hcmWorkerImport_DirPersonName.parmMiddleName(conpeek(_c, MiddleName));
hcmWorkerImport_DirPersonName.parmLastName(conpeek(_c, LastName));
hcmWorkerImport_HcmPersonPrivateDetails =hcmWorkerImport_DirPerson_DirPerson.createHcmPersonPrivateDetails().addNew();
hcmWorkerImport_HcmPersonPrivateDetails.parmBirthDate(HrmImportEmployeeMasterdata::convDate(conpeek(_c, BirthDate)));
hcmWorkerImport_HcmPersonPrivateDetails.parmGender(HrmImportEmployeeMasterdata::convGender(conpeek(_c, Gender)));
hcmWorkerImport_DirPartyPostalAddressVie =hcmWorkerImport_DirPerson_DirPerson.createDirPartyPostalAddressView().addNew();
hcmWorkerImport_DirPartyPostalAddressVie.parmCountryRegionId(HrmImportEmployeeMasterdata::defaultCountryRegionId());
hcmWorkerImport_DirPartyPostalAddressVie.parmRoles(HrmImportEmployeeMasterdata::defaultRole());
hcmWorkerImport_DirPartyPostalAddressVie.parmStreet(conpeek(_c, Address));
hcmWorkerImport_DirPartyPostalAddressVie.parmStreetNumber(conpeek(_c, streetnum)));
hcmWorkerImport_DirPartyPostalAddressVie.parmZipCode(conpeek(_c, PostalCode));
hcmWorkerImport_HcmEmployment =hcmWorkerImport_HcmWorker.createHcmEmployment().addNew();
hcmWorkerImport_HcmEmployment.parmLegalEntity(curext());
hcmWorkerImport_HcmEmploymentDetail =hcmWorkerImport_HcmEmployment.createHcmEmploymentDetail().addNew();
hcmWorkerImport_HcmEmploymentDetail.parmWorkerStartDate(
datetobeginUtcDateTime(HrmImportEmployeeMasterdata::convDate(conpeek(_c, DateOfHiring)), DateTimeUtil::getUserPreferredTimeZone()));
hcmWorkerImportService.create(hcmWorkerImport);
}
No comments:
Post a Comment