This is on the right lines
can I pass a parameter into the code
string test1 = "textBox1"
private void button1_Click (object sender, EventArgs e)
{
ProcessTextboxes(new TextBox[] {test1,textBox2} );
// iTEMPALLET_MOBILEResultSet.
}
this would enable me to change the name of the textbox I am processing
BUT
What I really want to do is this
ACTION 1
string b = "AB"
string c = "AC"
ACTION2
string b = "AC"
string c = "AD"
ACTION3
string b = "AC"
string c = "BD" we are going back down the next rack
textBox[b].enabled = true
textBox[b].Text = ""
textBox[b].Focus()
where I am processing a text box called textBoxAB
there are about another 10 properties that I am processing
when I have finished processing textBoxAB I want to process textBoxAC
textBox[b].enabled = false
textBox[c].enabled = true
textBox[c].Text = ""
textBox[c].Focus()
I am writing a program where we are scanning racks in a warehouse.
At present there are 4 racks high and only the top 3 are scanned
The programme is much more complicated than this and is WORKING but I have to write a different CASE statement for each rack
I have just been informed that the new warehouse may have 6 racks high
So if I could parameterise the property I can just process the rack I want
This I am sure is so simple its stupid!!!
Regards
Richard
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement