Joy Banerjee

Joy Banerjee

  • NA
  • 74
  • 2.9k

Checking a status flag from database and load the page

Nov 16 2017 5:18 AM
Hi,
 
THE SCENARIO 
 
I am working on an email application where upon successful submission of a certain list item, the approver will get an email with a link, which will be redirecting the approver to the particular item, which was submitted based upon its controller action method.
 
Please think of this scenario as any other online shopping website, when you order something you receive email with a link which takes you to the ordered item page.
 
In my application the approver will have two options - Approve and Reject. So when the item gets approved or rejected, the status of the item will be updated in a sql table with a status flag. 
So if the approver again clicks on the link it will show the status "this item is approved/rejected" and he should not be able approve / reject anymore.
 
PROBLEM I AM FACING
 
Right now the problem is , even though the item is approved or rejected, whenever the approver is clicking on the link , he is able to approve or reject the item request again and it continues.
 
 
Please help me with some advice to solve this. 

Answers (1)