當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CTask::removeAssigned方法代碼示例

本文整理匯總了PHP中CTask::removeAssigned方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTask::removeAssigned方法的具體用法?PHP CTask::removeAssigned怎麽用?PHP CTask::removeAssigned使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CTask的用法示例。


在下文中一共展示了CTask::removeAssigned方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 if (!$obj->bind($_POST)) {
     $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
     $AppUI->redirect();
 }
 if ($rm && $del) {
     $overAssignment = $obj->updateAssigned($hassign, $hperc_assign_ar, true, true);
     if ($overAssignment) {
         $AppUI->setMsg('Some Users could not be unassigned from Task', UI_MSG_ERROR);
     } else {
         // Don't do anything because we might have other tasks to change
         // $AppUI->setMsg('User(s) unassigned from Task', UI_MSG_OK);
         // $AppUI->redirect();
     }
 } else {
     if ($rm || $del) {
         if ($msg = $obj->removeAssigned($user_id)) {
             $AppUI->setMsg($msg, UI_MSG_ERROR);
         } else {
             $AppUI->setMsg('User unassigned from Task', UI_MSG_OK);
         }
     }
 }
 if (isset($hassign) && !$del == 1) {
     $overAssignment = $obj->updateAssigned($hassign, $hperc_assign_ar, false, false);
     //check if OverAssignment occured, database has not been updated in this case
     if ($overAssignment) {
         $AppUI->setMsg('The following Users have not been assigned in order to prevent' . ' from Over-Assignment:', UI_MSG_ERROR);
         $AppUI->setMsg('<br />' . $overAssignment, UI_MSG_ERROR, true);
     } else {
         $AppUI->setMsg('User(s) assigned to Task', UI_MSG_OK);
     }
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:do_task_assign_aed.php

示例2: CTask

     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->updateAssigned($bulk_task_assign, $hperc_assign_ar, false, false);
     }
     //$upd_task->updateAssigned($bulk_task_assign,array($bulk_task_assign=>$bulk_task_assign_perc),false,false);
     if ($upd_task->task_project && $upd_task->task_id && $upd_task->task_notify) {
         $upd_task->notify();
     }
 }
 //Action: Unassign User
 if (isset($_POST['bulk_task_unassign']) && $bulk_task_unassign != '') {
     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->removeAssigned($bulk_task_unassign);
     }
 }
 // Action: Allow user to add task logs for others
 if (isset($_POST['bulk_task_allow_other_user_tasklogs']) && $bulk_task_allow_other_user_tasklogs != '') {
     $upd_task = new CTask();
     $upd_task->load($key);
     if ($upd_task->task_id) {
         $upd_task->task_allow_other_user_tasklogs = $bulk_task_allow_other_user_tasklogs;
         $result = $upd_task->store($AppUI);
         if (is_array($result)) {
             break;
         }
     }
 }
 //Action: Other Actions
開發者ID:eureka2,項目名稱:web2project,代碼行數:31,代碼來源:do_task_bulk_aed.php


注:本文中的CTask::removeAssigned方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。