/**
  * Create and setup QListBox lstSignupEntry
  * @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 lstSignupEntry_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null)
 {
     $this->lstSignupEntry = new QListBox($this->objParentObject, $strControlId);
     $this->lstSignupEntry->Name = QApplication::Translate('Signup Entry');
     $this->lstSignupEntry->Required = true;
     if (!$this->blnEditMode) {
         $this->lstSignupEntry->AddItem(QApplication::Translate('- Select One -'), null);
     }
     // Setup and perform the Query
     if (is_null($objCondition)) {
         $objCondition = QQ::All();
     }
     $objSignupEntryCursor = SignupEntry::QueryCursor($objCondition, $objOptionalClauses);
     // Iterate through the Cursor
     while ($objSignupEntry = SignupEntry::InstantiateCursor($objSignupEntryCursor)) {
         $objListItem = new QListItem($objSignupEntry->__toString(), $objSignupEntry->Id);
         if ($this->objSignupProduct->SignupEntry && $this->objSignupProduct->SignupEntry->Id == $objSignupEntry->Id) {
             $objListItem->Selected = true;
         }
         $this->lstSignupEntry->AddItem($objListItem);
     }
     // Return the QListBox
     return $this->lstSignupEntry;
 }
Ejemplo n.º 2
0
    } 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;
                    case FormQuestionType::SpouseName: