コード例 #1
0
ファイル: ClientDashboardService.cs プロジェクト: evkap/DVS
		public Func<IQueryable<Order>, IOrderedQueryable<Order>> GetSortingOrder(ClientDashboardFilter filter, ClientDashboardSortingColumnName defaultColumn, bool defaultIsAsc)
		{
			var targetOrder = OrderItems.FirstOrDefault(e => e.ColumnName == filter.ColumnName && e.IsAsc == filter.IsAsc);
			if (targetOrder != null)
			{
				return targetOrder.SortingOrder;
			}
			return OrderItems.Single(e => e.ColumnName == defaultColumn && e.IsAsc == defaultIsAsc).SortingOrder;
		}
コード例 #2
0
ファイル: ClientDashboardService.cs プロジェクト: evkap/DVS
		private static Func<IQueryable<ActiveOrderItem>, IOrderedQueryable<ActiveOrderItem>> GetActiveOrderSortingDirection(ClientDashboardFilter filter, ClientDashboardSortingColumnName defaultColumn, bool defaultIsAsc)
		{
			var targetOrder = ActiveOrderItems.FirstOrDefault(e => e.ColumnName == filter.ColumnName && e.IsAsc == filter.IsAsc);
			return targetOrder != null ?
				targetOrder.SortingOrder : ActiveOrderItems.Single(e => e.ColumnName == defaultColumn && e.IsAsc == defaultIsAsc).SortingOrder;
		}