public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Record Method Callbacks
     $this->strSetEditPanelMethod = $strSetEditPanelMethod;
     $this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgShippingAccount_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colShippingAccountId = new QDataGridColumn(QApplication::Translate('Shipping Account Id'), '<?= $_ITEM->ShippingAccountId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShippingAccountId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShippingAccountId, false)));
     $this->colCourierId = new QDataGridColumn(QApplication::Translate('Courier Id'), '<?= $_CONTROL->ParentControl->dtgShippingAccount_Courier_Render($_ITEM); ?>');
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription, false)));
     $this->colAccessId = new QDataGridColumn(QApplication::Translate('Access Id'), '<?= QString::Truncate($_ITEM->AccessId, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId, false)));
     $this->colAccessCode = new QDataGridColumn(QApplication::Translate('Access Code'), '<?= QString::Truncate($_ITEM->AccessCode, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessCode), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessCode, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_CONTROL->ParentControl->dtgShippingAccount_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_CONTROL->ParentControl->dtgShippingAccount_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_CONTROL->ParentControl->dtgShippingAccount_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgShippingAccount = new QDataGrid($this);
     $this->dtgShippingAccount->CellSpacing = 0;
     $this->dtgShippingAccount->CellPadding = 4;
     $this->dtgShippingAccount->BorderStyle = QBorderStyle::Solid;
     $this->dtgShippingAccount->BorderWidth = 1;
     $this->dtgShippingAccount->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgShippingAccount->Paginator = new QPaginator($this->dtgShippingAccount);
     $this->dtgShippingAccount->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgShippingAccount->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgShippingAccount->SetDataBinder('dtgShippingAccount_Bind', $this);
     $this->dtgShippingAccount->AddColumn($this->colEditLinkColumn);
     $this->dtgShippingAccount->AddColumn($this->colShippingAccountId);
     $this->dtgShippingAccount->AddColumn($this->colCourierId);
     $this->dtgShippingAccount->AddColumn($this->colShortDescription);
     $this->dtgShippingAccount->AddColumn($this->colAccessId);
     $this->dtgShippingAccount->AddColumn($this->colAccessCode);
     $this->dtgShippingAccount->AddColumn($this->colCreatedBy);
     $this->dtgShippingAccount->AddColumn($this->colCreationDate);
     $this->dtgShippingAccount->AddColumn($this->colModifiedBy);
     $this->dtgShippingAccount->AddColumn($this->colModifiedDate);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('ShippingAccount');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgShippingAccount_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colShippingAccountId = new QDataGridColumn(QApplication::Translate('Shipping Account Id'), '<?= $_ITEM->ShippingAccountId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShippingAccountId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShippingAccountId, false)));
     $this->colCourierId = new QDataGridColumn(QApplication::Translate('Courier Id'), '<?= $_FORM->dtgShippingAccount_Courier_Render($_ITEM); ?>');
     $this->colShortDescription = new QDataGridColumn(QApplication::Translate('Short Description'), '<?= QString::Truncate($_ITEM->ShortDescription, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription, false)));
     $this->colAccessId = new QDataGridColumn(QApplication::Translate('Access Id'), '<?= QString::Truncate($_ITEM->AccessId, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId, false)));
     $this->colAccessCode = new QDataGridColumn(QApplication::Translate('Access Code'), '<?= QString::Truncate($_ITEM->AccessCode, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessCode), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessCode, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_FORM->dtgShippingAccount_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_FORM->dtgShippingAccount_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_FORM->dtgShippingAccount_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgShippingAccount = new QDataGrid($this);
     $this->dtgShippingAccount->CellSpacing = 0;
     $this->dtgShippingAccount->CellPadding = 4;
     $this->dtgShippingAccount->BorderStyle = QBorderStyle::Solid;
     $this->dtgShippingAccount->BorderWidth = 1;
     $this->dtgShippingAccount->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgShippingAccount->Paginator = new QPaginator($this->dtgShippingAccount);
     $this->dtgShippingAccount->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgShippingAccount->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgShippingAccount->SetDataBinder('dtgShippingAccount_Bind');
     $this->dtgShippingAccount->AddColumn($this->colEditLinkColumn);
     $this->dtgShippingAccount->AddColumn($this->colShippingAccountId);
     $this->dtgShippingAccount->AddColumn($this->colCourierId);
     $this->dtgShippingAccount->AddColumn($this->colShortDescription);
     $this->dtgShippingAccount->AddColumn($this->colAccessId);
     $this->dtgShippingAccount->AddColumn($this->colAccessCode);
     $this->dtgShippingAccount->AddColumn($this->colCreatedBy);
     $this->dtgShippingAccount->AddColumn($this->colCreationDate);
     $this->dtgShippingAccount->AddColumn($this->colModifiedBy);
     $this->dtgShippingAccount->AddColumn($this->colModifiedDate);
 }
Ejemplo n.º 3
0
 /**
  * Count ShippingAccounts
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy)
 {
     // Call ShippingAccount::QueryCount to perform the CountByCreatedBy query
     return ShippingAccount::QueryCount(QQ::Equal(QQN::ShippingAccount()->CreatedBy, $intCreatedBy));
 }
Ejemplo n.º 4
0
 protected function lstShippingAccount_Create()
 {
     $this->lstShippingAccount = new QListBox($this->pnlFedExShipment);
     $this->lstShippingAccount->Name = QApplication::Translate('Sender Account');
     $this->lstShippingAccount->Required = false;
     if (!$this->blnEditMode) {
         $this->lstShippingAccount->AddItem('- Select One -', null);
     }
     $objShippingAccountArray = ShippingAccount::LoadAll(QQ::Clause(QQ::OrderBy(QQN::ShippingAccount()->ShortDescription)));
     if ($objShippingAccountArray) {
         foreach ($objShippingAccountArray as $objShippingAccount) {
             $objListItem = new QListItem($objShippingAccount->__toString(), $objShippingAccount->ShippingAccountId);
             $this->lstShippingAccount->AddItem($objListItem);
             if (!$this->blnEditMode && count($objShippingAccountArray) === 1) {
                 $objListItem->Selected = true;
             }
         }
     }
     //$this->lstShippingAccount->AddAction(new QChangeEvent(), new QAjaxAction('lstShippingAccount_Select'));
     $this->lstShippingAccount->TabIndex = 13;
 }
Ejemplo n.º 5
0
 protected function dtgShippingAccount_Create()
 {
     $this->dtgShippingAccount = new QDataGrid($this);
     $this->dtgShippingAccount->CellPadding = 5;
     $this->dtgShippingAccount->CellSpacing = 0;
     $this->dtgShippingAccount->CssClass = "datagrid";
     $this->dtgShippingAccount->SortColumnIndex = 0;
     // Enable AJAX - this won't work while using the DB profiler
     $this->dtgShippingAccount->UseAjax = true;
     // Enable Pagination, and set to 20 items per page
     $objPaginator = new QPaginator($this->dtgShippingAccount);
     $this->dtgShippingAccount->Paginator = $objPaginator;
     $this->dtgShippingAccount->ItemsPerPage = 20;
     $this->dtgShippingAccount->AddColumn(new QDataGridColumn('Account', '<?= $_ITEM->__toStringWithLink("bluelink") ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->ShortDescription, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
     $this->dtgShippingAccount->AddColumn(new QDataGridColumn('Courier', '<?= $_ITEM->Courier->__toString() ?>', array('Width' => "200", 'OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->Courier->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->Courier->ShortDescription, false), 'CssClass' => "dtg_column")));
     $this->dtgShippingAccount->AddColumn(new QDataGridColumn('Account Number', '<?= $_ITEM->AccessId ?>', array('OrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::ShippingAccount()->AccessId, false), 'CssClass' => "dtg_column")));
     $this->dtgShippingAccount->SortColumnIndex = 0;
     $this->dtgShippingAccount->SortDirection = 0;
     $objStyle = $this->dtgShippingAccount->RowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#FFFFFF';
     $objStyle->FontSize = 12;
     $objStyle = $this->dtgShippingAccount->AlternateRowStyle;
     $objStyle->BackColor = '#EFEFEF';
     $objStyle = $this->dtgShippingAccount->HeaderRowStyle;
     $objStyle->ForeColor = '#000000';
     $objStyle->BackColor = '#EFEFEF';
     $objStyle->CssClass = 'dtg_header';
 }