Exemple #1
0
        private void init_combo()
        {
            try
            {
                comboBoxNameSeason.Items.Clear();

                List <STInfoSeason> lst = clIS.GetListSeason();

                foreach (STInfoSeason item in lst)
                {
                    comboBoxNameSeason.Items.Add(item.nameseason);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Exemple #2
0
        private void init_data()
        {
            string text = null;

            try
            {
                g_f = false;

                dataGridViewSeason.Rows.Clear();

                list = cis.GetListSeason();

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

                    dataGridViewSeason.Rows.Add(list.Count);

                    for (int i = 0; i < list.Count; i++)
                    {
                        if (list[i].flag == 1)
                        {
                            dataGridViewSeason.Rows[i].DefaultCellStyle.BackColor = Color.LawnGreen;
                        }

                        dataGridViewSeason.Rows[i].Cells[0].Value = list[i].idseason.ToString();

                        dataGridViewSeason.Rows[i].Cells[1].Value = list[i].nameseason;

                        dataGridViewSeason.Rows[i].Cells[2].Value = list[i].datebegin.ToLongDateString();

                        dataGridViewSeason.Rows[i].Cells[3].Value = list[i].dateend.ToLongDateString();

                        dataGridViewSeason.Rows[i].Cells[4].Value = list[i].cntdivision.ToString();;

                        dataGridViewSeason.Rows[i].Cells[5].Value = list[i].cntteam.ToString();

                        if (list[i].flag == 1)
                        {
                            text = "текущий";
                        }
                        if (list[i].flag == 0)
                        {
                            if (list[i].flagend == 1)
                            {
                                text = "завершен";
                            }
                            if (list[i].flagend == 0)
                            {
                                text = "в процессе";
                            }
                        }

                        dataGridViewSeason.Rows[i].Cells[6].Value = text;

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

                    dataGridViewSeason.AllowUserToAddRows = false;
                }
                else
                {
                    dataGridViewSeason.AllowUserToAddRows = false;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }