Ejemplo n.º 1
0
 /** 
  * DeleteRecord() - allow delete only if no child node
  * @return avoid
  */
 public function deleteRecord()
 {
     $rec = $this->getActiveRecord();
     if (!$rec) {
         return;
     }
     $id = $rec['Id'];
     $recordList = $this->getDataObj()->directFetch("[PId]='{$id}'");
     if (count($recordList) > 0) {
         global $g_BizSystem;
         $errorMsg = "Unable to delete the record that has 1 or more children nodes.";
         BizSystem::clientProxy()->showErrorMessage($errorMsg);
         return;
     }
     return parent::deleteRecord();
 }