<?php
require_once GTFWConfiguration::GetValue( 'application', 'docroot').
   'module/pb_usulan_history/business/UsulanHistory.class.php';

class ProcUsulanHistory
{
	var $viewPageJson;
	var $viewPage;
	var $cssDone = "notebox-done";
	var $cssFail = "notebox-warning";
	
	function __construct(){
		$_POST = $_POST->AsArray();
		$this->viewPageJson = Dispatcher::Instance()->GetUrl('pb_usulan_history', 'usulanHistory', 'view', 'html',true);
		$this->viewPage = Dispatcher::Instance()->GetUrl('pb_usulan_history', 'usulanHistory', 'view', 'html');
	}
	
	function Delete(){
		$obj =  new UsulanHistory();
		
		$result = $obj->DeleteUsulanHistoryById($_POST['idDelete']);
		
		if($result){
         Messenger::Instance()->Send('pb_usulan_history', 'usulanHistory', 'view', 'html', array($_POST,"Penghapusan Data Sukses", $this->cssDone),Messenger::NextRequest);
      }else{
         Messenger::Instance()->Send('pb_usulan_history', 'usulanHistory', 'view', 'html', array($_POST,"Penghapusan Data Gagal", $this->cssFail),Messenger::NextRequest); 
      }

		return $this->viewPage;
	}
}
?>
