/****************************************************** Function : Format_NID Purpose : Convert National_ID from National_ID_Format into National_ID without special characters and viceversa Version : 3.3.99 Parameters : COUNTRY,NID_TYPE,INPUT,DIRECTION Returns : STRING ******************************************************/ Function Format_NID(&COUNTRY, &NID_TYPE, &INPUT, &DIRECTION) Returns string; /*方法体*/ End-Function;
引用函数方法
1 2 3 4 5 6 7 8 9 10 11
Declare Function Format_NID PeopleCode FUNCLIB_HR.NID_SPECIAL_CHAR FieldFormula; Declare Function valid_NID PeopleCode FUNCLIB_HR.NID_SPECIAL_CHAR FieldFormula;
C_PREHIRE0_TBL.NID_SPECIAL_CHAR.Value = Format_NID(&VAR_COUNTRY, &VAR_NID_TYPE, &VAR_NID, "OUTDB"); If C_PREHIRE0_TBL.COUNTRY.Value = "CHN" And C_PREHIRE0_TBL.NATIONAL_ID_TYPE.Value = "NID" Then Local boolean &bool = valid_NID(&VAR_NID); If &bool = False Then Error("无效的身份证号,请重新输入!"); End-If; End-If;
classC_INSERT_PS_DATA /*构造函数*/ method C_INSERT_PS_DATA(); /* 导入数据;*/ method C_IMP_DATA(&arr2Data As array of array of string) Returns string; end-class;
/*构造函数*/ method C_INSERT_PS_DATA end-method;
/*导入函数*/ method C_IMP_DATA /+ &arr2Data as Array2 of String +/ /+ Returns String +/ /*方法体*/ Return &strReturn; end-method;
引用package函数方法
1 2 3 4 5 6 7 8 9
import C_DATA_IMP_PKG:*; Local C_DATA_IMP_PKG:C_INSERT_PS_DATA &ImpPsData = create C_DATA_IMP_PKG:C_INSERT_PS_DATA(); Local string &strPsDataRet = &ImpPsData.C_IMP_DATA_A(&arrPsData);
import C_APP_CLS:OBJECT:*; Local C_APP_CLS:OBJECT:JOB &Job = create C_APP_CLS:OBJECT:JOB(); Local array of any &arr = CreateArrayAny(); &arr.Push(C_TEST_ZL_WRK.EMPLID.Value); Local string &LocationName = &Job.GetLocationName(&arr);