Click here to Skip to main content
15,883,831 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
suppose,I have applied for job on clicking button1 and if i want apply again on clicking same button and for same job then We cant apply again means message should come already applied...plz help?
Posted
Updated 27-Jun-12 19:56pm
v2

We cant apply again means message should come already applied
Two options. Either disable the button once it was clicked. OR better and strong way to handle it would be to keep a record in your DB on which userID has already applied for what all jobID. Refer this data before letting any user apply for a job. If a jobID already exists then it was already applied - show the message.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Jun-12 2:11am    
I voted 4 and would vote 5 if you would not mention option #1. It only creates the illusion of the solution, which is worse then no solution at all. First of all, you should have mentioned that the solution should be based on authentication. Right?
Please also see the solution 2 and my comment. Agree?
--SA
Sandeep Mewara 28-Jun-12 2:16am    
Option 1 was for instant way of avoiding re-submit of job. Being on the same page but not allowing to click the button twice.
Option 2 is valid in all the cases whatsoever as it is tied to particular user logged in.

About your point of mentioning authentication, if someone is allowed to apply for a job by a click it has to be a registered-logged in user, hence I used the reference of 'userId' in my answer too.

Thanks for clarification.
Sergey Alexandrovich Kryukov 28-Jun-12 2:21am    
Understood. I think we're agree.
Thanks for the discussion.
--SA
Vani Kulkarni 28-Jun-12 2:59am    
Good answer! My 5!
vangapally Naveen Kumar 28-Jun-12 3:19am    
Good answer! My 5!
When the user hits the button for first time set some state somewhere i.e. have some specific value in hidden variable or viewstate or set some session variable.

then when the user hit again first check this variable and if it has been set don't do anything just show some message.

which state management you resort to depends on various project specific things so that your choice.

UPDATE:

But this will only work at most in the current session. TO make this behavior persistent for a particular user you need some sort of mapping table which will take care of tracking such things.

so if your DB there is something like a JobPostID, and a USERID. you could also have a ApplicationTracer table which will contain TrackerID, USERID, JobPostID.

so when ever user apply for a job you can check whether that job ID contains this UserID in the tracking table and let him apply. once he apply make entry in this tracking table to reflect the same.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 28-Jun-12 2:12am    
Well, what happens it the user closes everything and the session get expired? Will be able to apply again, right? I think it can be only based on authentication.
--SA
Rahul Rajat Singh 28-Jun-12 2:14am    
totally agreed. and thanks for pointing it out. I am updating the answer now.
Yes i completely agree with Sandeep Mewara.
To prevent seekers from applying on same job you need to keep track of applied jobs of job seekers.
 
Share this answer
 
Comments
Sandeep Mewara 28-Jun-12 2:40am    
An upvote to my answer and leaving this as a comment to my answer will be more along the lines of support.

Thanks for supporting me. :)
The Better thing is that when anyone user can applied for job, then store Jobid and Userid in database. And when this user will try to apply for the same job check the function if user already apply then pop up message.
It just like the Duplication record checking.



Thank You.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900