예제 #1
0
 protected function dtrAssetHistory_Bind()
 {
     // Get Total Count for Pagination
     $this->dtrAssetHistory->TotalItemCount = AssetTransaction::CountAssetTransaction($this->ctlAssetEdit->objAsset->AssetId);
     $objClauses = array();
     $objClause = QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate, false);
     array_push($objClauses, $objClause);
     $objCondition = QQ::AndCondition(QQ::Equal(QQN::AssetTransaction()->AssetId, $this->ctlAssetEdit->objAsset->AssetId), QQ::OrCondition(QQ::In(QQN::AssetTransaction()->Transaction->TransactionTypeId, array(1, 2, 3, 6, 7, 8, 9, 10, 11))));
     $intItemsPerPage = $this->dtrAssetHistory->ItemsPerPage;
     $intItemOffset = ($this->dtrAssetHistory->PageNumber - 1) * $intItemsPerPage;
     $arrDataSource = array_slice(AssetTransaction::QueryArray($objCondition, $objClauses), $intItemOffset, $intItemsPerPage);
     $this->dtrAssetHistory->DataSource = $arrDataSource;
 }