Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# FOR Loop Speed Issue Pin
Mycroft Holmes18-Jun-14 22:31
professionalMycroft Holmes18-Jun-14 22:31 
GeneralRe: C# FOR Loop Speed Issue Pin
exfosys18-Jun-14 22:42
exfosys18-Jun-14 22:42 
GeneralRe: C# FOR Loop Speed Issue Pin
Mycroft Holmes18-Jun-14 22:54
professionalMycroft Holmes18-Jun-14 22:54 
GeneralRe: C# FOR Loop Speed Issue Pin
exfosys18-Jun-14 23:50
exfosys18-Jun-14 23:50 
GeneralRe: C# FOR Loop Speed Issue Pin
PIEBALDconsult19-Jun-14 4:11
mvePIEBALDconsult19-Jun-14 4:11 
SuggestionRe: C# FOR Loop Speed Issue Pin
Nathan Minier20-Jun-14 3:02
professionalNathan Minier20-Jun-14 3:02 
AnswerRe: C# FOR Loop Speed Issue Pin
V.19-Jun-14 4:13
professionalV.19-Jun-14 4:13 
QuestionFields in TFS WorkItem not able to change values Pin
hanusri18-Jun-14 7:20
hanusri18-Jun-14 7:20 
I am using the following code

C#
//Set the URi Value
        Uri collectionUri = new Uri(@"http://XXX.XXX.XXX.XXX:8080/tfs/projectcollection");

        //Initialize the TeamProjection Collection
        TfsTeamProjectCollection teamProjectCollection =
           new TfsTeamProjectCollection(collectionUri, new NetworkCredential(@"user","userpassword"));

        //Sign in to the TFS Project
        teamProjectCollection.EnsureAuthenticated();            

        WorkItemStore workItemStore = teamProjectCollection.GetService<WorkItemStore>();

        string wiql = "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State] FROM WorkItems " + 
            "WHERE [System.TeamProject] = 'Pathway' " + "AND  [System.State] = 'System Test Complete' " + 
            "AND  [Sagitec.Common.TestPhase] = '4.B – System Testing' ORDER BY [System.Id]";

        WorkItemCollection workItemCollection = workItemStore.Query( wiql);

        foreach (WorkItem wi in workItemCollection)
        {
            wi.Fields["Assigned To"].Value = "Srikanth";
            wi.Fields["State"].Value = "Ready for Client Review";
            wi.Fields["Reason"].Value = "Ready for Client Review";

            MessageBox.Show(wi.Fields["Assigned To"].Value + " + " + wi.Fields["State"].Value + " + " + wi.Fields["Reason"].Value);
        }

Now, when i see the values of respective Fields in workitem object, they are not holding the values that I have set. Instead they have value which is already there in the workitem. I checked about ByPassRules. But I dont see the enum WorkItemStoreFlags in my namespace. Can you please help me in setting the values for fields values in my workitem?
QuestionTCP connection to specific client Pin
kruegs3518-Jun-14 4:49
kruegs3518-Jun-14 4:49 
AnswerRe: TCP connection to specific client Pin
Eddy Vluggen18-Jun-14 5:15
professionalEddy Vluggen18-Jun-14 5:15 
GeneralRe: TCP connection to specific client Pin
kruegs3518-Jun-14 5:57
kruegs3518-Jun-14 5:57 
AnswerRe: TCP connection to specific client Pin
ZurdoDev18-Jun-14 8:29
professionalZurdoDev18-Jun-14 8:29 
AnswerRe: TCP connection to specific client Pin
jschell18-Jun-14 11:15
jschell18-Jun-14 11:15 
QuestionCorrect Syntax; No Result? Pin
Zachery Hysong17-Jun-14 7:50
Zachery Hysong17-Jun-14 7:50 
AnswerRe: Correct Syntax; No Result? Pin
Eddy Vluggen17-Jun-14 8:05
professionalEddy Vluggen17-Jun-14 8:05 
GeneralRe: Correct Syntax; No Result? Pin
Zachery Hysong17-Jun-14 8:22
Zachery Hysong17-Jun-14 8:22 
GeneralRe: Correct Syntax; No Result? Pin
Eddy Vluggen17-Jun-14 8:50
professionalEddy Vluggen17-Jun-14 8:50 
AnswerRe: Correct Syntax; No Result? Pin
OriginalGriff17-Jun-14 8:21
mveOriginalGriff17-Jun-14 8:21 
GeneralRe: Correct Syntax; No Result? Pin
Zachery Hysong17-Jun-14 8:23
Zachery Hysong17-Jun-14 8:23 
GeneralRe: Correct Syntax; No Result? Pin
OriginalGriff17-Jun-14 8:29
mveOriginalGriff17-Jun-14 8:29 
AnswerRe: Correct Syntax; No Result? Pin
Richard Deeming17-Jun-14 8:26
mveRichard Deeming17-Jun-14 8:26 
QuestionHow do I get a list of all windows user groups Pin
sneezesnoeze16-Jun-14 22:48
sneezesnoeze16-Jun-14 22:48 
AnswerRe: How do I get a list of all windows user groups Pin
Eddy Vluggen17-Jun-14 3:03
professionalEddy Vluggen17-Jun-14 3:03 
GeneralRe: How do I get a list of all windows user groups Pin
sneezesnoeze17-Jun-14 8:02
sneezesnoeze17-Jun-14 8:02 
GeneralRe: How do I get a list of all windows user groups Pin
Eddy Vluggen17-Jun-14 8:08
professionalEddy Vluggen17-Jun-14 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.