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


PHP Default_Model_Users::getAllActiveUsersByBU方法代码示例

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


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

示例1: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $sess_vals = $auth->getStorage()->read();
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $messages['message'] = '';
     $id = $this->getRequest()->getParam('id', null);
     $projectsModel = new Default_Model_Createprojects();
     $requi_model = new Default_Model_Requisition();
     $usersModel = new Default_Model_Users();
     $where = "";
     $actionflag = 1;
     $form = new Default_Form_createprojects();
     $form->setAttrib('action', DOMAIN . 'createprojects/edit/id/' . $id);
     $this->view->business_units_list = $requi_model->getBusinessUnits();
     try {
         if ($id > 0 && is_numeric($id)) {
             //update code
             $where = "";
             $actionflag = 2;
             $id = abs($id);
             $projectdata = $projectsModel->getProjectDataByID($id);
             $form->submit->setLabel('Update Project');
             $this->view->loginuserGroup = $loginuserGroup;
             $this->view->form = $form;
             $this->view->isEdit = "1";
             $this->view->data = $projectdata;
             $this->view->BUUsers = $usersModel->getAllActiveUsersByBU($projectdata['businessunit']);
             $this->view->TrackingCodes = $projectsModel->getTrackingCodesByCategory($projectdata['category']);
             if ($this->getRequest()->getPost()) {
                 $trDb = Zend_Db_Table::getDefaultAdapter();
                 // starting transaction
                 $trDb->beginTransaction();
                 try {
                     $bFlag = true;
                     //$tprojectCategory = $this->_getParam('projectCategory', null);
                     $tprojectCategory = PROJECTCATEGORYID;
                     $tProjectName = $this->_getParam('ProjectName', null);
                     $tProjectDescription = $this->_getParam('ProjectDescription', null);
                     $tprojectStatus = $this->_getParam('projectStatus', null);
                     $tprojectBU = $this->_getParam('projectBU', null);
                     $tprojectPrimaryLead = $this->_getParam('projectPrimaryLead', null);
                     $tprojectSecondaryLead = $this->_getParam('projectSecondaryLead', null);
                     $tprojectEffort = $this->_getParam('ProjectEffort', null);
                     $tprojectStartDate = $this->_getParam('projectStartDate', null);
                     $tprojectEndDate = $this->_getParam('projectEndDate', null);
                     $tprojectStartDate1 = sapp_Global::change_date(trim($tprojectStartDate), 'database');
                     $tprojectEndDate1 = sapp_Global::change_date(trim($tprojectEndDate), 'database');
                     $tprojectStartDate2 = sapp_Global::change_date(trim($projectdata['startdate']), 'database');
                     $tprojectEndDate2 = sapp_Global::change_date(trim($projectdata['enddate']), 'database');
                     //get tracking codes for edits
                     $ttrackingcodestartdate = $this->_getParam('trackingcodestartdate', null);
                     $ttrackingcodeenddate = $this->_getParam('trackingcodeenddate', null);
                     $ttrackingcodeeffort = $this->_getParam('trackingcodeeffort', null);
                     if ($tprojectStartDate2 != $tprojectStartDate1 && ($ttrackingcodestartdate <= 0 || $ttrackingcodestartdate == '')) {
                         //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Start Date."));
                         $validationMsg['message'] = 'Tracking code due to change in Project Planned Start Date.';
                         $validationMsg['msgtype'] = 'error';
                         $this->view->validationMsg = $validationMsg;
                         $bFlag = false;
                     } else {
                         if ($tprojectEndDate2 != $tprojectEndDate1 && ($ttrackingcodeenddate <= 0 || $ttrackingcodeenddate == '')) {
                             //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned End Date."));
                             $validationMsg['message'] = 'Tracking code due to change in Project Planned End Date.';
                             $validationMsg['msgtype'] = 'error';
                             $this->view->validationMsg = $validationMsg;
                             $bFlag = false;
                         } else {
                             if ($projectdata['effort'] != $tprojectEffort && ($ttrackingcodeeffort <= 0 || $ttrackingcodeeffort == '')) {
                                 //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Effort."));
                                 $validationMsg['message'] = 'Tracking code due to change in Project Planned Effort.';
                                 $validationMsg['msgtype'] = 'error';
                                 $this->view->validationMsg = $validationMsg;
                                 $bFlag = false;
                             } else {
                                 if (strlen(trim($tProjectName)) <= 0) {
                                     $validationMsg['message'] = 'Project name cannot be empty.';
                                     $validationMsg['msgtype'] = 'error';
                                     $this->view->validationMsg = $validationMsg;
                                     $bFlag = false;
                                 } else {
                                     if (strlen(trim($tProjectDescription)) <= 0) {
                                         $validationMsg['message'] = 'Project description cannot be empty.';
                                         $validationMsg['msgtype'] = 'error';
                                         $this->view->validationMsg = $validationMsg;
                                         $bFlag = false;
                                     } else {
                                         if (strlen(trim($tprojectStartDate)) <= 0) {
                                             $validationMsg['message'] = 'Project planned start date cannot be empty.';
                                             $validationMsg['msgtype'] = 'error';
                                             $this->view->validationMsg = $validationMsg;
                                             $bFlag = false;
                                         } else {
                                             if (strlen(trim($tprojectEndDate)) <= 0) {
                                                 $validationMsg['message'] = 'Project planned end date cannot be empty.';
                                                 $validationMsg['msgtype'] = 'error';
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:CreateprojectsController.php

示例2: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $sess_vals = $auth->getStorage()->read();
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $messages['message'] = '';
     $id = $this->getRequest()->getParam('id', null);
     $taskModel = new Default_Model_Createtasks();
     $currprojectsModel = new Default_Model_Createprojects();
     $activityModel = new Default_Model_Createactivities();
     $requi_model = new Default_Model_Requisition();
     $usersModel = new Default_Model_Users();
     $currentUserSummary = $usersModel->getEmployeeSummaryByID($loginUserId);
     $taskAllocationModel = new Default_Model_Tasksallocation();
     $where = "";
     $actionflag = 1;
     $form = new Default_Form_createprojects();
     $form->setAttrib('action', DOMAIN . 'createtasks/edit/id/' . $id);
     //$this->view->activeprojects = $taskModel->getActiveProjects();
     $this->view->activeprojects = $taskAllocationModel->getActiveProjectsForTasksForUser($currentUserSummary['businessunit_id'], $loginUserId, $loginuserGroup);
     $this->view->projectCategories = $taskModel->getProjectCategories();
     $this->view->business_units_list = $requi_model->getBusinessUnits();
     $this->view->allusers = array();
     //$this->view->allusers = $usersModel->getAllActiveUsers();
     try {
         if ($id > 0 && is_numeric($id)) {
             //update code
             $where = "";
             $actionflag = 2;
             $id = abs($id);
             $taskdata = $taskModel->getTaskDataByID($id);
             $Currprojectdata = $currprojectsModel->getProjectDataByID($taskdata['projectid']);
             $form->submit->setLabel('Update Task');
             $this->view->taskpagerefresh = '0';
             $this->view->TaskID = $id;
             $this->view->loginuserGroup = $loginuserGroup;
             $this->view->form = $form;
             $this->view->isEdit = "1";
             $this->view->data = $taskdata;
             $this->view->BUUsers = $usersModel->getAllActiveUsersByBU($Currprojectdata['businessunit']);
             $this->view->TrackingCodes = $currprojectsModel->getTrackingCodesByCategory($Currprojectdata['category']);
             if ($this->getRequest()->getPost()) {
                 $trDb = Zend_Db_Table::getDefaultAdapter();
                 // starting transaction
                 $trDb->beginTransaction();
                 try {
                     $bFlag = true;
                     //Task Details
                     $tprojectSelected = $this->_getParam('projectSelected', null);
                     $ttaskName = $this->_getParam('taskName', null);
                     $ttaskDescription = $this->_getParam('taskDescription', null);
                     $ttaskStartDate = $this->_getParam('taskStartDate', null);
                     $ttaskEndDate = $this->_getParam('taskEndDate', null);
                     $ttaskStatus = $this->_getParam('taskStatus', null);
                     $ttaskPrimaryLead = $this->_getParam('taskPrimaryLead', null);
                     $ttaskSecondaryLead = $this->_getParam('taskSecondaryLead', null);
                     $ttaskEffort = $this->_getParam('taskEffort', null);
                     //Task Activity Details
                     $tprjactivitytaskid = $this->_getParam('prjactivitytaskid', null);
                     $tprjactivityid = $this->_getParam('prjactivityid', null);
                     $tprjactivitysdate = $this->_getParam('prjactivitysdate', null);
                     $tprjactivityedate = $this->_getParam('prjactivityedate', null);
                     $tprjactivityeffort = $this->_getParam('prjactivityeffort', null);
                     $tprojectStartDate1 = sapp_Global::change_date(trim($ttaskStartDate), 'database');
                     $tprojectEndDate1 = sapp_Global::change_date(trim($ttaskEndDate), 'database');
                     $tprojectStartDate2 = sapp_Global::change_date(trim($taskdata['startdate']), 'database');
                     $tprojectEndDate2 = sapp_Global::change_date(trim($taskdata['enddate']), 'database');
                     //get tracking codes for edits
                     $ttrackingcodestartdate = $this->_getParam('trackingcodestartdate', null);
                     $ttrackingcodeenddate = $this->_getParam('trackingcodeenddate', null);
                     $ttrackingcodeeffort = $this->_getParam('trackingcodeenddate', null);
                     $mtaskactivitytrackingdata = array('startdate' => implode(',', $ttrackingcodestartdate), 'enddate' => implode(',', $ttrackingcodeenddate), 'effort' => implode(',', $ttrackingcodeeffort));
                     $this->view->taskactivitytrackingdata = $mtaskactivitytrackingdata;
                     $this->view->taskpagerefresh = '1';
                     if ($tprojectStartDate2 != $tprojectStartDate1 && ($ttrackingcodestartdate <= 0 || $ttrackingcodestartdate == '')) {
                         //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Start Date."));
                         $validationMsg['message'] = 'Tracking code due to change in Task Planned Start Date.';
                         $validationMsg['msgtype'] = 'error';
                         $this->view->validationMsg = $validationMsg;
                         $bFlag = false;
                     } else {
                         if ($tprojectEndDate2 != $tprojectEndDate1 && ($ttrackingcodeenddate <= 0 || $ttrackingcodeenddate == '')) {
                             //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned End Date."));
                             $validationMsg['message'] = 'Tracking code due to change in Task Planned End Date.';
                             $validationMsg['msgtype'] = 'error';
                             $this->view->validationMsg = $validationMsg;
                             $bFlag = false;
                         } else {
                             if ($taskdata['effort'] != $ttaskEffort && ($ttrackingcodeeffort <= 0 || $ttrackingcodeeffort == '')) {
                                 //$this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Tracking code due to change in Project Planned Effort."));
                                 $validationMsg['message'] = 'Tracking code due to change in Task Planned Effort.';
                                 $validationMsg['msgtype'] = 'error';
                                 $this->view->validationMsg = $validationMsg;
                                 $bFlag = false;
                             } else {
                                 if ($tprojectSelected <= 0) {
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:CreatetasksController.php

示例3: editAction


//.........这里部分代码省略.........
                     $clientrecipients = $this->_getParam('clientrecipients', null);
                     $meetingtitle = $this->_getParam('meetingtitle', null);
                     $meetingnotes = $this->_getParam('meetingnotes', null);
                     $deltaOwnerResource = $this->_getParam('deltaOwnerResource', null);
                     $clientOwnerResource = $this->_getParam('clientOwnerResource', null);
                     if ($deltameetingrooms <= 0) {
                         $validationMsg['message'] = 'Please select meetingroom.';
                         $validationMsg['msgtype'] = 'error';
                         $this->view->validationMsg = $validationMsg;
                         $bFlag = false;
                     } else {
                         if (strlen(trim($meetingDate)) <= 0) {
                             $validationMsg['message'] = 'Meeting Date cannot be empty.';
                             $validationMsg['msgtype'] = 'error';
                             $this->view->validationMsg = $validationMsg;
                             $bFlag = false;
                         } else {
                             if (strlen(trim($meetingStartTime)) <= 0) {
                                 $validationMsg['message'] = 'Meeting Start Time cannot be empty.';
                                 $validationMsg['msgtype'] = 'error';
                                 $this->view->validationMsg = $validationMsg;
                                 $bFlag = false;
                             } else {
                                 if (strlen(trim($meetingEndTime)) <= 0) {
                                     $validationMsg['message'] = 'Meeting End Time cannot be empty.';
                                     $validationMsg['msgtype'] = 'error';
                                     $this->view->validationMsg = $validationMsg;
                                     $bFlag = false;
                                 } else {
                                     if (count($projectBU) <= 0) {
                                         $validationMsg['message'] = 'Please select Business Unit.';
                                         $validationMsg['msgtype'] = 'error';
                                         $this->view->validationMsg = $validationMsg;
                                         $bFlag = false;
                                     } else {
                                         if (count($buResources) <= 0) {
                                             $validationMsg['message'] = 'Please select Recipients.';
                                             $validationMsg['msgtype'] = 'error';
                                             $this->view->validationMsg = $validationMsg;
                                             $bFlag = false;
                                         } else {
                                             if (strlen(trim($meetingtitle)) <= 0) {
                                                 $validationMsg['message'] = 'Title cannot be empty.';
                                                 $validationMsg['msgtype'] = 'error';
                                                 $this->view->validationMsg = $validationMsg;
                                                 $bFlag = false;
                                             } else {
                                                 if (strlen(trim($meetingnotes)) <= 0) {
                                                     $validationMsg['message'] = 'Description cannot be empty.';
                                                     $validationMsg['msgtype'] = 'error';
                                                     $this->view->validationMsg = $validationMsg;
                                                     $bFlag = false;
                                                 } else {
                                                     if ($deltaOwnerResource <= 0) {
                                                         $validationMsg['message'] = 'Please select Delta Owner.';
                                                         $validationMsg['msgtype'] = 'error';
                                                         $this->view->validationMsg = $validationMsg;
                                                         $bFlag = false;
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                     $mpolicydata = array('roomid' => trim($deltameetingrooms), 'blockmeetingdate' => trim($meetingDate), 'blockmeetingstarttime' => sapp_Global::change_time(trim($meetingStartTime), 'database'), 'blockmeetingendtime' => sapp_Global::change_time(trim($meetingEndTime), 'database'), 'businessunit' => implode(',', $projectBU), 'createdby' => trim($loginUserId), 'title' => trim($meetingtitle), 'clientrecipients' => trim($clientrecipients), 'deltarecipients' => implode(',', $buResources), 'createddate' => gmdate("Y-m-d H:i:s"), 'description' => trim($meetingnotes), 'deltaowner' => trim($deltaOwnerResource), 'clientowner' => trim($clientOwnerResource), 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                     if ($bFlag) {
                         $Id = $meetingRoom->SaveorUpdateData($mpolicydata, $where);
                         $this->sendInvite(implode(',', $buResources), $loginUserId, trim($meetingDate), trim($meetingStartTime), trim($meetingEndTime), $Id, $meetingnotes, $meetingtitle);
                         $menuID = 99;
                         sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                         $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Project details successfully added."));
                     } else {
                         $this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Error while adding project details."));
                     }
                     $trDb->commit();
                     $this->_redirect('/meetingroomblock');
                 } catch (Exception $e) {
                     $trDb->rollBack();
                     $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Something went wrong, please try again later."));
                     $this->_redirect('/meetingroomblock');
                 }
             }
             if ($tprojectSelected > 0) {
                 $Currprojectdata = $currprojectsModel->getProjectDataByID($tprojectSelected);
                 $this->view->BUUsers = $usersModel->getAllActiveUsersByBU($Currprojectdata['businessunit']);
             }
             $form->submit->setLabel('Add Task');
             $this->view->loginuserGroup = $loginuserGroup;
             $this->view->TaskID = "0";
             $this->view->form = $form;
             $this->view->isEdit = "0";
             $this->view->data = $mpolicydata;
         }
     } catch (Exception $e) {
         $this->view->nodata = 'nodata';
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:MeetingroomblockController.php


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