コード例 #1
0
ファイル: batches.php プロジェクト: alcf/chms
 protected function Form_Create()
 {
     $this->dtgBatches = new StewardshipBatchDataGrid($this);
     $this->dtgBatches->FontSize = '10px';
     $this->dtgBatches->Paginator = new QPaginator($this->dtgBatches);
     $this->dtgBatches->MetaAddColumn('DateEntered', 'Name=Batch Label', 'Html=<?= $_FORM->RenderBatchLabel($_ITEM); ?>', 'HtmlEntities=false', 'Width=100px');
     $this->dtgBatches->MetaAddColumn('DateCredited', 'Name=Post Date', 'Html=<?= $_FORM->RenderPostDate($_ITEM); ?>', 'HtmlEntities=false', 'Width=80px');
     $this->dtgBatches->MetaAddTypeColumn('StewardshipBatchStatusTypeId', 'StewardshipBatchStatusType', 'Name=Status', 'Width=80px');
     $this->dtgBatches->MetaAddColumn('Description', 'Width=210px');
     $this->dtgBatches->MetaAddColumn('ItemCount', 'Name=Items', 'Width=40px');
     $this->dtgBatches->MetaAddColumn('ActualTotalAmount', 'Name=Total', 'Html=<?= $_FORM->FormatNumber($_ITEM->ActualTotalAmount); ?>', 'Width=85px', 'HtmlEntities=false');
     $this->dtgBatches->MetaAddColumn('ReportedTotalAmount', 'Name=Reported', 'Html=<?= $_FORM->FormatNumber($_ITEM->ReportedTotalAmount); ?>', 'Width=85px', 'HtmlEntities=false');
     $this->dtgBatches->MetaAddColumn('PostedTotalAmount', 'Name=Posted', 'Html=<?= $_FORM->FormatNumber($_ITEM->PostedTotalAmount); ?>', 'Width=85px', 'HtmlEntities=false');
     $this->dtgBatches->MetaAddColumn(QQN::StewardshipBatch()->CreatedByLogin->LastName, 'Name=Created By', 'Html=<?= ($_ITEM->CreatedByLogin->Name); ?>', 'Width=100px');
     $this->dtgBatches->SetDataBinder('dtgBatches_Bind');
     $this->dtgBatches->SortColumnIndex = 0;
     $this->dtgBatches->SortDirection = 1;
     $this->txtDescription = new QTextBox($this);
     $this->lstStatus = new QListBox($this);
     $this->lstStatus->AddItem('- View All -');
     foreach (StewardshipBatchStatusType::$NameArray as $intId => $strName) {
         $this->lstStatus->AddItem($strName, $intId);
     }
     $this->lstCreatedBy = new QListBox($this);
     $this->lstCreatedBy->AddItem('- View All -');
     foreach (Login::LoadAll(QQ::OrderBy(QQN::Login()->LastName)) as $objLogin) {
         $this->lstCreatedBy->AddItem($objLogin->Name, $objLogin->Id);
     }
     $this->txtDescription->AddAction(new QEnterKeyEvent(), new QAjaxAction('ResetFilter'));
     $this->txtDescription->AddAction(new QEnterKeyEvent(), new QTerminateAction());
     $this->txtDescription->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
     $this->lstStatus->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
     $this->lstCreatedBy->AddAction(new QChangeEvent(), new QAjaxAction('ResetFilter'));
 }
コード例 #2
0
ファイル: datagen.cli.php プロジェクト: alcf/chms
 public static function GenerateUsers()
 {
     $blnAdminGenerated = false;
     while (QDataGen::DisplayWhileTask('Generating ChMS Users', self::UserCount, false)) {
         $objLogin = new Login();
         $objLogin->RoleTypeId = $blnAdminGenerated ? QDataGen::GenerateFromArray(array_keys(RoleType::$NameArray)) : RoleType::ChMSAdministrator;
         $objLogin->FirstName = QDataGen::GenerateFirstName();
         $objLogin->LastName = QDataGen::GenerateLastName();
         if (rand(0, 1)) {
             $objLogin->MiddleInitial = chr(rand(ord('A'), ord('Z')));
         }
         $objLogin->Username = $blnAdminGenerated ? QDataGen::GenerateUsername($objLogin->FirstName, $objLogin->LastName) : 'admin';
         $objLogin->Email = QDataGen::GenerateEmail($objLogin->FirstName, $objLogin->LastName);
         $objLogin->SetPasswordCache('password');
         $objLogin->DomainActiveFlag = $blnAdminGenerated ? rand(0, 10) : true;
         $objLogin->LoginActiveFlag = $blnAdminGenerated ? rand(0, 10) : true;
         // Random Permissions
         $intPermissionBitmap = 0;
         foreach (PermissionType::$NameArray as $intId => $strName) {
             if (!rand(0, 2)) {
                 $intPermissionBitmap = $intPermissionBitmap | $intId;
             }
         }
         $objLogin->PermissionBitmap = $intPermissionBitmap;
         $objLogin->Save();
         // Associate Random Ministries
         $intMinistryCount = $blnAdminGenerated ? rand(1, 3) : 5;
         for ($i = 0; $i < $intMinistryCount; $i++) {
             $objMinistry = QDataGen::GenerateFromArray(self::$MinistryArray);
             while ($objLogin->IsMinistryAssociated($objMinistry)) {
                 $objMinistry = QDataGen::GenerateFromArray(self::$MinistryArray);
             }
             $objLogin->AssociateMinistry($objMinistry);
         }
         $blnAdminGenerated = true;
     }
     self::$UserArray = Login::LoadAll();
     foreach (self::$UserArray as $objLogin) {
         if ($objLogin->IsPermissionAllowed(PermissionType::AccessStewardship)) {
             self::$StewardshipUserArray[] = $objLogin;
         }
     }
 }
