예제 #1
0
파일: Draft.cs 프로젝트: Pavlo7/NBLStats
        private void Draft_Load(object sender, EventArgs e)
        {
            try
            {
                clWork = new CDraft(connect);

                this.WindowState = FormWindowState.Maximized;

                dataGridViewDraft.AutoResizeColumns();

                init_data();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
예제 #2
0
파일: DlgDraft.cs 프로젝트: Pavlo7/NBLStats
        private void DlgDraft_Load(object sender, EventArgs e)
        {
            string text = null;

            try
            {
                clWork   = new CDraft(connect);
                clPlayer = new CPlayer(connect);
                clTeam   = new CTeam(connect);

                view_param.idseason = null;

                init_combo_players();
                init_combo_team();

                if (oldData != null)
                {
                    mode = 1;
                }
                else
                {
                    mode = 0;
                }

                if (mode == 0)
                {
                    text = "Добавить игрока на драфт";

                    checkBoxOut.CheckState        = CheckState.Unchecked;
                    dateTimePickerDateOut.Enabled = false;
                }
                if (mode == 1)
                {
                    text = "Редактировать игрока на драфте";
                    set_data((STDraftPlayer)oldData);
                }

                this.Text = text;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
예제 #3
0
        private void DlgTeamsPlayer_Load(object sender, EventArgs e)
        {
            string text = null;

            try
            {
                clWork  = new CEntryPlayers(connect);
                clTeam  = new CTeam(connect);
                clDraft = new CDraft(connect);

                init_combo_players();
                init_combo_team();

                if (oldData != null)
                {
                    mode = 1;
                }
                else
                {
                    mode = 0;
                }

                if (mode == 0)
                {
                    text = "Добавить заявку игрока";

                    DateTime dttt = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0, 0);

                    if (DateTime.Now <= IS.datebegin)
                    {
                        dateTimePickerDate.Value   = IS.datebegin;
                        dateTimePickerTimeIn.Value = dttt;
                    }
                    else
                    {
                        dateTimePickerDate.Value   = dttt;
                        dateTimePickerTimeIn.Value = dttt;
                    }


                    if (recomendedteam != null)
                    {
                        clTeam            = new CTeam(connect, recomendedteam);
                        comboBoxTeam.Text = clTeam.stTeam.name;
                    }

                    checkBoxOut.CheckState        = CheckState.Unchecked;
                    dateTimePickerDateOut.Enabled = false;
                    dateTimePickerTimeOut.Enabled = false;

                    textBoxPriority.Text = "0";
                }
                if (mode == 1)
                {
                    text = "Редактировать заявку игрока";
                    set_data((STEntryPlayers)oldData);
                }

                view_param.idseason = null;

                this.Text = text;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }