本文整理汇总了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']));
示例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, '');