Создание веб-приложения, сочетающего в себе проектирование и создание баз данных, работу со сторонними форматами данных, программирование в NET и веб-разработку, страница 105

            tCell = new TableCell();

            tCell.Text = "Счет";

            tRow.Cells.Add(tCell);

            tCell = new TableCell();

            tCell.Text = "Статистика (Л-СМ-СИ-СК)";

            tRow.Cells.Add(tCell);

            tCell = new TableCell();

            tCell.Text = "";

            tRow.Cells.Add(tCell);

            tRow.BackColor = System.Drawing.Color.LightBlue;

            tRow.ForeColor = System.Drawing.Color.Black;

            for (int i = 0; i < rowCnt; i++)

            {

                int flag = 0;

                // Create new row and add it to the table.

                tRow = new TableRow();

                Table1.Rows.Add(tRow);

                // Create a new cell and add it to the row.

                tCell = new TableCell();

                tCell.Text = GridView2.Rows[i].Cells[0].Text;

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                tCell.Text = GridView2.Rows[i].Cells[1].Text;

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                tCell.Text = GridView2.Rows[i].Cells[2].Text;

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                tCell.Text = "-";

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                tCell.Text = GridView2.Rows[i].Cells[3].Text;

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                string result = PowerPlayUserProvider.getTabForGame(Convert.ToInt32(GridView2.Rows[i].Cells[0].Text), "khl20122013_1");

                if (result  != null)

                {

                    tCell.Text = result;

                }

                tRow.Cells.Add(tCell);

                tCell = new TableCell();

                PowerPlayUserProvider.getStatsOfTeamsByGame(GridView1, GridView2.Rows[i].Cells[2].Text, Convert.ToInt32(GridView2.Rows[i].Cells[0].Text), "khl20122013_1");

                for (int c = 33; c < 37; c++)

                {

                    if (GridView1.Rows.Count == 0 || GridView1.Rows[0].Cells[c].Text == "" || GridView1.Rows[0].Cells[c].Text == "&nbsp;")

                    {

                        if (GridView2.Rows[i].Cells[2].Text.Equals(team))

                        {

                            flag = 1;

                            Literal literal = new Literal();

                            literal.Text = "<img src=\"/img/not.png\" height=\"15px\" />";

                            tCell.Controls.Add(literal);

                        }

                        else

                        {

                            Literal literal = new Literal();

                            literal.Text = "<img src=\"/img/not.png\" height=\"15px\" />";

                            tCell.Controls.Add(literal);

                        }

                    }

                    else

                    {

                        Literal literal = new Literal();

                        literal.Text = "<img src=\"/img/yes.png\" height=\"15px\" />";

                        tCell.Controls.Add(literal);

                    }

                }

                Literal vs = new Literal();

                vs.Text = " - ";

                tCell.Controls.Add(vs);

                PowerPlayUserProvider.getStatsOfTeamsByGame(GridView1, GridView2.Rows[i].Cells[3].Text, Convert.ToInt32(GridView2.Rows[i].Cells[0].Text), "khl20122013_1");

                for (int c = 33; c < 37; c++)

                {

                    if (GridView1.Rows.Count == 0 || GridView1.Rows[0].Cells[c].Text == "" || GridView1.Rows[0].Cells[c].Text == "&nbsp;")