Hi Everyone,
I have a problem with a program I have been assigned thats driving me crazy and I hope someone with a fresh eye could point me in the right direction. Im using Visual Basic Express 2008 on WinXP and the program is a Windows Form application.
The application has to calculate a total order for wire spools and display the shipping status. The form has a text box to accept the total number of spools being ordered (Integer), labels to display # In Stock, # on Back Order, Shipping & Handling, and Order Total, and buttons for calculate, clear, and exit. The application has four functions called from the Calculate Total button's click event procedure.
GetInStock - which displays an input box asking the user to enter the number of spools in stock. It returns the amount In Stock
ReadyToShip - Accepts the arguments : # of spools in stock and # of spools ordered. It returns the number of spools ready to ship.
BackOrdered - Accepts the arguments: # of spools in stock and # ordered. If the amount ordered exceeds the amount in stock, the difference is returned, else backordered = 0
ShippingCharges - Accepts the arguments: ReadyToShip() and per spool shipping charges. It returns the total shipping
Here's the problem:
When the program is running, there is an integer entered into the Spools Ordered textbox, the calculate total button is clicked, and the input box appears requesting the user enter the amount of spools currently in stock. When an integer is typed and entered, the input box comes back up requesting the information again. Nothing goes ToString, at least not the first time. When the process is repeated the data may or may not go ToString from that point and what is worse, when it does, only one label goes ToString at a time until the last two labels (which go ToString at the same time.)
I may enter the same data into the input box up to ten times before all the labels are filled in (even then, there is inconsistency as to how many times this has to be done). The labels DO display the correct data in the end but I should only have to type into the input box once. Input Validation works correctly for both the input box and the checkbox.
Basically my question is this; What could cause the input box to keep reappearing, and why wouldnt the labels all go ToString at the same time?
Am I providing enough information to make a determination?
I would certainly appreciate it if someone has an idea on this I havent thought of.
Thanks for any and all help.
I have a problem with a program I have been assigned thats driving me crazy and I hope someone with a fresh eye could point me in the right direction. Im using Visual Basic Express 2008 on WinXP and the program is a Windows Form application.
The application has to calculate a total order for wire spools and display the shipping status. The form has a text box to accept the total number of spools being ordered (Integer), labels to display # In Stock, # on Back Order, Shipping & Handling, and Order Total, and buttons for calculate, clear, and exit. The application has four functions called from the Calculate Total button's click event procedure.
GetInStock - which displays an input box asking the user to enter the number of spools in stock. It returns the amount In Stock
ReadyToShip - Accepts the arguments : # of spools in stock and # of spools ordered. It returns the number of spools ready to ship.
BackOrdered - Accepts the arguments: # of spools in stock and # ordered. If the amount ordered exceeds the amount in stock, the difference is returned, else backordered = 0
ShippingCharges - Accepts the arguments: ReadyToShip() and per spool shipping charges. It returns the total shipping
Here's the problem:
When the program is running, there is an integer entered into the Spools Ordered textbox, the calculate total button is clicked, and the input box appears requesting the user enter the amount of spools currently in stock. When an integer is typed and entered, the input box comes back up requesting the information again. Nothing goes ToString, at least not the first time. When the process is repeated the data may or may not go ToString from that point and what is worse, when it does, only one label goes ToString at a time until the last two labels (which go ToString at the same time.)
I may enter the same data into the input box up to ten times before all the labels are filled in (even then, there is inconsistency as to how many times this has to be done). The labels DO display the correct data in the end but I should only have to type into the input box once. Input Validation works correctly for both the input box and the checkbox.
Basically my question is this; What could cause the input box to keep reappearing, and why wouldnt the labels all go ToString at the same time?
Am I providing enough information to make a determination?
I would certainly appreciate it if someone has an idea on this I havent thought of.
Thanks for any and all help.
Comment