protected function dtgFedexServiceType_Bind()
 {
     // Because we want to enable pagination AND sorting, we need to setup the $objClauses array to send to LoadAll()
     // Remember!  We need to first set the TotalItemCount, which will affect the calcuation of LimitClause below
     $this->dtgFedexServiceType->TotalItemCount = FedexServiceType::CountAll();
     // Setup the $objClauses Array
     $objClauses = array();
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->dtgFedexServiceType->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->dtgFedexServiceType->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be the array of all FedexServiceType objects, given the clauses above
     $this->dtgFedexServiceType->DataSource = FedexServiceType::LoadAll($objClauses);
 }
 protected function lstFedexServiceType_Create()
 {
     $this->lstFedexServiceType = new QListBox($this);
     $this->lstFedexServiceType->Name = QApplication::Translate('Fedex Service Type');
     $this->lstFedexServiceType->AddItem(QApplication::Translate('- Select One -'), null);
     $objFedexServiceTypeArray = FedexServiceType::LoadAll();
     if ($objFedexServiceTypeArray) {
         foreach ($objFedexServiceTypeArray as $objFedexServiceType) {
             $objListItem = new QListItem($objFedexServiceType->__toString(), $objFedexServiceType->FedexServiceTypeId);
             if ($this->objFedexShipment->FedexServiceType && $this->objFedexShipment->FedexServiceType->FedexServiceTypeId == $objFedexServiceType->FedexServiceTypeId) {
                 $objListItem->Selected = true;
             }
             $this->lstFedexServiceType->AddItem($objListItem);
         }
     }
 }
 public function dtgFedexServiceType_Bind()
 {
     // Get Total Count b/c of Pagination
     $this->dtgFedexServiceType->TotalItemCount = FedexServiceType::CountAll();
     $objClauses = array();
     if ($objClause = $this->dtgFedexServiceType->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     if ($objClause = $this->dtgFedexServiceType->LimitClause) {
         array_push($objClauses, $objClause);
     }
     $this->dtgFedexServiceType->DataSource = FedexServiceType::LoadAll($objClauses);
 }
예제 #4
0
 protected function lstFxServiceType_Update()
 {
     $this->lstFxServiceType->RemoveAllItems();
     $this->lstFxServiceType->Enabled = false;
     $this->lstFxServiceType->Required = false;
     if ($this->lstCourier->SelectedValue == 1 && $this->lstToAddress->SelectedValue && $this->lstFromAddress->SelectedValue && $this->lstShippingAccount->SelectedValue) {
         $this->lstFxServiceType->Enabled = true;
         $this->lstFxServiceType->Required = true;
         $this->lstFxServiceType->AddItem('- Select One -', null);
         $objFedexServiceTypeArr = FedexServiceType::LoadAll(QQ::Clause(QQ::OrderBy(QQN::FedexServiceType()->ShortDescription)));
         if ($objFedexServiceTypeArr) {
             foreach ($objFedexServiceTypeArr as $objFedexServiceType) {
                 $objListItem = new QListItem($objFedexServiceType->ShortDescription, $objFedexServiceType->FedexServiceTypeId);
                 if ($this->objShipment->FedexServiceTypeId == $objFedexServiceType->FedexServiceTypeId) {
                     $objListItem->Selected = true;
                 }
                 $this->lstFxServiceType->AddItem($objListItem);
             }
         }
     }
 }