Ejemplo n.º 1
0
 /**
  * Update the entity. First expire any existing activity employee types
  *
  * @return unknown
  */
 function update()
 {
     # expire the existing employee types
     $expire_query = "UPDATE activityemployeetypes SET expirydate = NOW(), currentflag = 'N' WHERE currentflag = 'Y' AND activityid = '" . $this->getID() . "'";
     $expireresult = $this->getDB()->executeQuery($expire_query);
     if (!$expireresult) {
         # add the error message to the string
         $this->setError($this->getDB()->getError());
         return false;
     }
     # now update the activity
     return parent::update();
 }