by iatanasov
26. May 2010 07:54
<TRANSITION from="In Progress" to="Ready For Test">
<REASONS>
<DEFAULTREASON value="Ready for testing" />
</REASONS>
<FIELDS>
<FIELD refname="System.AssignedTo">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="[project]\QA" />
</ALLOWEDVALUES>
<COPY from="value" value="Team member" />
</FIELD>
</FIELDS>
<ACTIONS>
<ACTION value="Microsoft.VSTS.Actions.Checkin" />
<ACTION value="Microsoft.TeamSystem.Actions.Checkin" />
</ACTIONS>
</TRANSITION>
by iatanasov
26. February 2008 15:42
category.ParentCategoryId = @parentCategoryId
or
category.ParentCategoryId = null and this sql didn't return result, because expect category.ParentCategoryId is null.
Then I test another way to delive null value
if (parentCategoryId == null)
{
var query = from
category in this.productsHelpDataContext.Categories
orderby
category.Order ascending
where
category.ParentCategoryId == null
select category;
return query.Select(category => category);
}
else
{
var query = from
category in this.productsHelpDataContext.Categories
orderby
category.Order ascending
where
category.ParentCategoryId == parentCategoryId
select category;
return query.Select(category => category);
}
In other word LINQ to SQL strict follow sql script convention.
by iatanasov
29. January 2008 18:51
DECLARE @TEST VARCHAR(30)
SET @TEST = '1,2,3,47, 89, 67'
DECLARE @Current INT
DECLARE @LISTINT TABLE (Number INT)
WHILE (LEN(@TEST) > 0)
BEGIN
IF (Charindex(',', @TEST) > 0)
BEGIN
SET @Current = LEFT(@TEST, Charindex(',', @TEST) - 1)
SET @TEST = RIGHT(@TEST, LEN(@TEST) - Charindex(',', @TEST))
END
ELSE
BEGIN
SET @Current = CAST(@TEST AS INT)
SET @TEST = NULL
END
INSERT INTO @LISTINT VALUES(@Current)
SET @Current = NULL
END
SELECT Number
FROM @LISTINT