Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i have a stock table and there is a Unit column in Unit column only entered the integer value
and then problem is that how to check that the Unit entered in textbox if it is greater or less than colun value and then show message.
Posted

1 solution

A NumericUpDown would likely be better than a TextBox.
If possible, you could then set the MaxValue to the current value in the database.
If not, then pass the value to the database (as a parameter) and perform the comparison there, not in your code.
A technique to consider is to calculate and return the databasevalue-selectedvalue -- a negative result means that too many are requested.
 
Share this answer
 
v2
Comments
Ashwani iOS 23-Apr-14 13:02pm    
if in databse column have 10 unit and in textbox if i enter 5 then it should check and then show message ..please help me how to do that
PIEBALDconsult 23-Apr-14 13:20pm    
I thought I had. Go try it.
Ashwani iOS 23-Apr-14 13:22pm    
but the data value can be vary...
PIEBALDconsult 23-Apr-14 13:38pm    
Yes, of course.

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