/** * Create and setup QListBox lstStewardshipBatch * @param string $strControlId optional ControlId to use * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query * @return QListBox */ public function lstStewardshipBatch_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) { $this->lstStewardshipBatch = new QListBox($this->objParentObject, $strControlId); $this->lstStewardshipBatch->Name = QApplication::Translate('Stewardship Batch'); $this->lstStewardshipBatch->AddItem(QApplication::Translate('- Select One -'), null); // Setup and perform the Query if (is_null($objCondition)) { $objCondition = QQ::All(); } $objStewardshipBatchCursor = StewardshipBatch::QueryCursor($objCondition, $objOptionalClauses); // Iterate through the Cursor while ($objStewardshipBatch = StewardshipBatch::InstantiateCursor($objStewardshipBatchCursor)) { $objListItem = new QListItem($objStewardshipBatch->__toString(), $objStewardshipBatch->Id); if ($this->objPaypalBatch->StewardshipBatch && $this->objPaypalBatch->StewardshipBatch->Id == $objStewardshipBatch->Id) { $objListItem->Selected = true; } $this->lstStewardshipBatch->AddItem($objListItem); } // Return the QListBox return $this->lstStewardshipBatch; }
$objHousehold->Save(); } QDataGen::DisplayForEachTaskEnd('Refreshing Household data'); $objStewardshipCursor = StewardshipContribution::QueryCursor(QQ::All()); QDataGEn::DisplayForEachTaskStart('Refreshing Contributions', StewardshipContribution::CountAll()); while ($objContribution = StewardshipContribution::InstantiateCursor($objStewardshipCursor)) { QDataGen::DisplayForEachTaskNext('Refreshing Contributions'); $objContribution->RefreshTotalAmount(); } QDataGen::DisplayForEachTaskEnd('Refreshing Contributions'); $objStewardshipCursor = StewardshipStack::QueryCursor(QQ::All()); QDataGEn::DisplayForEachTaskStart('Refreshing Stacks', StewardshipStack::CountAll()); while ($objStack = StewardshipStack::InstantiateCursor($objStewardshipCursor)) { QDataGen::DisplayForEachTaskNext('Refreshing Stacks'); $objStack->RefreshActualTotalAmount(); } QDataGen::DisplayForEachTaskEnd('Refreshing Stacks'); $objStewardshipCursor = StewardshipBatch::QueryCursor(QQ::All()); QDataGEn::DisplayForEachTaskStart('Refreshing Batches', StewardshipBatch::CountAll()); while ($objBatch = StewardshipBatch::InstantiateCursor($objStewardshipCursor)) { QDataGen::DisplayForEachTaskNext('Refreshing Batches'); $objBatch->PostBalance(Login::Load(1)); } QDataGen::DisplayForEachTaskEnd('Refreshing Batches'); $objStewardshipCursor = StewardshipPledge::QueryCursor(QQ::All()); QDataGEn::DisplayForEachTaskStart('Refreshing Pledges', StewardshipPledge::CountAll()); while ($objPledge = StewardshipPledge::InstantiateCursor($objStewardshipCursor)) { QDataGen::DisplayForEachTaskNext('Refreshing Pledges'); $objPledge->Refresh(); } QDataGen::DisplayForEachTaskEnd('Refreshing Pledges');