日期:2014-05-17 浏览次数:20466 次
<div class="orderType">
<ul>
<a href="#"><li class="current" id="defaultSort">默认排序</li></a>
<a href="#"><li id="salerCredit">卖家信用</li></a>
<a class="current" href="#"><li id="priceSort">价格</li></a>
<a href="#"><li id="dateSort">最新发布</li></a>
</ul>
</div>
public static IQueryable<T> DataSorting<T>(IQueryable<T> source, string orderColumn, string sortDirection)
{
string sortingDir = string.Empty;
if (sortDirection.ToUpper().Trim() == "ASC")
sortingDir = "OrderBy";
else if (sortDirection.ToUpper().Trim() == "DESC")