1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| foreach (RadioButton rb in Panel_AjoutTicket.Controls.OfType<RadioButton>())
{
if (rb != null & ComboBox_Affaire.Text != "Affaire" & ComboBox_Secteur.Text != "Secteur" & ComboBox_Criticité.Text != "Criticité")
{
if (rb.Checked)
{
int j = 0;
int i = 0;
String input = File.ReadAllText(@".\Test.txt");
string [,] Form = new string [27,2];
foreach (var row in input.Split('\n'))
{
foreach (var col in row.Trim().Split(' '))
{
Form[i, j] = col.Trim();
j++;
}
//i++;
}
if (rb.TabIndex.ToString() == Form[i, 0])
{
string b = Form[0, j].ToString();
Form a = new Form();
a.Name = b;
a.Show();
}
}
}
else
{
MessageBox.Show("Veuillez vérifier vos selections !", "Avertissement", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
return;
} |
Partager