Last active
July 12, 2017 21:55
-
-
Save drewchapin/9e7858f11e603f2cd94111bd2d67c722 to your computer and use it in GitHub Desktop.
Shift TextBox Values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void ShiftTextBoxHistory( DataRow next ) | |
{ | |
TextBox[][] c = new TextBox[][] | |
{ | |
new TextBox[]{lastLotNumber1TextBox, lastPartNumber1TextBox, lastBatchNumber1TextBox}, | |
new TextBox[]{lastLotNumber2TextBox, lastPartNumber2TextBox, lastBatchNumber2TextBox}, | |
new TextBox[]{lastLotNumber3TextBox, lastPartNumber3TextBox, lastBatchNumber3TextBox}, | |
new TextBox[]{lastLotNumber4TextBox, lastPartNumber4TextBox, lastBatchNumber4TextBox}, | |
new TextBox[]{lastLotNumber5TextBox, lastPartNumber5TextBox, lastBatchNumber5TextBox}, | |
}; | |
lastPartNumber1TextBox.Text = (string)next["hondaPartNumber"]; | |
lastLotNumber1TextBox.Text = (string)next["lotNumber"]; | |
lastBatchNumber1TextBox.Text = (string)next["deliveryBatch"]; | |
for( int y = c.Count()-1; y > 0; y-- ) | |
{ | |
for( int x = c[y].Count()-1; x >= 0; x-- ) | |
{ | |
c[y][x].Text = c[y-1][x].Text; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment