Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 19, 2013 10:13 AM by callykalpana
Apr 07, 2013 03:23 AM|LINK
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...
Apr 15, 2013 07:09 AM|LINK
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.
Apr 19, 2013 10:13 AM|LINK
Thanks for the reply. Just wondering, which gives a user better control ( SQL Data Source or the sqlcommand ).