当前位置: 首页>>代码示例>>PHP>>正文


PHP QQN::Myassets方法代码示例

本文整理汇总了PHP中QQN::Myassets方法的典型用法代码示例。如果您正苦于以下问题:PHP QQN::Myassets方法的具体用法?PHP QQN::Myassets怎么用?PHP QQN::Myassets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QQN的用法示例。


在下文中一共展示了QQN::Myassets方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetShareDetails

 protected function GetShareDetails()
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Sharedetails()->ReturnDate));
     if ($objClause = $this->dtrShareDetails->LimitClause) {
         array_push($objClauses, $this->dtrShareDetails->LimitClause);
     }
     if ($this->txtSearchTerm->Text == "") {
         $objCondition = QQ::Equal(QQN::Sharedetails()->Owner, $_SESSION['User']);
         $myassets = Sharedetails::QueryArray($objCondition, $objClauses);
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Sharedetails()->Asin, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Email, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->TakenDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->ReturnDate, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Sharedetails()->FullName, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
         $objDbResult = Sharedetails::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
     }
     //$this->dtrShareDetails->TotalItemCount = Sharedetails::QueryCount($condition);
     $this->arrShareDetails = $myassets;
     return $objCondition;
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:19,代码来源:postlogin.php

示例2: LendBasket

 protected function LendBasket()
 {
     foreach ($this->objBasket->GetBasket() as $item) {
         $objItem = Myassets::QuerySingle(QQ::Equal(QQN::Myassets()->Id, $item->Id));
         $objPerson = Peopledetails::QuerySingle(QQ::Equal(QQN::Peopledetails()->Id, $this->strBorrower));
         $objShareDetails = new Sharedetails();
         $objShareDetails->Asin = $objItem->Asin;
         $objShareDetails->Email = $objPerson->Email;
         /*Logic to get the return date*/
         $today = new QDateTime(QDateTime::Now);
         $daySpan = new QDateTimeSpan();
         $daySpan->AddDays(30);
         $returnDate = $today->Add($daySpan);
         $objShareDetails->TakenDate = QDateTime::Now(false);
         $objShareDetails->ReturnDate = $returnDate;
         $objShareDetails->Title = $objItem->Title;
         $objShareDetails->FullName = $objPerson->FullName;
         $objShareDetails->Save();
     }
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:20,代码来源:ShareAssets.php

示例3: LoadById

 /**
  * Load a single Myassets object,
  * by Id Index(es)
  * @param integer $intId
  * @return Myassets
  */
 public static function LoadById($intId)
 {
     return Myassets::QuerySingle(QQ::Equal(QQN::Myassets()->Id, $intId));
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:10,代码来源:MyassetsGen.class.php

示例4: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Myassets-based QQNode.
  * It will also verify that it is a proper Myassets-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'myassets') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "myassets".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::Myassets()->Id;
                 case 'Asin':
                     return QQN::Myassets()->Asin;
                 case 'DetailPageURL':
                     return QQN::Myassets()->DetailPageURL;
                 case 'Title':
                     return QQN::Myassets()->Title;
                 case 'ProductGroup':
                     return QQN::Myassets()->ProductGroup;
                 case 'ImageURL':
                     return QQN::Myassets()->ImageURL;
                 case 'Author':
                     return QQN::Myassets()->Author;
                 case 'NumberOfPages':
                     return QQN::Myassets()->NumberOfPages;
                 case 'Publisher':
                     return QQN::Myassets()->Publisher;
                 case 'Isbn':
                     return QQN::Myassets()->Isbn;
                 case 'Actor':
                     return QQN::Myassets()->Actor;
                 case 'Director':
                     return QQN::Myassets()->Director;
                 case 'RunningTime':
                     return QQN::Myassets()->RunningTime;
                 case 'Artist':
                     return QQN::Myassets()->Artist;
                 case 'Label':
                     return QQN::Myassets()->Label;
                 case 'NumberOfDiscs':
                     return QQN::Myassets()->NumberOfDiscs;
                 case 'Tracks':
                     return QQN::Myassets()->Tracks;
                 case 'Language':
                     return QQN::Myassets()->Language;
                 case 'Genre':
                     return QQN::Myassets()->Genre;
                 case 'Owner':
                     return QQN::Myassets()->Owner;
                 default:
                     throw new QCallerException('Simple Property not found in MyassetsDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:87,代码来源:MyassetsDataGridGen.class.php

示例5: catch

<?php

include_once 'prepend.inc.php';
$cndASIN = QQ::AndCondition(QQ::Equal(QQN::Myassets()->Asin, $_ITEM->ASIN), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
$cndTitle = QQ::AndCondition(QQ::Equal(QQN::Myassets()->Title, $_ITEM->ASIN), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
$cntASIN = Myassets::QueryCount($cndASIN);
$cntTitle = Myassets::QueryCount($cndTitle);
if ($cntASIN != 0 || $cntTitle != 0) {
    $owned = true;
} else {
    $owned = false;
}
?>
<table>
	<tr>
		<td><?php 
try {
    if (isset($_ITEM->MediumImage->Url)) {
        $img = $_ITEM->MediumImage->Url;
    } else {
        $img = '../assets/images/48x48/help.png';
    }
} catch (Exception $e) {
    $img = '../../assets/images/48x48/help.png';
}
?>
 <img src='<?php 
_p($img);
?>
' width=108px height=160px></img></td>
		<td>
开发者ID:sarapsg,项目名称:prayuj,代码行数:31,代码来源:amazonresult.tpl.php

示例6: GetAssetsData

 private function GetAssetsData($productgroup)
 {
     $objClauses = array();
     array_push($objClauses, QQ::OrderBy(QQN::Myassets()->Title));
     if ($objClause = $this->dtrMyLibrary->LimitClause) {
         array_push($objClauses, $this->dtrMyLibrary->LimitClause);
     }
     if ($this->txtSearchTerm->Text == "") {
         $condition = QQ::AndCondition(QQ::Equal(QQN::Myassets()->ProductGroup, $productgroup), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
         $arrResult = Myassets::QueryArray($condition, $objClauses);
         $this->dtrMyLibrary->TotalItemCount = Myassets::QueryCount($condition);
         $this->dtrMyLibrary->DataSource = $arrResult;
     } else {
         $objCondition = QQ::AndCondition(QQ::OrCondition(QQ::Like(QQN::Myassets()->Title, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Author, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Artist, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Actor, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Director, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Publisher, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Label, '%' . $this->txtSearchTerm->Text . '%'), QQ::Like(QQN::Myassets()->Isbn, '%' . $this->txtSearchTerm->Text . '%')), QQ::Equal(QQN::Myassets()->ProductGroup, $productgroup), QQ::Equal(QQN::Myassets()->Owner, $_SESSION['User']));
         $objDbResult = Myassets::QueryArray($objCondition, $objClauses);
         $myassets = $objDbResult;
         $this->dtrMyLibrary->TotalItemCount = Myassets::QueryCount($objCondition);
         if ($this->dtrMyLibrary->TotalItemCount > 0) {
             $this->dtrMyLibrary->DataSource = $myassets;
         } else {
             QApplicationBase::DisplayAlert('No ' . $productgroup . 's exists for the searched term');
         }
     }
 }
开发者ID:sarapsg,项目名称:prayuj,代码行数:24,代码来源:MyLibrary.php


注:本文中的QQN::Myassets方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。