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


PHP Entrepot::delete方法代码示例

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


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

示例1: testEntrepotDelete

 /**
  * testEntrepotDelete
  *
  * @param		int		$id		Id of entrepot
  * @return		void
  *
  * @depends	testEntrepotOther
  * The depends says test is run only if previous is ok
  */
 public function testEntrepotDelete($id)
 {
     global $conf, $user, $langs, $db;
     $conf = $this->savconf;
     $user = $this->savuser;
     $langs = $this->savlangs;
     $db = $this->savdb;
     $localobject = new Entrepot($this->savdb);
     $result = $localobject->fetch($id);
     $result = $localobject->delete($id);
     print __METHOD__ . " id=" . $id . " result=" . $result . "\n";
     $this->assertLessThan($result, 0);
     return $result;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:23,代码来源:EntrepotTest.php

示例2: header

            header("Location: fiche.php?id=" . $id);
            exit;
        }
        $action = 'create';
        $mesg = '<div class="error">' . $object->error . '</div>';
    } else {
        $mesg = '<div class="error">' . $langs->trans("ErrorWarehouseRefRequired") . '</div>';
        $action = "create";
        // Force retour sur page creation
    }
}
// Delete warehouse
if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->stock->supprimer) {
    $object = new Entrepot($db);
    $object->fetch($_REQUEST["id"]);
    $result = $object->delete($user);
    if ($result > 0) {
        header("Location: " . DOL_URL_ROOT . '/product/stock/liste.php');
        exit;
    } else {
        $mesg = '<div class="error">' . $object->error . '</div>';
        $action = '';
    }
}
// Modification entrepot
if ($action == 'update' && $_POST["cancel"] != $langs->trans("Cancel")) {
    $object = new Entrepot($db);
    if ($object->fetch($id)) {
        $object->libelle = $_POST["libelle"];
        $object->description = $_POST["desc"];
        $object->statut = $_POST["statut"];
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例3: Entrepot

		$_GET["action"] = 'create';
		$mesg="<div class='error'>".$entrepot->error."</div>";
	}
	else {
		$mesg="<div class='error'>".$langs->trans("ErrorWarehouseRefRequired")."</div>";
		$_GET["action"]="create";   // Force retour sur page cr�ation
	}
}

// Delete warehouse
if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->stock->supprimer)
{
	$entrepot = new Entrepot($db);
	$entrepot->fetch($_REQUEST["id"]);
	$result=$entrepot->delete($user);
	if ($result > 0)
	{
		header("Location: ".DOL_URL_ROOT.'/product/stock/liste.php');
		exit;
	}
	else
	{
		$mesg='<div class="error">'.$entrepot->error.'</div>';
		$_REQUEST['action']='';
	}
}

// Modification entrepot
if ($_POST["action"] == 'update' && $_POST["cancel"] <> $langs->trans("Cancel"))
{
开发者ID:remyyounes,项目名称:dolibarr,代码行数:30,代码来源:fiche.php


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