tags:

views:

101

answers:

1

Hi everyone. i am developing a training software in wpf. but i have problems. this application will be setup project.

when the user make it work, a login window will open. User should enter his username.there wont be a password.

but the problem is next; i dont know how to get userid from database. and compare other usernames to get the right userid.

second problem is, when i get right userid from database, how can i use it main window? where can i store this userid. will be this session or something like that?

i want this userid because, user will have notpad and questions. thanks in advance.

Database(UserInformation table)

userid/ username

A: 

As I see, you have problem with global vision of how your application will be organized. In WPF it is very common to use Model-View-ViewModel pattern. I think that this famous MSDN article by Josh Smith will be helpful for you. You can find demo application code here.

Hope it helps.

levanovd
thanks for your answer levanovd
neki