Hi, I have some code, below, that takes input from a combobox and is supposed to parse it and display it. However, it doesn't work. I can't figure out why.
The combobox is the one for the resolution code, which specifies how the ticket was closed.
The code compiles fine, but the box persists with the number instead of the actual code. Thoughts?
if (comboBox12.Tex t != "")
{
int ResCode = Convert.ToInt32 (comboBox12.Tex t);
string Resolution = "";
switch (ResCode)
{
case 0:
Resolution = "Initial Contact";
break;
case 1:
Resolution = "Remote";
break;
case 2:
Resolution = "On-Site";
break;
case 3:
Resolution = "User Resolved";
break;
case 4:
Resolution = "Cancelled" ;
break;
case 5:
Resolution = "Code";
break;
case 6:
Resolution = "Duplicate" ;
break;
}
comboBox12.Text = Resolution;
}
else
{
comboBox12.Text = "";
}
The combobox is the one for the resolution code, which specifies how the ticket was closed.
The code compiles fine, but the box persists with the number instead of the actual code. Thoughts?
if (comboBox12.Tex t != "")
{
int ResCode = Convert.ToInt32 (comboBox12.Tex t);
string Resolution = "";
switch (ResCode)
{
case 0:
Resolution = "Initial Contact";
break;
case 1:
Resolution = "Remote";
break;
case 2:
Resolution = "On-Site";
break;
case 3:
Resolution = "User Resolved";
break;
case 4:
Resolution = "Cancelled" ;
break;
case 5:
Resolution = "Code";
break;
case 6:
Resolution = "Duplicate" ;
break;
}
comboBox12.Text = Resolution;
}
else
{
comboBox12.Text = "";
}
Comment