Beispiel #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);
 }
Beispiel #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 = Company::GetDatabase();
         $strQuery = sprintf('INSERT INTO `company_custom_field_helper` (`company_id`) VALUES (%s);', $this->CompanyId);
         $objDatabase->NonQuery($strQuery);
     } else {
         $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId;
         parent::Save($blnForceInsert, $blnForceUpdate);
     }
 }