Exemplo n.º 1
0
        /* инициализаци¤ списка групп */
        private void init_combo_group()
        {
            try
            {
                if (gType == 2)
                {
                    comboBoxGroup.Enabled = false;
                }
                else
                {
                    comboBoxGroup.Items.Clear();

                    clGroup = new CGroup(connect);
                    List <STGroup> list = clGroup.GetListGroup(IS.idseason, gDiv, gStage);

                    if (list.Count > 0)
                    {
                        comboBoxGroup.Items.Add("");

                        comboBoxGroup.Enabled = true;

                        foreach (STGroup item in list)
                        {
                            comboBoxGroup.Items.Add(item.namegroup);
                        }
                    }
                    else
                    {
                        comboBoxGroup.Enabled = false;
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Exemplo n.º 2
0
        private void init_data()
        {
            try
            {
                g_f = false;

                dataGridViewGroups.Rows.Clear();

                list = clGroup.GetListGroup(IS.idseason);

                if (list.Count > 0)
                {
                    g_f = true;

                    dataGridViewGroups.Rows.Add(list.Count);

                    for (int i = 0; i < list.Count; i++)
                    {
                        dataGridViewGroups.Rows[i].Cells[0].Value = (i + 1).ToString();

                        dataGridViewGroups.Rows[i].Cells[1].Value = list[i].namegroup;

                        clDivision = new CDivision(connect, IS.idseason, list[i].iddivision);
                        dataGridViewGroups.Rows[i].Cells[2].Value = clDivision.stDiv.name;

                        clScheme = new CScheme(connect, IS.idseason, list[i].iddivision, list[i].idstage);
                        dataGridViewGroups.Rows[i].Cells[3].Value = clScheme.stScheme.namestage;

                        dataGridViewGroups.Rows[i].Cells[4].Value = list[i].cntteam.ToString();

                        dataGridViewGroups.Rows[i].Cells[5].Value = list[i].cntteamnext.ToString();

                        clCompgroup = new CCompositionGroup(connect, IS.idseason, list[i].iddivision,
                                                            list[i].idgroup);

                        dataGridViewGroups.Rows[i].Cells[6].Value =
                            clCompgroup.lstCompositionGroup.Count.ToString();

                        dataGridViewGroups.Rows[i].Cells[7].Value = list[i].idgroup.ToString();

                        if (flawour.Equals(list[i]))
                        {
                            gpos = i;
                        }
                    }

                    dataGridViewGroups.AllowUserToAddRows = false;
                }
                else
                {
                    dataGridViewGroups.AllowUserToAddRows = false;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Exemplo n.º 3
0
        private void init_combo_group(int id)
        {
            try
            {
                comboBoxGroup.Items.Clear();

                List <STGroup> lst = clGroup.GetListGroup(IS.idseason, id);

                foreach (STGroup item in lst)
                {
                    comboBoxGroup.Items.Add(item.namegroup);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Exemplo n.º 4
0
        private void init_list_group(int id)
        {
            try
            {
                checkedListBoxGroup.Items.Clear();

                CGroup         clGroup = new CGroup(connect);
                List <STGroup> lst     = clGroup.GetListGroup(IS.idseason, id);

                foreach (STGroup group in lst)
                {
                    checkedListBoxGroup.Items.Add(group.namegroup);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Exemplo n.º 5
0
        private void comboBoxDivision_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (comboBoxDivision.Text.Length > 0)
                {
                    checkedListBoxGroupR1.Items.Clear();

                    string text = comboBoxDivision.Text.Trim();
                    clDiv = new CDivision(connect, IS.idseason, text);

                    clGroup = new CGroup(connect);
                    List <STGroup> lst = clGroup.GetListGroup(IS.idseason, clDiv.stDiv.id);

                    foreach (STGroup item in lst)
                    {
                        checkedListBoxGroupR1.Items.Add(item.namegroup, true);
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }