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


PHP QQN::GroupRole方法代码示例

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


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

示例1: SetupPanel

 protected function SetupPanel()
 {
     if (!$this->objGroup->IsLoginCanEdit(QApplication::$Login)) {
         $this->ReturnTo('/groups/');
     }
     // See if Group can have Explicitly Defined Participants
     if (!$this->objGroup->IsGroupCanHaveExplicitlyDefinedParticipants()) {
         return $this->ReturnTo('#' . $this->objGroup->Id);
     }
     $this->pnlPerson = new SelectPersonPanel($this);
     $this->pnlPerson->Name = 'Participant';
     $this->pnlPerson->AllowCreate = true;
     $this->pnlPerson->Required = true;
     $this->lstRole = new QListBox($this);
     $this->lstRole->Name = 'Role';
     $this->lstRole->Required = true;
     $this->lstRole->AddItem('- Select One -');
     foreach ($this->objGroup->Ministry->GetGroupRoleArray(QQ::OrderBy(QQN::GroupRole()->Name)) as $objGroupRole) {
         $this->lstRole->AddItem($objGroupRole->Name, $objGroupRole->Id);
     }
     $this->dtxDateStart = new QDateTimeTextBox($this);
     $this->dtxDateStart->Name = 'Participation Started';
     $this->dtxDateStart->Required = true;
     $this->calDateStart = new QCalendar($this, $this->dtxDateStart);
     $this->dtxDateEnd = new QDateTimeTextBox($this);
     $this->dtxDateEnd->Name = 'Participation Ended';
     $this->calDateEnd = new QCalendar($this, $this->dtxDateEnd);
     $this->dtxDateStart->RemoveAllActions(QClickEvent::EventName);
     $this->dtxDateEnd->RemoveAllActions(QClickEvent::EventName);
     $this->pnlPerson->txtName->Focus();
 }
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:CpGroup_AddParticipation.class.php

示例2: RefreshParticipationList

 public function RefreshParticipationList()
 {
     $fltStartTime = microtime(true);
     $objGroupRole = GroupRole::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::GroupRole()->MinistryId, $this->Group->MinistryId), QQ::Equal(QQN::GroupRole()->GroupRoleTypeId, GroupRoleType::Participant)), QQ::OrderBy(QQN::GroupRole()->Id));
     if (!$objGroupRole) {
         $objGroupRole = new GroupRole();
         $objGroupRole->MinistryId = $this->Group->MinistryId;
         $objGroupRole->Name = 'Participant';
         $objGroupRole->GroupRoleTypeId = GroupRoleType::Participant;
         $objGroupRole->Save();
     }
     $this->Group->DeleteAllGroupParticipations();
     $objPersonCursor = $this->SearchQuery->Execute();
     while ($objPerson = Person::InstantiateCursor($objPersonCursor)) {
         $this->Group->AddPerson($objPerson, $objGroupRole->Id);
     }
     $fltEndTime = microtime(true);
     $this->dttDateRefreshed = QDateTime::Now();
     $this->ProcessTimeMs = round(($fltEndTime - $fltStartTime) * 1000);
     $this->Save();
 }
开发者ID:alcf,项目名称:chms,代码行数:21,代码来源:SmartGroup.class.php

