T
T
Therapyx2015-06-22 03:17:12
ASP.NET
Therapyx, 2015-06-22 03:17:12

How to make GridView in asp.net webforms user oriented?

At the moment I have a web application that is used by 1 accountant. Those. login, registration, etc., there is nothing like that.
Now there is a need to make this application focused on a decent number of users. And the question is this: How best to implement all this in asp.net, c#, mssql so that each user sees only his own data in the corresponding tables?
So far, I've only thought about this option: Create a user base, login, reg this is understandable)) Change the insert procedures to add additional. fields with the current user. Subsequently, when entering the page, do a select command where user = CurrentUser.
- If this is the right approach, then how to find out then this current user?
- If this is complete nonsense, then I would like to read about the correct option))
On the Internet, it’s not a problem to find guides for login, registration, the tables themselves on asp.net, but it’s their work together that is somehow a wilderness :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Vyrov, 2015-06-22
@Therapyx

It didn’t work with webforms, but it seems to me that it doesn’t differ much from winform, so I would advise you to do this:
- After authorization, we throw a request to the database with the login of the authorized person (example: Select id_user, FirstName, Surname from Users where user = CurrentUser)
- From temporary table (make it invisible) we get all the necessary information (example: 2594, Semyon, Ivanov)
- Load it onto the page or into variables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question