public OnlineBroadcast(/*string remoteConn,*/ SqlConnection localBaseCon, MainForm parent)
            : base(localBaseCon, parent.competitionTitle, null)
        {
            InitializeComponent();
            this.parent = parent;
            //this.cn = cn;
            //XmlClientWrapper wrapper;
            //compForService = StaticClass.ParseServString(remoteConn, out wrapper);
            //if (wrapper != null)
            //{
            //    client = wrapper.CreateClient(cn);
            //    compForService = wrapper.CompetitionId;
            //    remoteConnection = null;
            //}
            //else if (compForService == null)
            //    remoteConnection = new SqlConnection(remoteConn);
            //else
            //    remoteConn = null;
            ////if (this.cn.State != ConnectionState.Open)
            ////    this.cn.Open();

            SortingClass.CheckColumn("Participants", "changed", "BIT NOT NULL DEFAULT 1", this.cn);
            SortingClass.CheckColumn("lists", "changed", "BIT NOT NULL DEFAULT 1", this.cn);
            SortingClass.CheckColumn("routeResults", "changed", "BIT NOT NULL DEFAULT 1", this.cn);
            SortingClass.CheckColumn("speedResults", "changed", "BIT NOT NULL DEFAULT 1", this.cn);
            SortingClass.CheckColumn("boulderResults", "changed", "BIT NOT NULL DEFAULT 1", this.cn);
            StaticClass.CheckChangedTriggers(this.cn);

            da = new SqlDataAdapter(new SqlCommand(
                                        "SELECT l.iid AS [№],l.style AS Вид,g.name AS Группа,l.round AS Раунд, " +
                                        "l.routeNumber AS [Число трасс], " +
                                        "l.online AS [Доступ на сайте],l.allowView AS [Прямая трансляция], g.iid gr_id " +
                                        "FROM lists l(NOLOCK) INNER JOIN groups g(NOLOCK) ON l.group_id=g.iid " +
#if FULL
                                        " WHERE l.style IN ('Трудность','Скорость','Боулдеринг') " +
#else
                                        " WHERE l.style = 'Скорость' " +
#endif
                                        "ORDER BY " +
                                        "l.iid DESC", this.cn));
            try { da.Fill(dt); }
            catch { }
            dg.DataSource = dt;
            dg.Columns["gr_id"].Visible = false;
            da.UpdateCommand            = new SqlCommand("UPDATE lists SET online=@onl WHERE iid=@iid", this.cn);
            da.UpdateCommand.Parameters.Add("@onl", SqlDbType.Bit, 1, "Доступ на сайте");
            da.UpdateCommand.Parameters.Add("@iid", SqlDbType.Int, 4, "№");
            try { dg.Columns["Прямая трансляция"].ReadOnly = true; }
            catch { }
#if !DEBUG
            cbLoadJudges.Visible = false;
#endif
        }