示例3: dlgEdit_Setup

 public function dlgEdit_Setup()
 {
     $this->dlgEdit = new QDialogBox($this->pnlContent);
     $this->dlgEdit->Template = dirname(__FILE__) . '/EditGroupParticipationDialog.tpl.php';
     $this->dlgEdit->CssClass = 'dialogbox';
     $this->dlgEdit->MatteClickable = false;
     $this->dlgEdit->HideDialogBox();
     $this->lstEditRole = new QListBox($this->dlgEdit);
     $this->lstEditRole->Name = 'Role';
     $this->lstEditRole->Required = true;
     $this->lstEditRole->Enabled = true;
     $this->lstEditRole->AddItem('- Select One -');
     foreach ($this->pnlContent->objGroup->Ministry->GetGroupRoleArray(QQ::OrderBy(QQN::GroupRole()->Name)) as $objGroupRole) {
         $this->lstEditRole->AddItem($objGroupRole->Name, $objGroupRole->Id);
     }
     $this->dtxEditStart = new QDateTimeTextBox($this->dlgEdit);
     $this->dtxEditStart->Name = 'Started';
     $this->dtxEditStart->Required = true;
     $this->calEditStart = new QCalendar($this->dlgEdit, $this->dtxEditStart);
     $this->dtxEditEnd = new QDateTimeTextBox($this->dlgEdit);
     $this->dtxEditEnd->Name = 'Ended';
     $this->calEditEnd = new QCalendar($this->dlgEdit, $this->dtxEditEnd);
     $this->dtxEditStart->RemoveAllActions(QClickEvent::EventName);
     $this->dtxEditEnd->RemoveAllActions(QClickEvent::EventName);
     $this->btnEditOkay = new QButton($this->dlgEdit);
     $this->btnEditOkay->Text = 'Ok';
     $this->btnEditOkay->CausesValidation = QCausesValidation::SiblingsAndChildren;
     $this->btnEditOkay->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'btnEditOkay_Click'));
     $this->btnEditOkay->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnEditCancel = new QLinkButton($this->dlgEdit);
     $this->btnEditCancel->Text = 'Cancel';
     $this->btnEditCancel->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'btnEditCancel_Click'));
     $this->btnEditCancel->AddAction(new QClickEvent(), new QTerminateAction());
     $this->btnEditDelete = new QLinkButton($this->dlgEdit);
     $this->btnEditDelete->Text = 'Delete';
     $this->btnEditDelete->SetCustomStyle('margin-left', '0');
     $this->btnEditDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'btnEditDelete_Click'));
     $this->btnEditDelete->AddAction(new QClickEvent(), new QTerminateAction());
 }
开发者ID:alcf,项目名称:chms,代码行数:39,代码来源:EditGroupParticipationDelegate.class.php

