function parseData($postArr) { $this->empbassal->setEmpId(trim($postArr['txtEmpID'])); $this->empbassal->setEmpSalGrdCode(trim($postArr['cmbSalaryGrade'])); $this->empbassal->setEmpCurrCode($postArr['cmbCurrCode']); $this->empbassal->setEmpBasSal(trim($postArr['txtBasSal'])); $payPeriod = trim($postArr['cmbPayPeriod']); if ($payPeriod > 0) { $this->empbassal->setPayPeriod($payPeriod); } if (isset($postArr['oldSalaryGrade']) && isset($postArr['oldCurrency'])) { $oldObject = new EmpBasSalary(); $oldObject->setEmpSalGrdCode($postArr['oldSalaryGrade']); $oldObject->setEmpCurrCode($postArr['oldCurrency']); $array = array(); $array['new'] = $this->empbassal; $array['old'] = $oldObject; return $array; } else { return $this->empbassal; } }
function delAssignData($index, $postArr, $getArr) { switch ($index) { case 'JSP': $empjob = new EmpJobSpec(); $arr[1] = $postArr['chkdel']; for ($c = 0; count($arr[1]) > $c; $c++) { if ($arr[1][$c] != NULL) { $arr[0][$c] = $getArr['id']; } } $empjob->delEmpJobSpec($arr); break; case 'CXT': $empconex = new EmpConExt(); $arr[1] = $postArr['chkdel']; for ($c = 0; count($arr[1]) > $c; $c++) { if ($arr[1][$c] != NULL) { $arr[0][$c] = $getArr['id']; } } $empconex->delConExt($arr); break; case 'SAL': $empbassal = new EmpBasSalary(); $arr = $postArr['chkdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empbassal->delEmpBasSal($arrpass); break; case 'LAN': $emplan = new EmpLanguage(); $arr = $postArr['chkdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $emplan->delEmpLang($arrpass); break; case 'MEM': $empmem = new EmpMembership(); $arr = $postArr['chkdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empmem->delEmpMembership($arrpass); break; case 'EXP': $empworkex = new EmpWorkExp(); $arr[1] = $_POST['chkdel']; for ($c = 0; count($arr[1]) > $c; $c++) { if ($arr[1][$c] != NULL) { $arr[0][$c] = $getArr['id']; } } $empworkex->delEmpWorkExp($arr); break; case 'EXC': $empextcur = new EmpExCur(); $arr[1] = $postArr['chkdel']; for ($c = 0; count($arr[1]) > $c; $c++) { if ($arr[1][$c] != NULL) { $arr[0][$c] = $getArr['id']; } } $empextcur->delEmpExCur($arr); break; case 'QUA': $empqual = new EmpQualification(); $arr[1] = $postArr['chkdel']; for ($c = 0; count($arr[1]) > $c; $c++) { if ($arr[1][$c] != null) { $arr[0][$c] = $getArr['id']; } } $empqual->delEmpQual($arr); break; case 'QAS': $empqualsub = new EmpQualSubject(); $arr[2] = $postArr['chkdel']; for ($c = 0; count($arr[2]) > $c; $c++) { if ($arr[2][$c] != null) { $arr[0][$c] = $getArr['id']; $arr[1][$c] = $getArr['QUA']; } } $empqualsub->delEmpQualSub($arr); break; case 'CBN': $empcashben = new EmpCashBen(); $arrpass[1] = $postArr['chkdel']; for ($c = 0; count($arrpass[1]) > $c; $c++) { if ($arrpass[1][$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empcashben->delEmpCashBen($arrpass); break; case 'NBN': $empnoncashben = new EmpNonCashBen(); $arrpass[1] = $postArr['chkdel']; for ($c = 0; count($arrpass[1]) > $c; $c++) { if ($arrpass[1][$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empnoncashben->delEmpNonCashBen($arrpass); break; case 'REP': $emprepto = new EmpRepTo(); if ($postArr['delSupSub'] == 'sup') { $arr = $postArr['chksupdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[0][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[1][$c] = $getArr['id']; } } } elseif ($postArr['delSupSub'] == 'sub') { $arr = $postArr['chksubdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } } $emprepto->delEmpRepTo($arrpass); break; case 'SKI': $empskill = new EmpSkill(); $arr = $postArr['chkdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empskill->delEmpSkill($arrpass); break; case 'LIC': $empLicen = new EmpLicenses(); $arr = $postArr['chkdel']; for ($c = 0; count($arr) > $c; $c++) { $frg = explode("|", $arr[$c]); $arrpass[1][$c] = $frg[0]; $arrpass[2][$c] = $frg[1]; } for ($c = 0; count($arr) > $c; $c++) { if ($arr[$c] != NULL) { $arrpass[0][$c] = $getArr['id']; } } $empLicen->delEmpLicenses($arrpass); break; } }