Example #1
0
 public function Save($blnForceInsert = false, $blnForceUpdate = false)
 {
     if (!$this->__blnRestored || $blnForceInsert) {
         $this->CreatedBy = QApplication::$objUserAccount->UserAccountId;
         $this->CreationDate = new QDateTime(QDateTime::Now);
     } else {
         $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId;
     }
     parent::Save($blnForceInsert, $blnForceUpdate);
 }
Example #2
0
 public function Save($blnForceInsert = false, $blnForceUpdate = false)
 {
     if (!$this->__blnRestored || $blnForceInsert) {
         $this->CreatedBy = QApplication::$objUserAccount->UserAccountId;
         $this->CreationDate = new QDateTime(QDateTime::Now);
         parent::Save($blnForceInsert, $blnForceUpdate);
         // If we have no errors then will add the data to the helper table
         $objDatabase = Category::GetDatabase();
         $strQuery = sprintf('INSERT INTO `category_custom_field_helper` (`category_id`) VALUES (%s);', $this->CategoryId);
         $objDatabase->NonQuery($strQuery);
     } else {
         $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId;
         parent::Save($blnForceInsert, $blnForceUpdate);
     }
 }