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


PHP Branch::delete方法代码示例

本文整理汇总了PHP中Branch::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Branch::delete方法的具体用法?PHP Branch::delete怎么用?PHP Branch::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Branch的用法示例。


在下文中一共展示了Branch::delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Branch

 if ($_POST['type'] == "option") {
     Branch::findAllOption();
 } else {
     if ($_POST['type'] == "edit") {
         try {
             $branch = new Branch($_POST['key']);
             $branch->populate();
             $branch->store();
         } catch (fExpectedException $e) {
             echo $e->printMessage();
         }
     } else {
         if ($_POST['type'] == "delete") {
             try {
                 $branch = new Branch($_POST['key']);
                 $branch->delete();
             } catch (fExpectedException $e) {
                 echo $e->printMessage();
             }
         } else {
             if ($_POST['type'] == "add") {
                 try {
                     $branch = new Branch();
                     $branch->populate();
                     $branch->store();
                     $theId = $branch->getId();
                     $ids = Inv_item::findIdUB($db);
                     foreach ($ids as $id) {
                         $stock = new Inv_stock();
                         $stock->setBranchId($theId);
                         $stock->setItemId($id);
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:Branch.php

示例2: deleteAction

 public function deleteAction()
 {
     $request = $this->getRequest();
     $id = $request->getParam('id');
     $id = $this->_helper->IdConvert->hexToStr($id);
     $model = new Branch();
     //$select = $model->delete($id);
     try {
         $select = $model->delete($id);
         $translate = new Zend_View_Helper_Translate();
         $this->_helper->messenger("success", $translate->translate('Branch was successfully deleted.'));
         $this->_helper->redirector('index');
     } catch (Logic_Branch_Exception $e) {
         $this->_helper->error(MSG_ERROR, $e);
     }
     $this->_helper->redirector('index');
 }
开发者ID:knatorski,项目名称:SMS,代码行数:17,代码来源:BranchController.php


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