Windows Develop Bookmark and Share   
 index > Windows Forms General > need help with my project
 

need help with my project

hi, im a student and currently assigned to create a user form project for C#.

1st is there are 2 textboxes, one is to input employee ID then to PIN

PIN is after u input employee ID,

example employee ID is from 1 - 200 range, then PIN generated from the ID which calculates ID * 13 then / 4.

But as easy as this, however i made buttons (some sort of a calculator) which to input onto both textboxes

meaning

buttons 0 - > 9 serves 2functions one of ID then it goes to PIN (i've solved that)

but im stuck with the enterButton which also serves 2functions as such, employee ID then once hit enter and meets the requirements (ID > 0 <= 200), then the other enter function is for after entering employee ID and PIN if-else statements if its correct then a Label shows "Door opened" else 3 tries before it alerts the police. But im having a problem here as it keeps looping back due to (Enter button has 2 functions/purposes) anyone care to help me out?

http://img171.imageshack.us/img171/4200/projfw9.jpg

reflux  Sunday, July 29, 2007 6:15 AM

Hi, I'll help you out.

It's as though your application hastwo modes of operation (modus operandi). For example when entering in the employee ID the enter button works in an authentication mode (it authenticates the employee), then when the PIN is entered theenter button then works in authorisation mode (it checks if the details entered are authorised to enter).

So you need two things, 1. a way to change the mode, and 2. the enter button needs to know what mode it's in.

Lets say when the application starts it's in mode authetication, the user enters in their ID and presses enter, the application then enters authorisation mode, the user enters in their PIN and presses enter again, the button then authorises the employee IDagainst the PIN.

Does that help ?

Derek Smyth  Sunday, July 29, 2007 10:40 AM

Hi, I'll help you out.

It's as though your application hastwo modes of operation (modus operandi). For example when entering in the employee ID the enter button works in an authentication mode (it authenticates the employee), then when the PIN is entered theenter button then works in authorisation mode (it checks if the details entered are authorised to enter).

So you need two things, 1. a way to change the mode, and 2. the enter button needs to know what mode it's in.

Lets say when the application starts it's in mode authetication, the user enters in their ID and presses enter, the application then enters authorisation mode, the user enters in their PIN and presses enter again, the button then authorises the employee IDagainst the PIN.

Does that help ?

Derek Smyth  Sunday, July 29, 2007 10:40 AM

You can use google to search for other answers

Custom Search

More Threads

• RTL and LTR strings in List box
• Context Sensitive Help
• What control is used in Outlook 2007 ?
• OpenFileDialog & Custom control
• Toggling through items in a toolstrip control
• How to access textbox on parent form?
• Form closing Error...
• Howto: expose the Items property of a MenuStrip as a property of a class containing the MenuStrip(with designer support)
• Can you use .NET Windows Forms in Outlook ?
• Expand/Collapse treeview with Compact Framework