<?php
class Barang extends Database
{
   protected $mSqlFile;
   
	function __construct($connectionNumber=0)
   {
      $this->mSqlFile = 'module/'.Dispatcher::Instance()->mModule.'/business/PopupBarang.sql.php';
		parent::__construct($connectionNumber);
		
	}
   
	function GetCount(){
		$result = $this->Open($this->mSqlQueries['get_count'],array());
		return $result[0]['total'];
	}
   
   function GetDataBarang($data,$lokasiId,$unitId,$kondisi_barang,$start = 0,$limit = 1000)
   {	
      $result = $this->Open($this->mSqlQueries['get_data_barang'],array($lokasiId, $unitId,'%'.$data.'%',$kondisi_barang,$kondisi_barang,$start,$limit));		
      return $result;
   }
	
	function GetKondisiBarang()
   {	
      $result = $this->Open($this->mSqlQueries['kondisi_barang'],array());		
      return $result;
   }
}
?>
