本文整理汇总了PHP中Cliente::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Cliente::delete方法的具体用法?PHP Cliente::delete怎么用?PHP Cliente::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cliente
的用法示例。
在下文中一共展示了Cliente::delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Cliente
case 'newClient':
$view->client = new Cliente();
$view->label = 'Nuevo RFI';
$view->disableLayout = true;
$view->contentTemplate = "templates/clientForm.php";
// seteo el template que se va a mostrar
break;
case 'editClient':
$editId = intval($_POST['id']);
$view->label = 'Editar RFI';
$view->client = new Cliente($editId);
$view->disableLayout = true;
$view->contentTemplate = "templates/clientForm.php";
// seteo el template que se va a mostrar
break;
case 'deleteClient':
$id = intval($_POST['id']);
$client = new Cliente($id);
$client->delete();
die;
// no quiero mostrar nada cuando borra , solo devuelve el control.
break;
default:
}
// si esta deshabilitado el layout solo imprime el template
if ($view->disableLayout == true) {
include_once $view->contentTemplate;
} else {
include_once 'templates/layout.php';
}
// el layout incluye el template adentro
示例2: eliminar
public function eliminar($clienteId)
{
$this->load->model(array('Cliente'));
$cliente = new Cliente($clienteId);
echo json_encode(array("success" => $cliente->delete()));
}
示例3: Delete
function Delete($param)
{
// obtém o parâmetro $key
$key = $param['key'];
// inicia transação com o banco 'pg_livro'
TTransaction::open('pg_livro');
// instancia objeto Cliente
$cliente = new Cliente($key);
// deleta objeto do banco de dados
$cliente->delete();
// finaliza a transação
TTransaction::close();
// recarrega a datagrid
$this->onReload();
// exibe mensagem de sucesso
new TMessage('info', "Registro excluído com sucesso");
}
示例4: Delete
/**
* method Delete()
* Delete a record
*/
function Delete($param)
{
try {
// get the parameter $key
$key = $param['key'];
// open a transaction with database 'samples'
TTransaction::open('db_crmbf');
// instantiates object Customer
$customer = new Cliente($key);
// deletes the object from the database
$customer->delete();
// close the transaction
TTransaction::close();
// reload the listing
$this->onReload($param);
// shows the success message
new TMessage('info', "Registro Deletado");
} catch (Exception $e) {
// shows the exception error message
new TMessage('error', '<b>Error</b> ' . $e->getMessage());
// undo all pending operations
TTransaction::rollback();
}
}
示例5: Rol
$rol = new Rol();
if ($_GET['op']=='insert') {
$cliente->setIdDoc($_POST['id_doc']);
$cliente->setDoc($_POST['doc']);
$cliente->setNom($_POST['nom']);
$cliente->setApe($_POST['ape']);
$cliente->setDir($_POST['dir']);
$cliente->setIdCiu($_POST['id_ciu']);
$cliente->setIdDep($_POST['id_dep']);
$cliente->setTel($_POST['tel']);
$cliente->insert();
}
if ($_GET['op']=='delete') {
$cliente->delete($_GET['id']);
}
if ($_GET['op']=='ord') {
$cliente->setOrder(" ORDER BY ".$_GET['by']);
$_SESSION['orden'] = " ORDER BY ".$_GET['by'];
}
$show=$_SESSION['show'];
$regs = $cliente->countRegs();
if (!isset($_GET['index'])) {
$_GET['index']=0;
} else {
$cliente->setOrder($_SESSION['orden']);
}