#副標=軟體團隊開發工具VSTS(2) #大標=VSTS應用在專案管理 #作者=文/歐宣修 ==程式1 =========== FormWorkItemQuery.cs private void Form1_Load(object sender, EventArgs e) { //Connect TFS TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer( ConfigurationManager.AppSettings["ServerPath"] ); //Get WorkItem Service this.store = (WorkItemStore)tfs.GetService(typeof (WorkItemStore)); string wiqlQuery = "Select ID, Title, State from Issue where [System.TeamProject] = '" + ConfigurationManager.AppSettings[ "TeamProjectID"] + "' order by ID"; //Execute the query and retrieve a collection of //workitems WorkItemCollection workitems = store.Query (wiqlQuery); //Set the result to DataGridView this.dataGridViewWorkItems.DataSource = workitems; } 記得變更App.config相關設定符合您的環境: App.config ================