當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。