User Account issue C# application.

TheBossMan

Expert Member
Joined
Jan 30, 2007
Messages
1,737
Reaction score
0
Location
Somewhere far far away.
Hi Guys

I am really new to programming. I recently downloaded Visual Studio 2015 Community, busy making a small application for some of the people at work to try and assist them. (This will be my 1st ever time I try and program something, never even studied this, mostly getting by on YouTube and Googling, so forgive me if my question sound dof.)

It allows them to keep track of the stock they have in their store room. Item Search, Receive Stock, Dispatch Stock, Basic Reporting. Most of the basic features are working as I would like it to. I am having some issues with users. The login screen does work and you can add and delete users from the database, it picks up when you sign in with guest account or admin account and opens the correct form.

How to I get the app to remember who the signed in user is, I was trying to create a label object to show
"Logged in as:" Name and Surname it opens the 1st form with these details, but when changing forms these label seem to pull wrong details from the database.

Also on the user creation screen I am able to delete a user account of a currently logged in user. It's as if the application don't know who the logged in user is.

Any tips or guides you guys can give will be appreciated.

O yeah currently using Windows Form application, just started looking in WPF, not sure if I should try and redo / move everything over to WPF.
 
The default template should have the "logged in as working" correctly. Usually you display this on web forms. Not really needed on windows forms.
If it is broken you probably did something stupid in code as the code should be simple. Post the code you are using to get the user name

Regarding deleting a user account of a currently logged in user. I don't see that as an issue.
What if an employee is fired and you want to delete him immediately?
 
Top
Sign up to the MyBroadband newsletter
X