本文整理匯總了PHP中CRMEntity::save方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRMEntity::save方法的具體用法?PHP CRMEntity::save怎麽用?PHP CRMEntity::save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRMEntity
的用法示例。
在下文中一共展示了CRMEntity::save方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: save
function save($module)
{
global $app_strings;
global $product_seqprefix;
if ($this->column_fields['productcode'] == $app_strings["AUTO_GEN_CODE"] || $this->column_fields['productcode'] == '') {
$this->column_fields['productcode'] = $product_seqprefix . $this->get_next_id();
}
if (isset($_SESSION['import_overwrite2']) && $_SESSION['import_overwrite2'] == 1) {
if (!empty($this->column_fields['productcode'])) {
$where_clause = " and ec_products.productcode='" . trim($this->column_fields['productcode']) . "' ";
$query = "SELECT ec_products.productid FROM ec_products where ec_products.deleted=0 {$where_clause}";
$result =& $this->db->query($query, false, "Retrieving record {$where_clause}");
if ($this->db->getRowCount($result) >= 1) {
/*$productid = $this->db->query_result($result,0,"productid");
$this->id = $productid;
$this->mode = 'edit';
CRMEntity::save($module);*/
} else {
$this->id = "";
$this->mode = '';
CRMEntity::save($module);
}
}
} else {
$this->id = "";
$this->mode = '';
CRMEntity::save($module);
}
$this->ClearColumnFields();
}
示例2: save
function save($module)
{
$this->id = "";
$this->mode = '';
CRMEntity::save($module);
}
示例3: save
function save($module)
{
global $adb;
if ($this->mode == 'edit') {
$rs = $adb->pquery('select sales_stage from vtiger_potential where potentialid = ?', array($this->id));
$this->sales_stage = $adb->query_result($rs, 0, 'sales_stage');
}
parent::save($module);
}