This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/utilities"; | |
$media-names: desktop tablet handheld-landscape handheld !default; | |
#container { | |
margin: 0 auto; | |
@include pie-clearfix; | |
} | |
.row-base { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static TResult IfNotNull<T, TResult>(this T input, Func<T, TResult> action, TResult valueIfNull) | |
where T : class | |
{ | |
if (input != null) return action(input); | |
else return valueIfNull; | |
} | |
public static TResult IfNotNull<T, TResult>(this T input, Func<T, TResult> action) | |
where T : class | |
where TResult : class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
Q AS ( | |
SELECT ResourceClaimId, ResourceName AS ResourceClaim, ParentResourceClaimId, 0 As Lvl FROM ResourceClaims WHERE ParentResourceClaimId IS NULL | |
UNION ALL | |
SELECT ResourceClaims.ResourceClaimId, ResourceClaims.ResourceName, ResourceClaims.ParentResourceClaimId, Lvl+1 | |
FROM ResourceClaims JOIN Q ON ResourceClaims.ParentResourceClaimId = Q.ResourceClaimId | |
) | |
SELECT Q.ResourceClaim, STUFF((SELECT ', ' + Q1.ResourceClaim FROM Q Q1 WHERE Q.ResourceClaimId = Q1.ParentResourceClaimId ORDER BY Q1.ResourceClaim FOR XML PATH('')), 1, 2, '') AS Resources | |
FROM Q | |
WHERE Q.Lvl = 0 |