Example #1
0
        private STScheme read_data()
        {
            STScheme ret = new STScheme();

            try
            {
                /* основные параметры */
                ret.idseason = (int)IS.idseason;

                ret.iddivision = idcdiv;

                if (gstScheme.idstage > 0)
                {
                    ret.idstage = gstScheme.idstage;
                }
                else
                {
                    ret.idstage = clScheme.GetFreeId((int)IS.idseason);
                }

                if (textBoxNameStage.Text.Length > 0)
                {
                    ret.namestage = textBoxNameStage.Text.Trim();
                }
                else
                {
                    ret.namestage = "";
                }

                if (comboBoxTypes.Text.Length > 0)
                {
                    ret.type = cl.GetTypeCode(comboBoxTypes.Text.Trim());
                }
                else
                {
                    ret.type = -1;
                }

                if (textBoxCntRound.Text.Length > 0)
                {
                    ret.cntround = int.Parse(textBoxCntRound.Text.Trim());
                }
                else
                {
                    ret.cntround = 0;
                }

                if (checkBoxTug.CheckState == CheckState.Checked)
                {
                    ret.iddivision = 0;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); }

            return(ret);
        }
Example #2
0
        private void comboBoxType_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (comboBoxType.Text.Length > 0)
                {
                    type = tp.GetTypeCode(comboBoxType.Text.Trim());
                }
                else
                {
                    type = -1;
                }

                init_combo_stage();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Example #3
