How i can know who the users connected in my application?
-
HI All, i wish begin to work about a feature new for me ,i'n my project i have a database( with SqlServer) and an application (developing in WPF) the purpose of this application is to manage/handle about Accountancy and others Departement,so i created a Passwords and Roles(for Users) to access in the application ,now i will create a system to knows how many Users are connected to the Application(via Database )and show that in a listBox(for example like a normal Chat Application i wish knows who is online and offline) but i don't know where i need begin to work out this feature ,i'm strange to this feature so if you have any suggestion,link and help i will appreciate so much your help. Thanks so much. P.S. if my question is not clear i will rewrite it...however sorry in anticipate Best Regards Smile
-
HI All, i wish begin to work about a feature new for me ,i'n my project i have a database( with SqlServer) and an application (developing in WPF) the purpose of this application is to manage/handle about Accountancy and others Departement,so i created a Passwords and Roles(for Users) to access in the application ,now i will create a system to knows how many Users are connected to the Application(via Database )and show that in a listBox(for example like a normal Chat Application i wish knows who is online and offline) but i don't know where i need begin to work out this feature ,i'm strange to this feature so if you have any suggestion,link and help i will appreciate so much your help. Thanks so much. P.S. if my question is not clear i will rewrite it...however sorry in anticipate Best Regards Smile
That's a large and complex problem. I'd suggest breaking it apart into smaller problems, like; * maintain a list of users in the database * put a "marker" on those user-records who signed in, and removing it when they log out * displaying a list of users who got the "I'm logged in" marker (who's online now-query) * send a message to a user (what will you do if the user signs out before the message is delivered?) * ..etc Good luck :)
I are troll :)
-
HI All, i wish begin to work about a feature new for me ,i'n my project i have a database( with SqlServer) and an application (developing in WPF) the purpose of this application is to manage/handle about Accountancy and others Departement,so i created a Passwords and Roles(for Users) to access in the application ,now i will create a system to knows how many Users are connected to the Application(via Database )and show that in a listBox(for example like a normal Chat Application i wish knows who is online and offline) but i don't know where i need begin to work out this feature ,i'm strange to this feature so if you have any suggestion,link and help i will appreciate so much your help. Thanks so much. P.S. if my question is not clear i will rewrite it...however sorry in anticipate Best Regards Smile
I'd suggest you maintain a table of who log on/off your application and use this as the basis for your solution. Every time someone logs on, add them to the table. Everytime the log off, remove them from the table. You can then do a simple
select
satement to get a list of all the logged on users and display that in a list box.
-
I'd suggest you maintain a table of who log on/off your application and use this as the basis for your solution. Every time someone logs on, add them to the table. Everytime the log off, remove them from the table. You can then do a simple
select
satement to get a list of all the logged on users and display that in a list box.
Thanks do much for you help, now i try to put in action your advice hoping to work out this feature if i can't i will tell you about my error. Have a happy work. Nice Regards.