<?php
/*
Author : Nikolius
Email : n1colius.lau@gmail.com
Date : 11-Jul-2015 02:13 PM
*/
require_once $cfg->mValue['docroot'] . "module/sia_setting/business/sia_setting.class.php";
class Pekerjaan extends SiaSetting {
   function Pekerjaan(&$configObject, $dataProceed) {
      SiaSetting::SiaSetting($configObject, $dataProceed);
      $this->AppendSqlQueries("module/pekerjaan/business/pekerjaan.sql.php");
   }

   function GetDataPekerjaanForSync(){
      $dataList = $this->GetProperty("DataProceed");
      $this->StartTransaction();
      $prosesInsertUpdate = TRUE;

      for ($i=0; $i < count($dataList); $i++) {
         $p = array(
            $dataList[$i]['id_pekerjaan'],
            $dataList[$i]['nm_pekerjaan'],
            $dataList[$i]['nm_pekerjaan']
         );
         $proses = $this->ExecuteUpdateQuery($this->mSqlQueries['syncDataPekerjaan'], $p);
         if($proses == FALSE) $prosesInsertUpdate = FALSE;
      }

      $this->CompleteTransaction($prosesInsertUpdate);
      return $prosesInsertUpdate;
   }
}
?>