コード例 #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);
 }
コード例 #2
0
ファイル: Manufacturer.class.php プロジェクト: brustj/tracmor
 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 = Manufacturer::GetDatabase();
         $strQuery = sprintf('INSERT INTO `manufacturer_custom_field_helper` (`manufacturer_id`) VALUES (%s);', $this->ManufacturerId);
         $objDatabase->NonQuery($strQuery);
     } else {
         $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId;
         parent::Save($blnForceInsert, $blnForceUpdate);
     }
 }