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

class ProcessInventarisasi
{
	var $_POST;
	var $Obj;
	var $pageView;
	var $pageInput;
	
	//css hanya dipake di view
	var $cssDone = "notebox-done";
	var $cssFail = "notebox-warning";

	var $return;

	function __construct() {
		$this->Obj = new AppInventarisasi;
		$this->_POST = $_POST->AsArray();
		$this->pageView = Dispatcher::Instance()->GetUrl('inventarisasi', 'inventarisasi', 'view', 'html');
   }
   
   function DeleteInv()
   {	
		$result = $this->Obj->DoDeleteInventarisasi($this->_POST['idDelete']);
      if ($result === 0)
         $msg = array(1=>'Penghapusan Data Berhasil Dilakukan.', $this->cssDone);
      else $msg = array(1=>'Proses Penghapusan Data Gagal!', $this->cssFail);
      Messenger::Instance()->Send('inventarisasi', 'inventarisasi', 'view', 'html', $msg, Messenger::NextRequest);
      
      return $this->pageView;
   }
}
?>