Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I hav Table(BasicSalaryDefine) where 2 fields i.e FromAmount And ToAmount is defined...

and in another table(CorporateTitle) there is Salary field...

Ihav to chek the entered salary(in CorporateTitle) is between the RAnge or not

if it is in range then save otherwise not to save



plz guyz help me
Posted
Updated 19-Jan-12 5:22am
v2
Comments
OriginalGriff 19-Jan-12 3:01am    
We need a little more information - language? VB? C#? Javascript? SQL stored procedure? Or what?
What have you tried so far?
Use the "Improve question" widget to edit your question and provide better information.
Jephunneh Malazarte 19-Jan-12 3:03am    
ouch... am having a nosebleed.
you want it implement on the server side or client side or sp logic?

1 solution

First get your TextBox value in some variable (say sal).
Retrieve values (say minSal & maxSal) from your DataBase Table.
Then check whether entered salary is between the two retrieved values:
C#
if(sal<=maxSal && sal>=minSal)
{
  //save sal in DataBase
}
else
{
  //Generate an error
}

And you're done!
 
Share this answer
 
v2

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