Ejemplo n.º 1
0
 protected function dtgCourier_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->dtgCourier->TotalItemCount = Courier::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->dtgCourier->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->dtgCourier->LimitClause) {
         array_push($objClauses, $objClause);
     }
     // Set the DataSource to be the array of all Courier objects, given the clauses above
     $this->dtgCourier->DataSource = Courier::LoadAll($objClauses);
 }
Ejemplo n.º 2
0
 protected function Form_PreRender()
 {
     $this->dtgCourier->TotalItemCount = Courier::CountAll();
     if ($this->dtgCourier->TotalItemCount == 0) {
         $this->dtgCourier->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgCourier->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgCourier->LimitClause) {
             array_push($objClauses, $objClause);
         }
         $this->dtgCourier->DataSource = Courier::LoadAll($objClauses);
         $this->dtgCourier->ShowHeader = true;
     }
 }
Ejemplo n.º 3
0
 public function dtgCourier_Bind()
 {
     // Get Total Count b/c of Pagination
     $this->dtgCourier->TotalItemCount = Courier::CountAll();
     $objClauses = array();
     if ($objClause = $this->dtgCourier->OrderByClause) {
         array_push($objClauses, $objClause);
     }
     if ($objClause = $this->dtgCourier->LimitClause) {
         array_push($objClauses, $objClause);
     }
     $this->dtgCourier->DataSource = Courier::LoadAll($objClauses);
 }
Ejemplo n.º 4
0
 protected function Form_PreRender()
 {
     $objExpansionMap[ShippingAccount::ExpandCourier] = true;
     // Get Total Count b/c of Pagination
     $this->dtgShippingAccount->TotalItemCount = ShippingAccount::CountAll();
     if ($this->dtgShippingAccount->TotalItemCount == 0) {
         $this->dtgShippingAccount->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgShippingAccount->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgShippingAccount->LimitClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = QQ::Expand(QQN::ShippingAccount()->Courier)) {
             array_push($objClauses, $objClause);
         }
         $this->dtgShippingAccount->DataSource = ShippingAccount::LoadAll($objClauses);
         $this->dtgShippingAccount->ShowHeader = true;
     }
     $this->dtgCourier->TotalItemCount = Courier::CountAll();
     if ($this->dtgCourier->TotalItemCount == 0) {
         $this->dtgCourier->ShowHeader = false;
     } else {
         $objClauses = array();
         if ($objClause = $this->dtgCourier->OrderByClause) {
             array_push($objClauses, $objClause);
         }
         if ($objClause = $this->dtgCourier->LimitClause) {
             array_push($objClauses, $objClause);
         }
         $this->dtgCourier->DataSource = Courier::LoadAll($objClauses);
         $this->dtgCourier->ShowHeader = true;
     }
 }