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); }
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); $objDatabase = AssetModel::GetDatabase(); $strQuery = sprintf('INSERT INTO `asset_model_custom_field_helper` (`asset_model_id`) VALUES (%s);', $this->AssetModelId); $objDatabase->NonQuery($strQuery); } else { $this->ModifiedBy = QApplication::$objUserAccount->UserAccountId; parent::Save($blnForceInsert, $blnForceUpdate); } }