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

   function GetDataForSync(){
      $dataList = $this->GetProperty("DataProceed");

      $this->StartTransaction();
      $prosesInsertUpdate = TRUE;

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

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