<?php 
class CDeptInfo
{
	var $dept_id;
	var $dept_name;
	var $dept_dec;
};

class CModuleDept extends CModuleBase
{
	function Init()
	{
		$sql = "select dept_id, dept_name, dept_desc from tb_dept order by 1";		
		$this->db->ExeQuerySql($sql);
	
		while($this->db->FetchRow())
		{			
			$mod = new CDeptInfo();
			$mod->dept_id = $this->db->Get("dept_id");
			$mod->dept_name = $this->db->Get("dept_name");
			$mod->dept_desc = $this->db->Get("dept_desc");
				
			$this->modules[$this->GetSize()] = $mod;
		}
		
		$this->db->FreeResult();
	}
	
	function InitModule($module_id)
	{
		$sql = "select dept_id, dept_name, dept_desc from tb_dept where dept_id=".$module_id." order by 1";		
		$this->db->ExeQuerySql($sql);
		while($this->db->FetchRow())
		{			
			$this->module = new CDeptInfo();
			$this->module->dept_id = $this->db->Get("dept_id");
			$this->module->dept_name = $this->db->Get("dept_name");
			$this->module->dept_desc = $this->db->Get("dept_desc");
		}
		
		$this->db->FreeResult();
	}
};
?>