示例4: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a GroupRole-based QQNode.
  * It will also verify that it is a proper GroupRole-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'group_role') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "group_role".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::GroupRole()->Id;
                 case 'MinistryId':
                     return QQN::GroupRole()->MinistryId;
                 case 'Ministry':
                     return QQN::GroupRole()->Ministry;
                 case 'Name':
                     return QQN::GroupRole()->Name;
                 case 'GroupRoleTypeId':
                     return QQN::GroupRole()->GroupRoleTypeId;
                 default:
                     throw new QCallerException('Simple Property not found in GroupRoleDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:57,代码来源:GroupRoleDataGridGen.class.php

示例5: Form_Create

 protected function Form_Create()
 {
     $this->objGroupRegistration = new GroupRegistrations();
     $this->mcGroupRegistration = new GroupRegistrationsMetaControl($this, $this->objGroupRegistration);
     $this->txtFirstName = $this->mcGroupRegistration->txtFirstName_Create();
     $this->txtFirstName->Select();
     $this->txtFirstName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtFirstName->Required = true;
     $this->txtLastName = $this->mcGroupRegistration->txtLastName_Create();
     $this->txtLastName->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtLastName->Required = true;
     $this->lstGender = new QListBox($this);
     $this->lstGender->Name = 'Gender';
     $this->lstGender->AddItem('- Select One -');
     $this->lstGender->AddItem('Female', 'F');
     $this->lstGender->AddItem('Male', 'M');
     $this->txtAddress = $this->mcGroupRegistration->txtAddress_Create();
     $this->txtAddress->Name = 'Address';
     $this->txtAddress->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtAddress->Required = true;
     $this->txtCity = $this->mcGroupRegistration->txtCity_Create();
     $this->txtCity->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtCity->Required = true;
     $this->txtZipCode = $this->mcGroupRegistration->txtZipcode_Create();
     $this->txtZipCode->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtZipCode->Required = true;
     $this->txtPhoneNumber = $this->mcGroupRegistration->txtPhone_Create();
     $this->txtPhoneNumber->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtPhoneNumber->Required = true;
     $this->txtEmail = $this->mcGroupRegistration->txtEmail_Create();
     $this->txtEmail->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtEmail->Required = true;
     $this->txtComments = $this->mcGroupRegistration->txtComments_Create();
     $this->txtComments->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->lstSource = new QListBox($this);
     $this->lstSource->Name = 'How did you hear about us? ';
     $this->lstSource->Width = 250;
     $this->lstSource->AddItem('Choose...', 0);
     foreach (SourceList::LoadAll() as $objSourceList) {
         $this->lstSource->AddItem($objSourceList->Name, $objSourceList->Id);
     }
     $this->lstParticipationType = new QListBox($this);
     $this->lstParticipationType->Name = 'What would you like to be?';
     $objRoleArray = Ministry::Load(17)->GetGroupRoleArray(QQ::OrderBy(QQN::GroupRole()->Name));
     $this->lstParticipationType->AddItem('-Select One-');
     foreach ($objRoleArray as $objRole) {
         $this->lstParticipationType->AddItem($objRole->Name, $objRole->Id);
     }
     $this->lstParticipationType->AddAction(new QChangeEvent(), new QAjaxAction('lstParticipationType_Change'));
     $this->lblMessage = new QLabel($this);
     $this->lblMessage->Text = '';
     $this->lblMessage->ForeColor = 'red';
     $this->lblMessage->HtmlEntities = false;
     $this->chkDaysAvailable = array();
     foreach (GrowthGroupDayType::$NameArray as $key => $value) {
         $objChkDay = new QCheckBox($this);
         $objChkDay->Text = $value;
         $objChkDay->Name = $key;
         $this->chkDaysAvailable[] = $objChkDay;
     }
     $this->chkGroupType = array();
     $objCondition = QQ::All();
     $objGrowthGroupStructureCursor = GrowthGroupStructure::QueryCursor($objCondition);
     while ($objGrowthGroupStructure = GrowthGroupStructure::InstantiateCursor($objGrowthGroupStructureCursor)) {
         $objListItem = new QCheckBox($this);
         $objListItem->Text = $objGrowthGroupStructure->__toString();
         $objListItem->Name = $objGrowthGroupStructure->Id;
         $this->chkGroupType[] = $objListItem;
     }
     $this->lstLocationFirst = new QListBox($this);
     $this->lstLocationFirst->Name = 'First Preference';
     $this->lstLocationFirst->AddItem('Belmont');
     $this->lstLocationFirst->AddItem('East Palo Alto');
     $this->lstLocationFirst->AddItem('Fremont');
     $this->lstLocationFirst->AddItem('Los Altos');
     $this->lstLocationFirst->AddItem('Milpitas');
     $this->lstLocationFirst->AddItem('Mountain View');
     $this->lstLocationFirst->AddItem('Newark ');
     $this->lstLocationFirst->AddItem('Oakland');
     $this->lstLocationFirst->AddItem('Palo Alto');
     $this->lstLocationFirst->AddItem('San Francisco');
     $this->lstLocationFirst->AddItem('San Jose');
     $this->lstLocationFirst->AddItem('Santa Clara');
     $this->lstLocationFirst->AddItem('South San Jose');
     $this->lstLocationFirst->AddItem('Sunnyvale');
     $this->lstLocationSecond = new QListBox($this);
     $this->lstLocationSecond->Name = 'Second Preference';
     $this->lstLocationSecond->AddItem('Belmont');
     $this->lstLocationSecond->AddItem('East Palo Alto');
     $this->lstLocationSecond->AddItem('Fremont');
     $this->lstLocationSecond->AddItem('Los Altos');
     $this->lstLocationSecond->AddItem('Milpitas');
     $this->lstLocationSecond->AddItem('Mountain View');
     $this->lstLocationSecond->AddItem('Newark ');
     $this->lstLocationSecond->AddItem('Oakland');
     $this->lstLocationSecond->AddItem('Palo Alto');
     $this->lstLocationSecond->AddItem('San Francisco');
     $this->lstLocationSecond->AddItem('San Jose');
     $this->lstLocationSecond->AddItem('Santa Clara');
     $this->lstLocationSecond->AddItem('South San Jose');
//.........这里部分代码省略.........
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:register.php

示例6: CountByGroupRoleTypeId

 /**
  * Count GroupRoles
  * by GroupRoleTypeId Index(es)
  * @param integer $intGroupRoleTypeId
  * @return int
  */
 public static function CountByGroupRoleTypeId($intGroupRoleTypeId, $objOptionalClauses = null)
 {
     // Call GroupRole::QueryCount to perform the CountByGroupRoleTypeId query
     return GroupRole::QueryCount(QQ::Equal(QQN::GroupRole()->GroupRoleTypeId, $intGroupRoleTypeId), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:GroupRoleGen.class.php

示例7: dtgRoles_Bind

 public function dtgRoles_Bind()
 {
     $this->dtgRoles->DataSource = $this->objMinistry->GetGroupRoleArray(QQ::OrderBy(QQN::GroupRole()->Name));
 }
开发者ID:alcf,项目名称:chms,代码行数:4,代码来源:roles.php


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