Esempio n. 1
0
            $this->dtgEntity->AddColumn(new QDataGridColumn('Source', '<?= $_ITEM->SourceLocation->__toString() ?>', 'CssClass="dtg_column"'));
            $this->dtgEntity->AddColumn(new QDataGridColumn('Destination', '<?= $_ITEM->DestinationLocation->__toString() ?>', 'CssClass="dtg_column"'));
            $this->dtgEntity->AddColumn(new QDataGridColumn('Quantity', '<?= $_ITEM->Quantity ?>', 'CssClass="dtg_column"'));
        }
        $objStyle = $this->dtgEntity->RowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#FFFFFF';
        $objStyle->FontSize = 12;
        $objStyle = $this->dtgEntity->AlternateRowStyle;
        $objStyle->BackColor = '#EFEFEF';
        $objStyle = $this->dtgEntity->HeaderRowStyle;
        $objStyle->ForeColor = '#000000';
        $objStyle->BackColor = '#EFEFEF';
        $objStyle->CssClass = 'dtg_header';
    }
    protected function Form_PreRender()
    {
        if ($this->objTransaction->EntityQtypeId == EntityQtype::Asset) {
            $objExpansionMap[AssetTransaction::ExpandAsset][Asset::ExpandAssetModel] = true;
            $this->dtgEntity->TotalItemCount = $this->objTransaction->CountAssetTransactions();
            $this->dtgEntity->DataSource = $this->objTransaction->GetAssetTransactionArray();
        } elseif ($this->objTransaction->EntityQtypeId == EntityQtype::Inventory) {
            $this->dtgEntity->TotalItemCount = $this->objTransaction->CountInventoryTransactions();
            $this->dtgEntity->DataSource = $this->objTransaction->GetInventoryTransactionArray();
        }
    }
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/transaction_edit.php.inc as the included HTML template file
TransactionEditForm::Run('TransactionEditForm', 'transaction_edit.tpl.php');
Esempio n. 2
0
// 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 TransactionEditFormBase
require __FORMBASE_CLASSES__ . '/TransactionEditFormBase.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 Create, Edit, and Delete functionality
 * of the Transaction class.  It extends from the code-generated
 * abstract TransactionEditFormBase 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 TransactionEditForm extends TransactionEditFormBase
{
}
// Go ahead and run this form object to render the page and its event handlers, using
// generated/transaction_edit.tpl.php as the included HTML template file
TransactionEditForm::Run('TransactionEditForm', 'generated/transaction_edit.tpl.php');