protected function Form_PreRender() { $objExpansionMap[Location::ExpandCreatedByObject] = true; // Get Total Count b/c of Pagination $this->dtgLocation->TotalItemCount = Location::CountAllLocations(); if ($this->dtgLocation->TotalItemCount == 0) { $this->dtgLocation->ShowHeader = false; } else { $this->dtgLocation->DataSource = Location::LoadAllLocations(false, false, $this->dtgLocation->SortInfo, $this->dtgLocation->LimitInfo, $objExpansionMap); $this->dtgLocation->ShowHeader = true; } }
public function lstLocationInventoryReceived_Render(InventoryTransaction $objInventoryTransaction) { if (!$objInventoryTransaction->blnReturnReceivedStatus()) { $strControlId = 'lstLocationInventoryReceived' . $objInventoryTransaction->InventoryTransactionId; $lstLocationInventoryReceived = $this->GetControl($strControlId); if (!$lstLocationInventoryReceived) { // Create the drop down list for this row in the datagrid // Use ActionParameter to specify the Id of the AssetTransaction $lstLocationInventoryReceived = new QListBox($this->dtgInventoryTransact, $strControlId); $lstLocationInventoryReceived->Name = 'Location To Receive'; $lstLocationInventoryReceived->ActionParameter = $objInventoryTransaction->InventoryTransactionId; $lstLocationInventoryReceived->AddItem('- Select One -', null); $objLocationArray = Location::LoadAllLocations(false, false, 'short_description', null, null, false, false, false, true); if ($objLocationArray) { foreach ($objLocationArray as $objLocation) { $lstLocationInventoryReceived->AddItem($objLocation->__toString(), $objLocation->LocationId); } } $lstLocationInventoryReceived->AddAction(new QEnterKeyEvent(), new QAjaxAction('btnReceiveInventoryTransaction')); $lstLocationInventoryReceived->AddAction(new QEnterKeyEvent(), new QTerminateAction()); } QApplication::AuthorizeControl($this->objReceipt, $lstLocationInventoryReceived, 2); return $lstLocationInventoryReceived->Render(false); } }
protected function lstDestinationLocation_Create() { $this->lstDestinationLocation = new QListBox($this); $this->lstDestinationLocation->Name = 'Location'; $this->lstDestinationLocation->Required = false; $this->lstDestinationLocation->AddItem('- Select One -', null); $objLocationArray = Location::LoadAllLocations(false, false, 'short_description', null, null, false, false, false, true); if ($objLocationArray) { foreach ($objLocationArray as $objLocation) { $objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId); $this->lstDestinationLocation->AddItem($objListItem); } } $this->lstDestinationLocation->SelectedIndex = $this->lstDestinationLocation->ItemCount == 2; $this->lstDestinationLocation->CausesValidation = false; }
protected function lstLocation_Create() { $this->lstLocation = new QListBox($this); $this->lstLocation->Name = 'Location'; $this->lstLocation->AddItem('- ALL -', null); foreach (Location::LoadAllLocations(false, false, 'short_description') as $objLocation) { $this->lstLocation->AddItem($objLocation->ShortDescription, $objLocation->LocationId); } if ($this->blnUseAjax) { $this->lstLocation->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this, 'btnSearch_Click')); } else { $this->lstLocation->AddAction(new QEnterKeyEvent(), new QServerControlAction($this, 'btnSearch_Click')); } $this->lstLocation->AddAction(new QEnterKeyEvent(), new QTerminateAction()); }
protected function lstLocation_Create() { $this->lstLocation = new QListBox($this); $this->lstLocation->Name = QApplication::Translate('Location'); $this->lstLocation->AddItem(QApplication::Translate('- ALL -'), null); foreach (Location::LoadAllLocations(false, false, 'short_description') as $objLocation) { $this->lstLocation->AddItem($objLocation->ShortDescription, $objLocation->LocationId); } $this->lstLocation->AddAction(new QEnterKeyEvent(), new QServerAction('btnSearch_Click')); $this->lstLocation->AddAction(new QEnterKeyEvent(), new QTerminateAction()); }
protected function lstLocation_Create() { $this->lstLocation = new QListBox($this); $this->lstLocation->Name = 'Location'; $this->lstLocation->Required = true; $this->lstLocation->AddItem('- Select One -', null); $objLocationArray = Location::LoadAllLocations(true, false, 'short_description'); if ($objLocationArray) { foreach ($objLocationArray as $objLocation) { $objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId); if ($objLocation->LocationId == 5) { $this->lstLocation->AddItemAt(1, $objListItem); } else { $this->lstLocation->AddItem($objListItem); } } } $this->lstLocation->TabIndex = 3; $this->intNextTabIndex++; }
protected function lstLocation_Create() { $this->lstLocation = new QListBox($this); $this->lstLocation->Name = 'Location'; $this->lstLocation->AddItem('- Select One -', null); $objLocationArray = Location::LoadAllLocations(false, false, 'short_description'); if ($objLocationArray) { foreach ($objLocationArray as $objLocation) { $objListItem = new QListItem($objLocation->__toString(), $objLocation->LocationId); $this->lstLocation->AddItem($objListItem); } } $this->lstLocation->CausesValidation = false; }
protected function lstLocation_Create() { $this->lstLocation = new QListBox($this); $this->lstLocation->Name = 'Location'; $this->lstLocation->AddItem('- ALL -', null); foreach (Location::LoadAllLocations(true, true, 'short_description') as $objLocation) { // Keep Shipped and To Be Received at the top of the list if ($objLocation->LocationId == 2 || $objLocation->LocationId == 5) { $this->lstLocation->AddItemAt(1, new QListItem($objLocation->ShortDescription, $objLocation->LocationId)); } else { $this->lstLocation->AddItem($objLocation->ShortDescription, $objLocation->LocationId); } } $this->lstLocation->AddAction(new QEnterKeyEvent(), new QServerAction('btnSearch_Click')); $this->lstLocation->AddAction(new QEnterKeyEvent(), new QTerminateAction()); }