A Qcodo based CMS/ecommerce framework
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.

46 lines
2.0 KiB

12 years ago
  1. <?php
  2. require(__DATAGEN_META_CONTROLS__ . '/OrderChangeMetaControlGen.class.php');
  3. /**
  4. * This is a MetaControl customizable subclass, providing a QForm or QPanel access to event handlers
  5. * and QControls to perform the Create, Edit, and Delete functionality of the
  6. * OrderChange class. This code-generated class extends from
  7. * the generated MetaControl class, which contains all the basic elements to help a QPanel or QForm
  8. * display an HTML form that can manipulate a single OrderChange object.
  9. *
  10. * To take advantage of some (or all) of these control objects, you
  11. * must create a new QForm or QPanel which instantiates a OrderChangeMetaControl
  12. * class.
  13. *
  14. * This file is intended to be modified. Subsequent code regenerations will NOT modify
  15. * or overwrite this file.
  16. *
  17. * @package Quasi
  18. * @subpackage MetaControls
  19. */
  20. class OrderChangeMetaControl extends OrderChangeMetaControlGen
  21. {
  22. /**
  23. * Create and setup QListBox lstOrder
  24. * @param string $strControlId optional ControlId to use
  25. * @return QListBox
  26. */
  27. public function lstOrder_Create($strControlId = null)
  28. {
  29. $objDatabase = Order::GetDatabase();
  30. $this->lstOrder = new QListBox($this->objParentObject, $strControlId);
  31. $this->lstOrder->Name = QApplication::Translate('Order');
  32. $this->lstOrder->Required = true;
  33. if (!$this->blnEditMode)
  34. $this->lstOrder->AddItem(QApplication::Translate('- Select One -'), null);
  35. $objResult = $objDatabase->Query('SELECT `id` FROM `order` ORDER BY id ASC');
  36. while($aryRow = $objResult->FetchRow())
  37. {
  38. $objListItem = new QListItem($aryRow[0], $aryRow[0]);
  39. if (($this->objOrderChange->Order) && ($this->objOrderChange->Order->Id == $aryRow[0]))
  40. $objListItem->Selected = true;
  41. $this->lstOrder->AddItem($objListItem);
  42. }
  43. return $this->lstOrder;
  44. }
  45. }
  46. ?>