private void buttonOk_Click(object sender, EventArgs e) { int?itype; int?iidstage; try { if (iddivision > 0) { if (type >= 0) { itype = type; } else { itype = null; } if (idstage > 0) { iidstage = idstage; } else { iidstage = null; } ReportExcelRatingsTeam cl = new ReportExcelRatingsTeam(connect, IS.idseason, iddivision, itype, iidstage); } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } // DialogResult = DialogResult.OK; }
private void buttonOk_Click(object sender, EventArgs e) { int?itype; int?iidstage; try { if (iddivision > 0) { if (type >= 0) { itype = type; } else { itype = null; } if (idstage > 0) { iidstage = idstage; } else { iidstage = null; } string text = null; List <int> 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, iddivision, checkedListBoxGroup.Items[i].ToString()); if (!string.IsNullOrEmpty(text)) { text += string.Format(",{0}", clGroup.stGroup.idgroup); } else { text = clGroup.stGroup.idgroup.ToString(); } lst_idgroup.Add(clGroup.stGroup.idgroup); } } // if (!string.IsNullOrEmpty(text)) ret.strgroup = text; ReportExcelRatingsTeam cl = new ReportExcelRatingsTeam(connect, IS.idseason, iddivision, itype, iidstage, lst_idgroup); } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } // DialogResult = DialogResult.OK; }