|
Subject:
|
if the approve button is click for the second time
|
|
Posted By:
|
debjanib
|
Post Date:
|
8/14/2006 5:02:33 PM
|
I have a form which needs to be filled up by the manager for new employee. Once the form has been filled up ,the data gets saved in the database in the pending status and an email is sent to the RD. Now the RD clicks on the link in the email to approves the form .And the form gets saved in the database in the Approved mode. Now if the RD ,by mistake clicks on the link in the email to approve the form, a message will show that the form has been approved already.
So now I need to get the last part of the form functioning. that if the form has been approved by the RD already, and if the RD clicks on the link to approve it should give me the message that the form has been updated alredy.
So can anybody where to add the functionality. I am using C# to code. I have a fuction called EmailForm() which gets activated when the submit button in the form is clicks.
|
|
Reply By:
|
dparsons
|
Reply Date:
|
8/15/2006 8:21:48 AM
|
In the email that is sent to the RD i would add a key to the link, for example the href might be:
a href="www.mysite.com/somepage.aspx?id=nnnn
Have the ID be the unique ID from the database and when the page is loaded, go to the database first and see if the record associated with this ID has been processed yet, if it has send a message back to the RD saying as such and, if not, process the form.
HTH
"The one language all programmers understand is profanity."
|