<?php
class netsuserdepartment extends netsDb {
	private $sysErrorClassID='0000';
	private $sysErrorFuncID=0;
	private $sysErrorID=0;
	
	public function netsuserdepartment($pConnection){
		$this->netsDb($pConnection);
	}
	public function delete_Clear($pIds){
		$this->sysErrorFuncID=$this->sysErrorClassID.'01';
		//-- ------ #Self ------ --
		$tmpINT=parent::delete($pDescriptions,$pIds);
		if($tmpINT!=0){
			return $tmpINT;
		}
		//-- ------ #User ------ --
		$tmpNextIds='';
		$tmpAR0=array('uitDepartmentid','netsuserinfo','uit','uict',);
		$tmpINT=$this->deleteChild($tmpAR0,$pIds,$tmpNextIds);
		if($tmpINT!=0){
			$this->sysLastError='用户删除错误，请与管理员联系。';
			$this->TransRollback();
			return $this->sysErrorFuncID.'001';
		}

		return 0;
	}
	public function Check(&$pTableDescriptAR,$pExceptionAR1,$pExceptionAR2){
		$this->sysErrorFuncID=$this->sysErrorClassID.'02';

		if(count($pExceptionAR1)==0){
			$pExceptionAR1=array();
		}
		 parent::Check($pTableDescriptAR,$pExceptionAR1,$pExceptionAR2);
		//
		$tmpSTR='udeptName';
		if(strlen($pTableDescriptAR[0]['Columns'][$tmpSTR]['Value'])<1 && !in_array($tmpSTR,$pExceptionAR2)){
			$this->sysLastError='提交内容错误:1.名称不能为空';
			return $this->sysErrorFuncID.'001';
		}
		
		return 0;
	}
}
?>