All pastes #769701 Raw Edit

Something

public text v1 · immutable
·published 2007-11-11 17:00 UTC
rendered paste body
 private void FillTree()
        {
            //Currently the report number is hard coded the input for the method. 
            //This will be changed later when I will connect all the forms together.
            int reportID = 3;

            //Get the TypedDataTable: GetGamesByReporterIDDataTable
            //uses reportID to select the specific games.
            //GetGamesByReporterIDDataTable has been retrieved through the WebService Class
            //and calls the method GetAssignedGames in the Facade.
            ReporterFacade reporter = WebService.ReporterFacadeService();
            gamereportTDS.GetGamesByReporterIDDataTable gamereporterTable = reporter.GetAssignedGames(reportID);


            //Loops through the rows of the gamereporterTable
            //The row type: gamereportTDS.GetGamesByReporterIDRow
            foreach (gamereportTDS.GetGamesByReporterIDRow row in gamereporterTable.Rows)
            {
                //Node text: string MatchDesc from the GameReport DataTable
                //Node tag: Integer GameID from the GameReport DataTable
                TreeNode matchNode = new TreeNode();
                matchNode.Text = row.MatchDesc;
                matchNode.Tag = row.GameID;
                //Creates Match Nodes and attaches it to TreeView1
                treeView1.Nodes.Add(matchNode);
                

            }
        }