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


PHP Department::remove方法代码示例

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


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

示例1: Department

 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
    return $RBAC_Response;
}
require_once 'classes/model/Department.php';
require_once 'classes/model/Users.php';
$oDpto = new Department();
if (!isset($_POST['DEP_UID'])) {
    return;
}
$ocriteria = new Criteria('workflow');
$ocriteria->addSelectColumn(DepartmentPeer::DEP_MANAGER);
$ocriteria->add(DepartmentPeer::DEP_UID, $_POST['DEP_UID']);
$oDataset = DepartmentPeer::doSelectRS($ocriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(UsersPeer::USR_REPORTS_TO, $aRow['DEP_MANAGER'], Criteria::EQUAL);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(UsersPeer::USR_REPORTS_TO, '');
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
$oCriteriaA = new Criteria('workflow');
$oCriteriaA->add(UsersPeer::DEP_UID, $_POST['DEP_UID'], Criteria::EQUAL);
$oCriteriaB = new Criteria('workflow');
$oCriteriaB->add(UsersPeer::DEP_UID, '');
BasePeer::doUpdate($oCriteriaA, $oCriteriaB, Propel::getConnection('workflow'));
$oDpto->remove(urldecode($_POST['DEP_UID']));
开发者ID:emildev35,项目名称:processmaker,代码行数:30,代码来源:departments_Delete.php

示例2: Department

         echo '{success: false}';
     }
     break;
 case 'canDeleteDepartment':
     global $RBAC;
     $aDEPTS = $RBAC->getAllUsersByDepartment();
     if (isset($aDEPTS[$_POST['dep_uid']])) {
         echo '{success: false, users: ' . $aDEPTS[$_POST['dep_uid']] . '}';
     } else {
         echo '{success: true}';
     }
     break;
 case 'deleteDepartment':
     $DEP_UID = $_POST['DEP_UID'];
     $oDept = new Department();
     $oDept->remove($DEP_UID);
     echo '{success: true}';
     break;
 case 'assignedUsers':
     $filter = isset($_POST['textFilter']) ? $_POST['textFilter'] : '';
     $dep_uid = $_REQUEST['dUID'];
     $oDept = new Department();
     $oDept->Load($dep_uid);
     $manager = $oDept->getDepManager();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_STATUS);
     $oCriteria->add(UsersPeer::DEP_UID, '');
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:departments_Ajax.php


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