コード例 #3
0
 /**
  * Refresh this MetaControl with Data from the local StewardshipBatch object.
  * @param boolean $blnReload reload StewardshipBatch from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipBatch->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipBatch->Id;
         }
     }
     if ($this->lstStewardshipBatchStatusType) {
         $this->lstStewardshipBatchStatusType->SelectedValue = $this->objStewardshipBatch->StewardshipBatchStatusTypeId;
     }
     if ($this->lblStewardshipBatchStatusTypeId) {
         $this->lblStewardshipBatchStatusTypeId->Text = $this->objStewardshipBatch->StewardshipBatchStatusTypeId ? StewardshipBatchStatusType::$NameArray[$this->objStewardshipBatch->StewardshipBatchStatusTypeId] : null;
     }
     if ($this->calDateEntered) {
         $this->calDateEntered->DateTime = $this->objStewardshipBatch->DateEntered;
     }
     if ($this->lblDateEntered) {
         $this->lblDateEntered->Text = sprintf($this->objStewardshipBatch->DateEntered) ? $this->objStewardshipBatch->__toString($this->strDateEnteredDateTimeFormat) : null;
     }
     if ($this->calDateCredited) {
         $this->calDateCredited->DateTime = $this->objStewardshipBatch->DateCredited;
     }
     if ($this->lblDateCredited) {
         $this->lblDateCredited->Text = sprintf($this->objStewardshipBatch->DateCredited) ? $this->objStewardshipBatch->__toString($this->strDateCreditedDateTimeFormat) : null;
     }
     if ($this->txtBatchLabel) {
         $this->txtBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;
     }
     if ($this->lblBatchLabel) {
         $this->lblBatchLabel->Text = $this->objStewardshipBatch->BatchLabel;
     }
     if ($this->txtDescription) {
         $this->txtDescription->Text = $this->objStewardshipBatch->Description;
     }
     if ($this->lblDescription) {
         $this->lblDescription->Text = $this->objStewardshipBatch->Description;
     }
     if ($this->txtItemCount) {
         $this->txtItemCount->Text = $this->objStewardshipBatch->ItemCount;
     }
     if ($this->lblItemCount) {
         $this->lblItemCount->Text = $this->objStewardshipBatch->ItemCount;
     }
     if ($this->txtReportedTotalAmount) {
         $this->txtReportedTotalAmount->Text = $this->objStewardshipBatch->ReportedTotalAmount;
     }
     if ($this->lblReportedTotalAmount) {
         $this->lblReportedTotalAmount->Text = $this->objStewardshipBatch->ReportedTotalAmount;
     }
     if ($this->txtActualTotalAmount) {
         $this->txtActualTotalAmount->Text = $this->objStewardshipBatch->ActualTotalAmount;
     }
     if ($this->lblActualTotalAmount) {
         $this->lblActualTotalAmount->Text = $this->objStewardshipBatch->ActualTotalAmount;
     }
     if ($this->txtPostedTotalAmount) {
         $this->txtPostedTotalAmount->Text = $this->objStewardshipBatch->PostedTotalAmount;
     }
     if ($this->lblPostedTotalAmount) {
         $this->lblPostedTotalAmount->Text = $this->objStewardshipBatch->PostedTotalAmount;
     }
     if ($this->lstCreatedByLogin) {
         $this->lstCreatedByLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCreatedByLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCreatedByLoginArray = Login::LoadAll();
         if ($objCreatedByLoginArray) {
             foreach ($objCreatedByLoginArray as $objCreatedByLogin) {
                 $objListItem = new QListItem($objCreatedByLogin->__toString(), $objCreatedByLogin->Id);
                 if ($this->objStewardshipBatch->CreatedByLogin && $this->objStewardshipBatch->CreatedByLogin->Id == $objCreatedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedByLoginId) {
         $this->lblCreatedByLoginId->Text = $this->objStewardshipBatch->CreatedByLogin ? $this->objStewardshipBatch->CreatedByLogin->__toString() : null;
     }
     if ($this->lstPaypalBatch) {
         $this->lstPaypalBatch->RemoveAllItems();
         $this->lstPaypalBatch->AddItem(QApplication::Translate('- Select One -'), null);
         $objPaypalBatchArray = PaypalBatch::LoadAll();
         if ($objPaypalBatchArray) {
             foreach ($objPaypalBatchArray as $objPaypalBatch) {
                 $objListItem = new QListItem($objPaypalBatch->__toString(), $objPaypalBatch->Id);
                 if ($objPaypalBatch->StewardshipBatchId == $this->objStewardshipBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPaypalBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPaypalBatch) {
         $this->lblPaypalBatch->Text = $this->objStewardshipBatch->PaypalBatch ? $this->objStewardshipBatch->PaypalBatch->__toString() : null;
     }
 }
コード例 #4
0
 /**
  * Refresh this MetaControl with Data from the local StewardshipPost object.
  * @param boolean $blnReload reload StewardshipPost from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipPost->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipPost->Id;
         }
     }
     if ($this->lstStewardshipBatch) {
         $this->lstStewardshipBatch->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstStewardshipBatch->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objStewardshipBatchArray = StewardshipBatch::LoadAll();
         if ($objStewardshipBatchArray) {
             foreach ($objStewardshipBatchArray as $objStewardshipBatch) {
                 $objListItem = new QListItem($objStewardshipBatch->__toString(), $objStewardshipBatch->Id);
                 if ($this->objStewardshipPost->StewardshipBatch && $this->objStewardshipPost->StewardshipBatch->Id == $objStewardshipBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipBatchId) {
         $this->lblStewardshipBatchId->Text = $this->objStewardshipPost->StewardshipBatch ? $this->objStewardshipPost->StewardshipBatch->__toString() : null;
     }
     if ($this->txtPostNumber) {
         $this->txtPostNumber->Text = $this->objStewardshipPost->PostNumber;
     }
     if ($this->lblPostNumber) {
         $this->lblPostNumber->Text = $this->objStewardshipPost->PostNumber;
     }
     if ($this->calDatePosted) {
         $this->calDatePosted->DateTime = $this->objStewardshipPost->DatePosted;
     }
     if ($this->lblDatePosted) {
         $this->lblDatePosted->Text = sprintf($this->objStewardshipPost->DatePosted) ? $this->objStewardshipPost->__toString($this->strDatePostedDateTimeFormat) : null;
     }
     if ($this->txtTotalAmount) {
         $this->txtTotalAmount->Text = $this->objStewardshipPost->TotalAmount;
     }
     if ($this->lblTotalAmount) {
         $this->lblTotalAmount->Text = $this->objStewardshipPost->TotalAmount;
     }
     if ($this->lstCreatedByLogin) {
         $this->lstCreatedByLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCreatedByLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCreatedByLoginArray = Login::LoadAll();
         if ($objCreatedByLoginArray) {
             foreach ($objCreatedByLoginArray as $objCreatedByLogin) {
                 $objListItem = new QListItem($objCreatedByLogin->__toString(), $objCreatedByLogin->Id);
                 if ($this->objStewardshipPost->CreatedByLogin && $this->objStewardshipPost->CreatedByLogin->Id == $objCreatedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedByLoginId) {
         $this->lblCreatedByLoginId->Text = $this->objStewardshipPost->CreatedByLogin ? $this->objStewardshipPost->CreatedByLogin->__toString() : null;
     }
 }
コード例 #5
0
 protected function lstLogin_Create()
 {
     $this->lstLogin = new QListBox($this);
     $this->lstLogin->Name = QApplication::Translate('Login');
     $this->lstLogin->AddItem(QApplication::Translate('- Select One -'), null);
     $objLoginArray = Login::LoadAll();
     if ($objLoginArray) {
         foreach ($objLoginArray as $objLogin) {
             $objListItem = new QListItem($objLogin->__toString(), $objLogin->Id);
             if ($objLogin->PersonId == $this->objPerson->Id) {
                 $objListItem->Selected = true;
             }
             $this->lstLogin->AddItem($objListItem);
         }
     }
     // Because Login's Login is not null, if a value is already selected, it cannot be changed.
     if ($this->lstLogin->SelectedValue) {
         $this->lstLogin->Enabled = false;
     }
 }
コード例 #6
0
 /**
  * Refresh this MetaControl with Data from the local ClassInstructor object.
  * @param boolean $blnReload reload ClassInstructor from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objClassInstructor->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objClassInstructor->Id;
         }
     }
     if ($this->txtDisplayName) {
         $this->txtDisplayName->Text = $this->objClassInstructor->DisplayName;
     }
     if ($this->lblDisplayName) {
         $this->lblDisplayName->Text = $this->objClassInstructor->DisplayName;
     }
     if ($this->lstLogin) {
         $this->lstLogin->RemoveAllItems();
         $this->lstLogin->AddItem(QApplication::Translate('- Select One -'), null);
         $objLoginArray = Login::LoadAll();
         if ($objLoginArray) {
             foreach ($objLoginArray as $objLogin) {
                 $objListItem = new QListItem($objLogin->__toString(), $objLogin->Id);
                 if ($this->objClassInstructor->Login && $this->objClassInstructor->Login->Id == $objLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblLoginId) {
         $this->lblLoginId->Text = $this->objClassInstructor->Login ? $this->objClassInstructor->Login->__toString() : null;
     }
 }
コード例 #7
0
 /**
  * Refresh this MetaControl with Data from the local EmailMessageRoute object.
  * @param boolean $blnReload reload EmailMessageRoute from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objEmailMessageRoute->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objEmailMessageRoute->Id;
         }
     }
     if ($this->lstEmailMessage) {
         $this->lstEmailMessage->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstEmailMessage->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objEmailMessageArray = EmailMessage::LoadAll();
         if ($objEmailMessageArray) {
             foreach ($objEmailMessageArray as $objEmailMessage) {
                 $objListItem = new QListItem($objEmailMessage->__toString(), $objEmailMessage->Id);
                 if ($this->objEmailMessageRoute->EmailMessage && $this->objEmailMessageRoute->EmailMessage->Id == $objEmailMessage->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstEmailMessage->AddItem($objListItem);
             }
         }
     }
     if ($this->lblEmailMessageId) {
         $this->lblEmailMessageId->Text = $this->objEmailMessageRoute->EmailMessage ? $this->objEmailMessageRoute->EmailMessage->__toString() : null;
     }
     if ($this->lstGroup) {
         $this->lstGroup->RemoveAllItems();
         $this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);
         $objGroupArray = Group::LoadAll();
         if ($objGroupArray) {
             foreach ($objGroupArray as $objGroup) {
                 $objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);
                 if ($this->objEmailMessageRoute->Group && $this->objEmailMessageRoute->Group->Id == $objGroup->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstGroup->AddItem($objListItem);
             }
         }
     }
     if ($this->lblGroupId) {
         $this->lblGroupId->Text = $this->objEmailMessageRoute->Group ? $this->objEmailMessageRoute->Group->__toString() : null;
     }
     if ($this->lstCommunicationList) {
         $this->lstCommunicationList->RemoveAllItems();
         $this->lstCommunicationList->AddItem(QApplication::Translate('- Select One -'), null);
         $objCommunicationListArray = CommunicationList::LoadAll();
         if ($objCommunicationListArray) {
             foreach ($objCommunicationListArray as $objCommunicationList) {
                 $objListItem = new QListItem($objCommunicationList->__toString(), $objCommunicationList->Id);
                 if ($this->objEmailMessageRoute->CommunicationList && $this->objEmailMessageRoute->CommunicationList->Id == $objCommunicationList->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCommunicationList->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCommunicationListId) {
         $this->lblCommunicationListId->Text = $this->objEmailMessageRoute->CommunicationList ? $this->objEmailMessageRoute->CommunicationList->__toString() : null;
     }
     if ($this->lstLogin) {
         $this->lstLogin->RemoveAllItems();
         $this->lstLogin->AddItem(QApplication::Translate('- Select One -'), null);
         $objLoginArray = Login::LoadAll();
         if ($objLoginArray) {
             foreach ($objLoginArray as $objLogin) {
                 $objListItem = new QListItem($objLogin->__toString(), $objLogin->Id);
                 if ($this->objEmailMessageRoute->Login && $this->objEmailMessageRoute->Login->Id == $objLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblLoginId) {
         $this->lblLoginId->Text = $this->objEmailMessageRoute->Login ? $this->objEmailMessageRoute->Login->__toString() : null;
     }
     if ($this->lstCommunicationListEntry) {
         $this->lstCommunicationListEntry->RemoveAllItems();
         $this->lstCommunicationListEntry->AddItem(QApplication::Translate('- Select One -'), null);
         $objCommunicationListEntryArray = CommunicationListEntry::LoadAll();
         if ($objCommunicationListEntryArray) {
             foreach ($objCommunicationListEntryArray as $objCommunicationListEntry) {
                 $objListItem = new QListItem($objCommunicationListEntry->__toString(), $objCommunicationListEntry->Id);
                 if ($this->objEmailMessageRoute->CommunicationListEntry && $this->objEmailMessageRoute->CommunicationListEntry->Id == $objCommunicationListEntry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCommunicationListEntry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCommunicationListEntryId) {
         $this->lblCommunicationListEntryId->Text = $this->objEmailMessageRoute->CommunicationListEntry ? $this->objEmailMessageRoute->CommunicationListEntry->__toString() : null;
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objEmailMessageRoute->Person && $this->objEmailMessageRoute->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objEmailMessageRoute->Person ? $this->objEmailMessageRoute->Person->__toString() : null;
     }
 }
コード例 #8
0
 /**
  * Refresh this MetaControl with Data from the local StewardshipContribution object.
  * @param boolean $blnReload reload StewardshipContribution from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objStewardshipContribution->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objStewardshipContribution->Id;
         }
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objStewardshipContribution->Person && $this->objStewardshipContribution->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objStewardshipContribution->Person ? $this->objStewardshipContribution->Person->__toString() : null;
     }
     if ($this->lstStewardshipContributionType) {
         $this->lstStewardshipContributionType->SelectedValue = $this->objStewardshipContribution->StewardshipContributionTypeId;
     }
     if ($this->lblStewardshipContributionTypeId) {
         $this->lblStewardshipContributionTypeId->Text = $this->objStewardshipContribution->StewardshipContributionTypeId ? StewardshipContributionType::$NameArray[$this->objStewardshipContribution->StewardshipContributionTypeId] : null;
     }
     if ($this->lstStewardshipBatch) {
         $this->lstStewardshipBatch->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstStewardshipBatch->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objStewardshipBatchArray = StewardshipBatch::LoadAll();
         if ($objStewardshipBatchArray) {
             foreach ($objStewardshipBatchArray as $objStewardshipBatch) {
                 $objListItem = new QListItem($objStewardshipBatch->__toString(), $objStewardshipBatch->Id);
                 if ($this->objStewardshipContribution->StewardshipBatch && $this->objStewardshipContribution->StewardshipBatch->Id == $objStewardshipBatch->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipBatch->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipBatchId) {
         $this->lblStewardshipBatchId->Text = $this->objStewardshipContribution->StewardshipBatch ? $this->objStewardshipContribution->StewardshipBatch->__toString() : null;
     }
     if ($this->lstStewardshipStack) {
         $this->lstStewardshipStack->RemoveAllItems();
         $this->lstStewardshipStack->AddItem(QApplication::Translate('- Select One -'), null);
         $objStewardshipStackArray = StewardshipStack::LoadAll();
         if ($objStewardshipStackArray) {
             foreach ($objStewardshipStackArray as $objStewardshipStack) {
                 $objListItem = new QListItem($objStewardshipStack->__toString(), $objStewardshipStack->Id);
                 if ($this->objStewardshipContribution->StewardshipStack && $this->objStewardshipContribution->StewardshipStack->Id == $objStewardshipStack->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstStewardshipStack->AddItem($objListItem);
             }
         }
     }
     if ($this->lblStewardshipStackId) {
         $this->lblStewardshipStackId->Text = $this->objStewardshipContribution->StewardshipStack ? $this->objStewardshipContribution->StewardshipStack->__toString() : null;
     }
     if ($this->lstCheckingAccountLookup) {
         $this->lstCheckingAccountLookup->RemoveAllItems();
         $this->lstCheckingAccountLookup->AddItem(QApplication::Translate('- Select One -'), null);
         $objCheckingAccountLookupArray = CheckingAccountLookup::LoadAll();
         if ($objCheckingAccountLookupArray) {
             foreach ($objCheckingAccountLookupArray as $objCheckingAccountLookup) {
                 $objListItem = new QListItem($objCheckingAccountLookup->__toString(), $objCheckingAccountLookup->Id);
                 if ($this->objStewardshipContribution->CheckingAccountLookup && $this->objStewardshipContribution->CheckingAccountLookup->Id == $objCheckingAccountLookup->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCheckingAccountLookup->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCheckingAccountLookupId) {
         $this->lblCheckingAccountLookupId->Text = $this->objStewardshipContribution->CheckingAccountLookup ? $this->objStewardshipContribution->CheckingAccountLookup->__toString() : null;
     }
     if ($this->txtTotalAmount) {
         $this->txtTotalAmount->Text = $this->objStewardshipContribution->TotalAmount;
     }
     if ($this->lblTotalAmount) {
         $this->lblTotalAmount->Text = $this->objStewardshipContribution->TotalAmount;
     }
     if ($this->calDateEntered) {
         $this->calDateEntered->DateTime = $this->objStewardshipContribution->DateEntered;
     }
     if ($this->lblDateEntered) {
         $this->lblDateEntered->Text = sprintf($this->objStewardshipContribution->DateEntered) ? $this->objStewardshipContribution->__toString($this->strDateEnteredDateTimeFormat) : null;
     }
     if ($this->calDateCleared) {
         $this->calDateCleared->DateTime = $this->objStewardshipContribution->DateCleared;
     }
     if ($this->lblDateCleared) {
         $this->lblDateCleared->Text = sprintf($this->objStewardshipContribution->DateCleared) ? $this->objStewardshipContribution->__toString($this->strDateClearedDateTimeFormat) : null;
     }
     if ($this->calDateCredited) {
         $this->calDateCredited->DateTime = $this->objStewardshipContribution->DateCredited;
     }
     if ($this->lblDateCredited) {
         $this->lblDateCredited->Text = sprintf($this->objStewardshipContribution->DateCredited) ? $this->objStewardshipContribution->__toString($this->strDateCreditedDateTimeFormat) : null;
     }
     if ($this->txtCheckNumber) {
         $this->txtCheckNumber->Text = $this->objStewardshipContribution->CheckNumber;
     }
     if ($this->lblCheckNumber) {
         $this->lblCheckNumber->Text = $this->objStewardshipContribution->CheckNumber;
     }
     if ($this->txtAuthorizationNumber) {
         $this->txtAuthorizationNumber->Text = $this->objStewardshipContribution->AuthorizationNumber;
     }
     if ($this->lblAuthorizationNumber) {
         $this->lblAuthorizationNumber->Text = $this->objStewardshipContribution->AuthorizationNumber;
     }
     if ($this->txtAlternateSource) {
         $this->txtAlternateSource->Text = $this->objStewardshipContribution->AlternateSource;
     }
     if ($this->lblAlternateSource) {
         $this->lblAlternateSource->Text = $this->objStewardshipContribution->AlternateSource;
     }
     if ($this->chkNonDeductibleFlag) {
         $this->chkNonDeductibleFlag->Checked = $this->objStewardshipContribution->NonDeductibleFlag;
     }
     if ($this->lblNonDeductibleFlag) {
         $this->lblNonDeductibleFlag->Text = $this->objStewardshipContribution->NonDeductibleFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->txtNote) {
         $this->txtNote->Text = $this->objStewardshipContribution->Note;
     }
     if ($this->lblNote) {
         $this->lblNote->Text = $this->objStewardshipContribution->Note;
     }
     if ($this->lstCreatedByLogin) {
         $this->lstCreatedByLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCreatedByLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCreatedByLoginArray = Login::LoadAll();
         if ($objCreatedByLoginArray) {
             foreach ($objCreatedByLoginArray as $objCreatedByLogin) {
                 $objListItem = new QListItem($objCreatedByLogin->__toString(), $objCreatedByLogin->Id);
                 if ($this->objStewardshipContribution->CreatedByLogin && $this->objStewardshipContribution->CreatedByLogin->Id == $objCreatedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreatedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreatedByLoginId) {
         $this->lblCreatedByLoginId->Text = $this->objStewardshipContribution->CreatedByLogin ? $this->objStewardshipContribution->CreatedByLogin->__toString() : null;
     }
     if ($this->chkUnpostedFlag) {
         $this->chkUnpostedFlag->Checked = $this->objStewardshipContribution->UnpostedFlag;
     }
     if ($this->lblUnpostedFlag) {
         $this->lblUnpostedFlag->Text = $this->objStewardshipContribution->UnpostedFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstCreditCardPayment) {
         $this->lstCreditCardPayment->RemoveAllItems();
         $this->lstCreditCardPayment->AddItem(QApplication::Translate('- Select One -'), null);
         $objCreditCardPaymentArray = CreditCardPayment::LoadAll();
         if ($objCreditCardPaymentArray) {
             foreach ($objCreditCardPaymentArray as $objCreditCardPayment) {
                 $objListItem = new QListItem($objCreditCardPayment->__toString(), $objCreditCardPayment->Id);
                 if ($objCreditCardPayment->StewardshipContributionId == $this->objStewardshipContribution->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCreditCardPayment->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCreditCardPayment) {
         $this->lblCreditCardPayment->Text = $this->objStewardshipContribution->CreditCardPayment ? $this->objStewardshipContribution->CreditCardPayment->__toString() : null;
     }
 }
コード例 #9
0
 /**
  * Refresh this MetaControl with Data from the local Comment object.
  * @param boolean $blnReload reload Comment from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objComment->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objComment->Id;
         }
     }
     if ($this->lstPerson) {
         $this->lstPerson->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPerson->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPersonArray = Person::LoadAll();
         if ($objPersonArray) {
             foreach ($objPersonArray as $objPerson) {
                 $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);
                 if ($this->objComment->Person && $this->objComment->Person->Id == $objPerson->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPerson->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPersonId) {
         $this->lblPersonId->Text = $this->objComment->Person ? $this->objComment->Person->__toString() : null;
     }
     if ($this->lstPostedByLogin) {
         $this->lstPostedByLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstPostedByLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objPostedByLoginArray = Login::LoadAll();
         if ($objPostedByLoginArray) {
             foreach ($objPostedByLoginArray as $objPostedByLogin) {
                 $objListItem = new QListItem($objPostedByLogin->__toString(), $objPostedByLogin->Id);
                 if ($this->objComment->PostedByLogin && $this->objComment->PostedByLogin->Id == $objPostedByLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstPostedByLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblPostedByLoginId) {
         $this->lblPostedByLoginId->Text = $this->objComment->PostedByLogin ? $this->objComment->PostedByLogin->__toString() : null;
     }
     if ($this->lstCommentPrivacyType) {
         $this->lstCommentPrivacyType->SelectedValue = $this->objComment->CommentPrivacyTypeId;
     }
     if ($this->lblCommentPrivacyTypeId) {
         $this->lblCommentPrivacyTypeId->Text = $this->objComment->CommentPrivacyTypeId ? CommentPrivacyType::$NameArray[$this->objComment->CommentPrivacyTypeId] : null;
     }
     if ($this->lstCommentCategory) {
         $this->lstCommentCategory->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstCommentCategory->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objCommentCategoryArray = CommentCategory::LoadAll();
         if ($objCommentCategoryArray) {
             foreach ($objCommentCategoryArray as $objCommentCategory) {
                 $objListItem = new QListItem($objCommentCategory->__toString(), $objCommentCategory->Id);
                 if ($this->objComment->CommentCategory && $this->objComment->CommentCategory->Id == $objCommentCategory->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstCommentCategory->AddItem($objListItem);
             }
         }
     }
     if ($this->lblCommentCategoryId) {
         $this->lblCommentCategoryId->Text = $this->objComment->CommentCategory ? $this->objComment->CommentCategory->__toString() : null;
     }
     if ($this->txtComment) {
         $this->txtComment->Text = $this->objComment->Comment;
     }
     if ($this->lblComment) {
         $this->lblComment->Text = $this->objComment->Comment;
     }
     if ($this->calDatePosted) {
         $this->calDatePosted->DateTime = $this->objComment->DatePosted;
     }
     if ($this->lblDatePosted) {
         $this->lblDatePosted->Text = sprintf($this->objComment->DatePosted) ? $this->objComment->__toString($this->strDatePostedDateTimeFormat) : null;
     }
     if ($this->calDateAction) {
         $this->calDateAction->DateTime = $this->objComment->DateAction;
     }
     if ($this->lblDateAction) {
         $this->lblDateAction->Text = sprintf($this->objComment->DateAction) ? $this->objComment->__toString($this->strDateActionDateTimeFormat) : null;
     }
 }
コード例 #10
0
 /**
  * Refresh this MetaControl with Data from the local SmsMessage object.
  * @param boolean $blnReload reload SmsMessage from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objSmsMessage->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objSmsMessage->Id;
         }
     }
     if ($this->lstGroup) {
         $this->lstGroup->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstGroup->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objGroupArray = Group::LoadAll();
         if ($objGroupArray) {
             foreach ($objGroupArray as $objGroup) {
                 $objListItem = new QListItem($objGroup->__toString(), $objGroup->Id);
                 if ($this->objSmsMessage->Group && $this->objSmsMessage->Group->Id == $objGroup->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstGroup->AddItem($objListItem);
             }
         }
     }
     if ($this->lblGroupId) {
         $this->lblGroupId->Text = $this->objSmsMessage->Group ? $this->objSmsMessage->Group->__toString() : null;
     }
     if ($this->lstLogin) {
         $this->lstLogin->RemoveAllItems();
         if (!$this->blnEditMode) {
             $this->lstLogin->AddItem(QApplication::Translate('- Select One -'), null);
         }
         $objLoginArray = Login::LoadAll();
         if ($objLoginArray) {
             foreach ($objLoginArray as $objLogin) {
                 $objListItem = new QListItem($objLogin->__toString(), $objLogin->Id);
                 if ($this->objSmsMessage->Login && $this->objSmsMessage->Login->Id == $objLogin->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstLogin->AddItem($objListItem);
             }
         }
     }
     if ($this->lblLoginId) {
         $this->lblLoginId->Text = $this->objSmsMessage->Login ? $this->objSmsMessage->Login->__toString() : null;
     }
     if ($this->txtSubject) {
         $this->txtSubject->Text = $this->objSmsMessage->Subject;
     }
     if ($this->lblSubject) {
         $this->lblSubject->Text = $this->objSmsMessage->Subject;
     }
     if ($this->txtBody) {
         $this->txtBody->Text = $this->objSmsMessage->Body;
     }
     if ($this->lblBody) {
         $this->lblBody->Text = $this->objSmsMessage->Body;
     }
     if ($this->calDateQueued) {
         $this->calDateQueued->DateTime = $this->objSmsMessage->DateQueued;
     }
     if ($this->lblDateQueued) {
         $this->lblDateQueued->Text = sprintf($this->objSmsMessage->DateQueued) ? $this->objSmsMessage->__toString($this->strDateQueuedDateTimeFormat) : null;
     }
     if ($this->calDateSent) {
         $this->calDateSent->DateTime = $this->objSmsMessage->DateSent;
     }
     if ($this->lblDateSent) {
         $this->lblDateSent->Text = sprintf($this->objSmsMessage->DateSent) ? $this->objSmsMessage->__toString($this->strDateSentDateTimeFormat) : null;
     }
 }
コード例 #11
0
 /**
  * Refresh this MetaControl with Data from the local Ministry object.
  * @param boolean $blnReload reload Ministry from the database
  * @return void
  */
 public function Refresh($blnReload = false)
 {
     if ($blnReload) {
         $this->objMinistry->Reload();
     }
     if ($this->lblId) {
         if ($this->blnEditMode) {
             $this->lblId->Text = $this->objMinistry->Id;
         }
     }
     if ($this->txtToken) {
         $this->txtToken->Text = $this->objMinistry->Token;
     }
     if ($this->lblToken) {
         $this->lblToken->Text = $this->objMinistry->Token;
     }
     if ($this->txtName) {
         $this->txtName->Text = $this->objMinistry->Name;
     }
     if ($this->lblName) {
         $this->lblName->Text = $this->objMinistry->Name;
     }
     if ($this->lstParentMinistry) {
         $this->lstParentMinistry->RemoveAllItems();
         $this->lstParentMinistry->AddItem(QApplication::Translate('- Select One -'), null);
         $objParentMinistryArray = Ministry::LoadAll();
         if ($objParentMinistryArray) {
             foreach ($objParentMinistryArray as $objParentMinistry) {
                 $objListItem = new QListItem($objParentMinistry->__toString(), $objParentMinistry->Id);
                 if ($this->objMinistry->ParentMinistry && $this->objMinistry->ParentMinistry->Id == $objParentMinistry->Id) {
                     $objListItem->Selected = true;
                 }
                 $this->lstParentMinistry->AddItem($objListItem);
             }
         }
     }
     if ($this->lblParentMinistryId) {
         $this->lblParentMinistryId->Text = $this->objMinistry->ParentMinistry ? $this->objMinistry->ParentMinistry->__toString() : null;
     }
     if ($this->txtGroupTypeBitmap) {
         $this->txtGroupTypeBitmap->Text = $this->objMinistry->GroupTypeBitmap;
     }
     if ($this->lblGroupTypeBitmap) {
         $this->lblGroupTypeBitmap->Text = $this->objMinistry->GroupTypeBitmap;
     }
     if ($this->txtSignupFormTypeBitmap) {
         $this->txtSignupFormTypeBitmap->Text = $this->objMinistry->SignupFormTypeBitmap;
     }
     if ($this->lblSignupFormTypeBitmap) {
         $this->lblSignupFormTypeBitmap->Text = $this->objMinistry->SignupFormTypeBitmap;
     }
     if ($this->chkActiveFlag) {
         $this->chkActiveFlag->Checked = $this->objMinistry->ActiveFlag;
     }
     if ($this->lblActiveFlag) {
         $this->lblActiveFlag->Text = $this->objMinistry->ActiveFlag ? QApplication::Translate('Yes') : QApplication::Translate('No');
     }
     if ($this->lstLogins) {
         $this->lstLogins->RemoveAllItems();
         $objAssociatedArray = $this->objMinistry->GetLoginArray();
         $objLoginArray = Login::LoadAll();
         if ($objLoginArray) {
             foreach ($objLoginArray as $objLogin) {
                 $objListItem = new QListItem($objLogin->__toString(), $objLogin->Id);
                 foreach ($objAssociatedArray as $objAssociated) {
                     if ($objAssociated->Id == $objLogin->Id) {
                         $objListItem->Selected = true;
                     }
                 }
                 $this->lstLogins->AddItem($objListItem);
             }
         }
     }
     if ($this->lblLogins) {
         $objAssociatedArray = $this->objMinistry->GetLoginArray();
         $strItems = array();
         foreach ($objAssociatedArray as $objAssociated) {
             $strItems[] = $objAssociated->__toString();
         }
         $this->lblLogins->Text = implode($strGlue, $strItems);
     }
 }