A QCodo powered CMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
1.8 KiB

  1. if ($this-><%= $strControlId %>) {
  2. $this-><%=$strControlId %>->RemoveAllItems();
  3. <% if ($objColumn->NotNull) { %>
  4. if (!$this->blnEditMode)
  5. $this-><%=$strControlId %>->AddItem(QApplication::Translate('- Select One -'), null);
  6. <% } %><% if (!$objColumn->NotNull) { %>
  7. $this-><%=$strControlId %>->AddItem(QApplication::Translate('- Select One -'), null);
  8. <% } %>
  9. $<%= $objColumn->Reference->VariableName %>Array = <%= $objColumn->Reference->VariableType %>::LoadAll();
  10. if ($<%= $objColumn->Reference->VariableName %>Array) foreach ($<%= $objColumn->Reference->VariableName %>Array as $<%= $objColumn->Reference->VariableName %>) {
  11. $objListItem = new QListItem($<%= $objColumn->Reference->VariableName %>->__toString(), $<%= $objColumn->Reference->VariableName %>-><%= $objCodeGen->GetTable($objColumn->Reference->Table)->PrimaryKeyColumnArray[0]->PropertyName %>);
  12. if (($this-><%= $strObjectName %>-><%= $objColumn->Reference->PropertyName %>) && ($this-><%= $strObjectName %>-><%= $objColumn->Reference->PropertyName %>-><%= $objCodeGen->GetTable($objColumn->Reference->Table)->PrimaryKeyColumnArray[0]->PropertyName %> == $<%= $objColumn->Reference->VariableName %>-><%= $objCodeGen->GetTable($objColumn->Reference->Table)->PrimaryKeyColumnArray[0]->PropertyName %>))
  13. $objListItem->Selected = true;
  14. $this-><%=$strControlId %>->AddItem($objListItem);
  15. }
  16. }
  17. if ($this-><%= $strLabelId %>) $this-><%= $strLabelId %>->Text = ($this-><%= $strObjectName %>-><%= $objColumn->Reference->PropertyName %>) ? $this-><%= $strObjectName %>-><%= $objColumn->Reference->PropertyName %>->__toString() : null;