当前位置: 首页>>代码示例>>PHP>>正文


PHP Cliente::delete方法代码示例

本文整理汇总了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
开发者ID:felipebarraza6,项目名称:dptosistemas_morchile,代码行数:31,代码来源:index.php

示例2: eliminar

 public function eliminar($clienteId)
 {
     $this->load->model(array('Cliente'));
     $cliente = new Cliente($clienteId);
     echo json_encode(array("success" => $cliente->delete()));
 }
开发者ID:Caesaroh,项目名称:Revista,代码行数:6,代码来源:Clientes.php

示例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");
 }
开发者ID:ricardohenriq,项目名称:learn-php,代码行数:17,代码来源:ClientesList.class.php

示例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();
     }
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:28,代码来源:ClienteList.class.php

示例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']);
	}
开发者ID:pedrubiano,项目名称:pos,代码行数:30,代码来源:cliente.php


注:本文中的Cliente::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。