// Include prepend.inc to load Qcodo require '../includes/prepend.inc.php'; /* if you DO NOT have "includes/" in your include_path */ // require('prepend.inc.php'); /* if you DO have "includes/" in your include_path */ // Include the classfile for ManufacturerListFormBase require __FORMBASE_CLASSES__ . '/ManufacturerListFormBase.class.php'; // Security check for ALLOW_REMOTE_ADMIN // To allow access REGARDLESS of ALLOW_REMOTE_ADMIN, simply remove the line below QApplication::CheckRemoteAdmin(); /** * This is a quick-and-dirty draft form object to do the List All functionality * of the Manufacturer class. It extends from the code-generated * abstract ManufacturerListFormBase class. * * Any display customizations and presentation-tier logic can be implemented * here by overriding existing or implementing new methods, properties and variables. * * Additional qform control objects can also be defined and used here, as well. * * @package My Application * @subpackage FormDraftObjects * */ class ManufacturerListForm extends ManufacturerListFormBase { } // Go ahead and run this form object to generate the page and event handlers, using // generated/manufacturer_list.tpl.php as the included HTML template file ManufacturerListForm::Run('ManufacturerListForm', 'generated/manufacturer_list.tpl.php');
// Get Total Count b/c of Pagination $this->dtgManufacturer->TotalItemCount = Manufacturer::CountAll(); if ($this->dtgManufacturer->TotalItemCount == 0) { $this->dtgManufacturer->ShowHeader = false; } else { /* $objClauses = array(); if ($objClause = $this->dtgManufacturer->OrderByClause) array_push($objClauses, $objClause); if ($objClause = $this->dtgManufacturer->LimitClause) array_push($objClauses, $objClause); if ($objClause = QQ::Expand(QQN::Manufacturer()->CreatedByObject)) array_push($objClauses, $objClause); $this->dtgManufacturer->DataSource = Manufacturer::LoadAll($objClauses); $this->dtgManufacturer->ShowHeader = true;*/ $this->dtgManufacturer->DataSource = Manufacturer::LoadAllWithCustomFieldsHelper($this->dtgManufacturer->SortInfo, $this->dtgManufacturer->LimitInfo, $objExpansionMap); $this->dtgManufacturer->ShowHeader = true; } } protected function btnNew_Click() { QApplication::Redirect('manufacturer_edit.php'); } protected function btnImport_Click() { QApplication::Redirect('manufacturer_import.php'); } } // Go ahead and run this form object to generate the page and event handlers, using // generated/manufacturer_edit.php.inc as the included HTML template file ManufacturerListForm::Run('ManufacturerListForm', __DOCROOT__ . __SUBDIRECTORY__ . '/admin/manufacturer_list.tpl.php');