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


PHP Application_Model_DbTable_DbGlobal::getSettingById方法代码示例

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


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

示例1: addAction

 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $add_product = new Product_Model_DbTable_DbAddProduct();
             $post = $this->getRequest()->getPost();
             $add_product->addProduct($post);
             //
             Application_Form_FrmMessage::message("INSERT_SUCCESS");
             if (@$post['Save'] != "") {
                 Application_Form_FrmMessage::redirectUrl('/product/index/index');
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::messageError("INSERT_ERROR", $err = $e->getMessage());
         }
     }
     $formProduct = new Application_Form_FrmProduct(null);
     $formStockAdd = $formProduct->AddProductForm(null);
     Application_Model_Decorator::removeAllDecorator($formStockAdd);
     $this->view->form = $formStockAdd;
     //control
     $formAddProdcut = new Application_Form_FrmAction(null);
     $FrmAdd = $formAddProdcut->AllAction(null);
     Application_Model_Decorator::removeAllDecorator($FrmAdd);
     $this->view->control = $FrmAdd;
     ///view on select form
     $items = new Application_Model_GlobalClass();
     $locationRows = $items->getLocationOption();
     $this->view->locations = $locationRows;
     //for add location
     $formpopup = new Application_Form_FrmPopup(null);
     $formAdd = $formpopup->popuLocation(null);
     Application_Model_Decorator::removeAllDecorator($formAdd);
     $this->view->form_addstock = $formAdd;
     $form_branch = $formpopup->popupBranch(null);
     Application_Model_Decorator::removeAllDecorator($form_branch);
     $this->view->form_brand = $form_branch;
     $form_measure = $formpopup->popuMeasure(null);
     Application_Model_Decorator::removeAllDecorator($form_measure);
     $this->view->form_measure = $form_measure;
     $form_category = $formpopup->popupCategory(null);
     Application_Model_Decorator::removeAllDecorator($form_category);
     $this->view->form_category = $form_category;
     $db = new Application_Model_DbTable_DbGlobal();
     $row = $db->getSettingById(12);
     $this->view->setpricebybranch = $row['key_value'];
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:47,代码来源:IndexController.php

示例2: updatePurchaseOrderAction

 public function updatePurchaseOrderAction()
 {
     $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
     $db_global = new Application_Model_DbTable_DbGlobal();
     $sql = "SELECT * FROM tb_purchase_order WHERE order_id =" . $id;
     $rs = $db_global->getGlobalDbRow($sql);
     //print_r($rs);exit();
     if ($rs["status"] == 4 or $rs["status"] == 5) {
         $db = new Application_Model_DbTable_DbGlobal();
         $row = $db->getSettingById(15);
         if ($row['key_value'] == 0) {
             Application_Form_FrmMessage::message("You don't have permission to update purchase that recieved already");
             Application_Form_FrmMessage::redirectUrl("/purchase/index/index");
         } else {
             $this->ActionPurchaseAction();
         }
     } else {
         $this->ActionPurchaseAction();
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:20,代码来源:IndexController.php


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