Beispiel #1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                param = read_param();

                create();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            //       DialogResult = DialogResult.OK;
        }
Beispiel #2
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);
        }
Beispiel #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;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            return(ret);
        }
Beispiel #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 (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);
        }