dt.Clear();
da = new MySqlDataAdapter(sql, conn);
da.Fill(dt);
report.DataSource = dt;
report.DataBind();
if (report.Rows.Count > 0)
player_id = Convert.ToInt32(report.Rows[0].Cells[0].Text);
else throw new Exception();
/*НАХОДИМ ВСЕХ ИГРОКОВ В ЛИГЕ ПО ЕГО ПОКАЗАТЕЛЮ И АМПЛУА И УЗНАЕМ ЕГО ПОЗИЦИЮ*/
sql = "select " + table_goalie_stats + ".player,players.name,teams.abb,sum(" + table_goalie_stats + ".gp) as GP,sum(" + table_goalie_stats + ".gs) as GS,sum(" + table_goalie_stats + ".w) as W,sum(" + table_goalie_stats + ".w_ot) as WOT,sum(" + table_goalie_stats + ".w_so) as WSO,sum(" + table_goalie_stats + ".l) as L,sum(" + table_goalie_stats + ".l_ot) as LOT,sum(" + table_goalie_stats + ".l_so) as LSO,sum(" + table_goalie_stats + ".so) as SO, sum(" + table_goalie_stats + ".so_sv) as SOSV,ROUND(sum(" + table_goalie_stats + ".so_sv)/sum(" + table_goalie_stats + ".so)*100,2) as SOSV_per,sum(" + table_goalie_stats + ".sa) as SA,sum(" + table_goalie_stats + ".ga) as GA,ROUND(60*sum(" + table_goalie_stats + ".ga)/sum(" + table_goalie_stats + ".toi),2) as GAA,ROUND((sum(" + table_goalie_stats + ".sa)-sum(" + table_goalie_stats + ".ga))/sum(" + table_goalie_stats + ".sa)*100,2) as SV_per,sum(" + table_goalie_stats + ".sho) as SHO,sum(" + table_goalie_stats + ".g) as G,sum(" + table_goalie_stats + ".a) as A,sum(" + table_goalie_stats + ".pim) as PIM,ROUND(sum(" + table_goalie_stats + ".toi),2) as TOI from " + table_goalie_stats + " inner join teams on teams.id = " + table_goalie_stats + ".team inner join players on players.id = " + table_goalie_stats + ".player group by " + table_goalie_stats + ".player ORDER by " + indicator + " " + sort + "";
dt.Clear();
da = new MySqlDataAdapter(sql, conn);
da.Fill(dt);
report.DataSource = dt;
report.DataBind();
for (int i = 0; i < report.Rows.Count; i++)
{
if (Convert.ToInt32(report.Rows[i].Cells[0].Text) == player_id) pos = i + 1;
}
/*ВЫБИРАЕМ КОНКРЕТНОГО ИГРОКА*/
sql = "select " + table_goalie_stats + ".player,players.name,teams.abb,sum(" + table_goalie_stats + ".gp) as GP,sum(" + table_goalie_stats + ".gs) as GS,sum(" + table_goalie_stats + ".w) as W,sum(" + table_goalie_stats + ".w_ot) as WOT,sum(" + table_goalie_stats + ".w_so) as WSO,sum(" + table_goalie_stats + ".l) as L,sum(" + table_goalie_stats + ".l_ot) as LOT,sum(" + table_goalie_stats + ".l_so) as LSO,sum(" + table_goalie_stats + ".so) as SO, sum(" + table_goalie_stats + ".so_sv) as SOSV,ROUND(sum(" + table_goalie_stats + ".so_sv)/sum(" + table_goalie_stats + ".so)*100,2) as SOSV_per,sum(" + table_goalie_stats + ".sa) as SA,sum(" + table_goalie_stats + ".ga) as GA,ROUND(60*sum(" + table_goalie_stats + ".ga)/sum(" + table_goalie_stats + ".toi),2) as GAA,ROUND((sum(" + table_goalie_stats + ".sa)-sum(" + table_goalie_stats + ".ga))/sum(" + table_goalie_stats + ".sa)*100,2) as SV_per,sum(" + table_goalie_stats + ".sho) as SHO,sum(" + table_goalie_stats + ".g) as G,sum(" + table_goalie_stats + ".a) as A,sum(" + table_goalie_stats + ".pim) as PIM,ROUND(sum(" + table_goalie_stats + ".toi),2) as TOI from " + table_goalie_stats + " inner join teams on teams.id = " + table_goalie_stats + ".team inner join players on players.id = " + table_goalie_stats + ".player and " + table_goalie_stats + ".player = " + player_id + " group by player";
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.