0
        private STParamReportBestPlayer read_param()
        {
            STParamReportBestPlayer ret = new STParamReportBestPlayer();

            try
            {
                ret.idseason = IS.idseason;

                if (comboBoxTypeGame.Text.Length > 0)
                {
                    ret.type = tp.GetTypeCode(comboBoxTypeGame.Text.Trim());
                }
                else
                {
                    ret.type = -1;
                }

                if (comboBoxDivision.Text.Length > 0)
                {
                    clDiv          = new CDivision(connect, IS.idseason, comboBoxDivision.Text.Trim());
                    ret.iddivision = clDiv.stDiv.id;
                }
                else
                {
                    ret.iddivision = 0;
                }

                if (radioButtonOneDate.Checked == true)
                {
                    ret.bdate = true;
                    ret.dtbeg = dateTimePickerDateBegin.Value;
                }

                if (radioButtonPeriodDate.Checked == true)
                {
                    ret.bdate = false;
                    ret.dtbeg = dateTimePickerDateBegin.Value;
                    ret.dtend = dateTimePickerDateEnd.Value;
                }


                if (textBoxLimit2.Text.Length > 0)
                {
                    ret.limit2 = double.Parse(textBoxLimit2.Text.Trim());
                }
                else
                {
                    ret.limit2 = 0;
                }

                if (textBoxLimit3.Text.Length > 0)
                {
                    ret.limit3 = double.Parse(textBoxLimit3.Text.Trim());
                }
                else
                {
                    ret.limit3 = 0;
                }

                if (textBoxLimitFt.Text.Length > 0)
                {
                    ret.limitft = double.Parse(textBoxLimitFt.Text.Trim());
                }
                else
                {
                    ret.limitft = 0;
                }

                if (textBoxPCG.Text.Length > 0)
                {
                    ret.pcg = int.Parse(textBoxPCG.Text.Trim());
                }
                else
                {
                    ret.pcg = 0;
                }

                if (textBoxCntPlayer.Text.Length > 0)
                {
                    ret.cntplayer = int.Parse(textBoxCntPlayer.Text.Trim());
                }
                else
                {
                    ret.cntplayer = 0;
                }

                string text = null;
                ret.lst_idgroup = new List <int>();
                CGroup clGroup = new CGroup(connect);
                for (int i = 0; i < checkedListBoxGroup.Items.Count; i++)
                {
                    if (checkedListBoxGroup.GetItemChecked(i))
                    {
                        clGroup = new CGroup(connect, IS.idseason, ret.iddivision, checkedListBoxGroup.Items[i].ToString());
                        if (!string.IsNullOrEmpty(text))
                        {
                            text += string.Format(",{0}", clGroup.stGroup.idgroup);
                        }
                        else
                        {
                            text = clGroup.stGroup.idgroup.ToString();
                        }
                        ret.lst_idgroup.Add(clGroup.stGroup.idgroup);
                    }
                }
                if (!string.IsNullOrEmpty(text))
                {
                    ret.strgroup = text;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            return(ret);
        }
Example #4
0
        private STParamReportBestPlayer read_param()
        {
            STParamReportBestPlayer ret = new STParamReportBestPlayer();

            try
            {
                ret.idseason = IS.idseason;

                if (comboBoxTypeGame.Text.Length > 0)
                {
                    ret.type = tp.GetTypeCode(comboBoxTypeGame.Text.Trim());
                }
                else
                {
                    ret.type = -1;
                }

                if (comboBoxDivision.Text.Length > 0)
                {
                    clDiv          = new CDivision(connect, IS.idseason, comboBoxDivision.Text.Trim());
                    ret.iddivision = clDiv.stDiv.id;
                }
                else
                {
                    ret.iddivision = 0;
                }

                if (radioButtonOneDate.Checked == true)
                {
                    ret.bdate = true;
                    ret.dtbeg = dateTimePickerDateBegin.Value;
                }

                if (radioButtonPeriodDate.Checked == true)
                {
                    ret.bdate = false;
                    ret.dtbeg = dateTimePickerDateBegin.Value;
                    ret.dtend = dateTimePickerDateEnd.Value;
                }


                if (textBoxLimit2.Text.Length > 0)
                {
                    ret.limit2 = double.Parse(textBoxLimit2.Text.Trim());
                }
                else
                {
                    ret.limit2 = 0;
                }

                if (textBoxLimit3.Text.Length > 0)
                {
                    ret.limit3 = double.Parse(textBoxLimit3.Text.Trim());
                }
                else
                {
                    ret.limit3 = 0;
                }

                if (textBoxLimitFt.Text.Length > 0)
                {
                    ret.limitft = double.Parse(textBoxLimitFt.Text.Trim());
                }
                else
                {
                    ret.limitft = 0;
                }

                if (textBoxPCG.Text.Length > 0)
                {
                    ret.pcg = int.Parse(textBoxPCG.Text.Trim());
                }
                else
                {
                    ret.pcg = 0;
                }

                if (textBoxCntPlayer.Text.Length > 0)
                {
                    ret.cntplayer = int.Parse(textBoxCntPlayer.Text.Trim());
                }
                else
                {
                    ret.cntplayer = 0;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            return(ret);
        }
Example #5
0
        private STParamReportBestPlayer read_param()
        {
            STParamReportBestPlayer ret = new STParamReportBestPlayer();

            try
            {
                ret.idseason = IS.idseason;

                if (comboBoxTypeGame.Text.Length > 0)
                {
                    ret.type = tp.GetTypeCode(comboBoxTypeGame.Text.Trim());
                }
                else
                {
                    ret.type = -1;
                }

                if (comboBoxDivision.Text.Length > 0)
                {
                    clDiv          = new CDivision(connect, IS.idseason, comboBoxDivision.Text.Trim());
                    ret.iddivision = clDiv.stDiv.id;
                }
                else
                {
                    ret.iddivision = 0;
                }

                if (comboBoxStage.Text.Length > 0)
                {
                    clScheme    = new CScheme(connect, ret.idseason, ret.iddivision, comboBoxStage.Text.Trim());
                    ret.idstage = clScheme.stScheme.idstage;
                }

                if (textBoxRound.Text.Length > 0)
                {
                    ret.round = int.Parse(textBoxRound.Text.Trim());
                }
                else
                {
                    ret.round = 0;
                }

                if (textBoxLimit2.Text.Length > 0)
                {
                    ret.limit2 = double.Parse(textBoxLimit2.Text.Trim());
                }
                else
                {
                    ret.limit2 = 0;
                }

                if (textBoxLimit3.Text.Length > 0)
                {
                    ret.limit3 = double.Parse(textBoxLimit3.Text.Trim());
                }
                else
                {
                    ret.limit3 = 0;
                }

                if (textBoxLimitFt.Text.Length > 0)
                {
                    ret.limitft = double.Parse(textBoxLimitFt.Text.Trim());
                }
                else
                {
                    ret.limitft = 0;
                }

                if (textBoxPCG.Text.Length > 0)
                {
                    ret.pcg = int.Parse(textBoxPCG.Text.Trim());
                }
                else
                {
                    ret.pcg = 0;
                }

                if (textBoxCntPlayer.Text.Length > 0)
                {
                    ret.cntplayer = int.Parse(textBoxCntPlayer.Text.Trim());
                }
                else
                {
                    ret.cntplayer = 0;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            return(ret);
        }