public function DepartSave($d)
 {
     $d->id = intval($d->id);
     if (!isset($d->remove)) {
         $utmf = Abricos::TextParser(true);
         $d->namedepart = $utmf->Parser($d->namedepart);
         $d->shortname = $utmf->Parser($d->shortname);
         if ($d->id > 0) {
             RecordBookQuery::DepartUpdate($this->db, $d);
         } else {
             RecordBookQuery::DepartAppend($this->db, $d);
         }
     } else {
         $d->remove = intval($d->remove);
         RecordBookQuery::DepartRemove($this->db, $d);
     }
 }