public function dtgEvents_Bind() { $objCondition = QQ::AndCondition(QQ::Equal(QQN::SignupEntry()->PersonId, $this->objPerson->Id), QQ::In(QQN::SignupEntry()->SignupEntryStatusTypeId, array(SignupEntryStatusType::Complete, SignupEntryStatusType::Cancelled))); $this->dtgEvents->MetaDataBinder($objCondition); // Filter out any we are not allowed to see $objDataSource = array(); foreach ($this->dtgEvents->DataSource as $objSignupEntry) { if ($objSignupEntry->SignupForm->IsLoginCanView(QApplication::$Login)) { $objDataSource[] = $objSignupEntry; } } $this->dtgEvents->DataSource = $objDataSource; }
/** * Count SignupEntries * by CommunicationsEntryId Index(es) * @param integer $intCommunicationsEntryId * @return int */ public static function CountByCommunicationsEntryId($intCommunicationsEntryId, $objOptionalClauses = null) { // Call SignupEntry::QueryCount to perform the CountByCommunicationsEntryId query return SignupEntry::QueryCount(QQ::Equal(QQN::SignupEntry()->CommunicationsEntryId, $intCommunicationsEntryId), $objOptionalClauses); }
protected function btnDialogOkay_Click() { $objPerson = $this->pnlSelectPerson->Person; // Try and find any INCOMPLETE one for this person and redirect to there $objSignupEntryArray = SignupEntry::QueryArray(QQ::AndCondition(QQ::Equal(QQN::SignupEntry()->SignupFormId, $this->objSignupForm->Id), QQ::Equal(QQN::SignupEntry()->PersonId, $objPerson->Id))); foreach ($objSignupEntryArray as $objSignupEntry) { switch ($objSignupEntry->SignupEntryStatusTypeId) { case SignupEntryStatusType::Incomplete: QApplication::Redirect(sprintf('/events/result.php/%s/%s', $this->objSignupForm->Id, $objSignupEntry->Id)); return; } } // If we are here ,then no incompletes were found -- go ahead and create and redirect to a new one $this->CreateAndRedirect($objPerson); }
protected function PaymentDialogBox() { $this->dlgEdit->ShowDialogBox(); $this->dlgEdit->Template = dirname(__FILE__) . '/dlgEditResult_Payment.tpl.php'; $this->intEditTag = self::EditTagPayment; // Reset $this->ResetDialogControls(); if (!$this->objPayment->Id) { $this->btnDelete->Visible = false; } $this->txtFloat->Name = 'Amount'; $this->txtFloat->Required = true; $this->txtFloat->Minimum = 0; $this->txtFloat->Maximum = null; $this->txtTextbox->Text = null; $this->txtFloat->Text = null; // Setup the appropriate control switch ($this->objPayment->SignupPaymentTypeId) { case SignupPaymentType::Cash: $this->txtTextbox->Name = 'Note'; break; case SignupPaymentType::Check: $this->txtTextbox->Name = 'Check Number'; $this->txtTextbox->Required = true; break; case SignupPaymentType::CreditCard: $this->txtTextbox->Name = 'Transaction Confirmation'; $this->txtTextbox->Required = true; break; case SignupPaymentType::Discount: $this->txtTextbox->Name = 'Note / Reason'; $this->txtTextbox->Required = true; break; case SignupPaymentType::Other: $this->txtTextbox->Name = 'Note'; break; case SignupPaymentType::Refund: $this->txtTextbox->Name = 'Note'; $this->txtTextbox->Required = true; $this->txtFloat->Maximum = 0; $this->txtFloat->Minimum = null; break; case SignupPaymentType::Scholarship: $this->txtTextbox->Name = 'Note / Reason'; $this->txtTextbox->Required = true; break; case SignupPaymentType::Transfer: $this->txtTextbox->Name = 'Note'; $this->txtFloat->Maximum = 0; $this->txtFloat->Minimum = null; $this->lstListbox->Name = 'Transfer To'; foreach ($this->mctSignupEntry->SignupEntry->SignupForm->GetSignupEntryArray(QQ::OrderBy(QQN::SignupEntry()->Person->LastName, QQN::SignupEntry()->Person->FirstName)) as $objSignupEntry) { $this->lstListbox->AddItem($objSignupEntry->Person->Name, $objSignupEntry->Id); } $this->lstListbox->Required = true; break; } }
print ", State And Zip Code"; } else { print "," . EscapeCsv($objFormQuestion->ShortDescription); } } if ($objSignupForm->CountFormProducts() > 0) { foreach ($objSignupForm->GetFormProductArray(QQ::OrderBy(QQN::FormProduct()->FormProductTypeId, QQN::FormProduct()->OrderNumber)) as $objFormProduct) { if ($objFormProduct->ViewFlag) { print ","; print $objFormProduct->Name; } } print ",Total,Paid,Balance,Payment Type"; } print ",Date Submitted\r\n"; $objCursor = SignupEntry::QueryCursor(QQ::Equal(QQN::SignupEntry()->SignupFormId, $objSignupForm->Id), QQ::OrderBy(QQN::SignupEntry()->DateSubmitted)); while ($objSignupEntry = SignupEntry::InstantiateCursor($objCursor)) { if ($objSignupEntry->SignupEntryStatusTypeId == SignupEntryStatusType::Complete) { print EscapeCsv($objSignupEntry->Person->FirstName); print ","; print EscapeCsv($objSignupEntry->Person->LastName); print ","; foreach ($objFormQuestionArray as $objFormQuestion) { $objAnswer = FormAnswer::LoadBySignupEntryIdFormQuestionId($objSignupEntry->Id, $objFormQuestion->Id); if ($objAnswer) { switch ($objFormQuestion->FormQuestionTypeId) { case FormQuestionType::YesNo: if ($objAnswer->BooleanValue) { print 'Yes'; } break;
public function dtgSignupEntries_Bind() { $objCondition = QQ::Equal(QQN::SignupEntry()->SignupFormId, $this->objSignupForm->Id); $objCondition = QQ::AndCondition($objCondition, QQ::Equal(QQN::SignupEntry()->SignupEntryStatusTypeId, $this->lstStatus->SelectedValue)); $this->dtgSignupEntries->MetaDataBinder($objCondition); }
/** * Used internally by the Meta-based Add Column tools. * * Given a QQNode or a Text String, this will return a SignupEntry-based QQNode. * It will also verify that it is a proper SignupEntry-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 == 'signup_entry') { 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 "signup_entry".'); } } else { if (is_string($mixContent)) { switch ($mixContent) { case 'Id': return QQN::SignupEntry()->Id; case 'SignupFormId': return QQN::SignupEntry()->SignupFormId; case 'SignupForm': return QQN::SignupEntry()->SignupForm; case 'PersonId': return QQN::SignupEntry()->PersonId; case 'Person': return QQN::SignupEntry()->Person; case 'SignupByPersonId': return QQN::SignupEntry()->SignupByPersonId; case 'SignupByPerson': return QQN::SignupEntry()->SignupByPerson; case 'SignupEntryStatusTypeId': return QQN::SignupEntry()->SignupEntryStatusTypeId; case 'DateCreated': return QQN::SignupEntry()->DateCreated; case 'DateSubmitted': return QQN::SignupEntry()->DateSubmitted; case 'AmountTotal': return QQN::SignupEntry()->AmountTotal; case 'AmountPaid': return QQN::SignupEntry()->AmountPaid; case 'AmountBalance': return QQN::SignupEntry()->AmountBalance; case 'InternalNotes': return QQN::SignupEntry()->InternalNotes; case 'CommunicationsEntryId': return QQN::SignupEntry()->CommunicationsEntryId; case 'CommunicationsEntry': return QQN::SignupEntry()->CommunicationsEntry; case 'ClassRegistration': return QQN::SignupEntry()->ClassRegistration; default: throw new QCallerException('Simple Property not found in SignupEntryDataGrid 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'); } } } }