First for the user login you can use a login control. And usisng the session can not only help remember the loginID, but also can get the value timein and timeout, then save in the database.
Then binding the data in database with the gridview.
At last, you can use the flag, if the flag=0 means the Status = Pending for Approval, then the row can editable, if the flag=1 means the rows are readonly. You can use the trigger or others to help you.
callykalpana
Member
7 Points
52 Posts
retrieve data from database based on loginID
Apr 07, 2013 03:23 AM|LINK
Hi,
Need some suggestions on ways on how to implement the scenario below :
a) User login
b) Retrieve the data from the database in a gridview format ( the data displayed must match the login ID )
The gridview will consist of the following columns : StaffName, TimeIn, TimeOut and Status
c) The rows in gridview should be editable only if the Status = Pending for Approval, if it has already been approved, the rows should be readonly.
How do I start of something like this...
Amy Peng - M...
Star
10199 Points
964 Posts
Microsoft
Re: retrieve data from database based on loginID
Apr 15, 2013 07:09 AM|LINK
Hi,
First for the user login you can use a login control. And usisng the session can not only help remember the loginID, but also can get the value timein and timeout, then save in the database.
Then binding the data in database with the gridview.
At last, you can use the flag, if the flag=0 means the Status = Pending for Approval, then the row can editable, if the flag=1 means the rows are readonly. You can use the trigger or others to help you.
Also you can take a look at asp.net's online example: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/loginstatus.aspx .
Hope it can help you.
Best Regards,
Amy Peng
Feedback to us
Develop and promote your apps in Windows Store
callykalpana
Member
7 Points
52 Posts
Re: retrieve data from database based on loginID
Apr 19, 2013 10:13 AM|LINK
Hi Amy
Thanks for the reply. Just wondering, which gives a user better control ( SQL Data Source or the sqlcommand ).