Click here to Skip to main content
15,888,251 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My application is for Leave Module. now in that i used, employee can apply leave normally Seek Leave, Casual Leave and Paid leave. but Now i have to put condition like if total leave days(Count) is less than or equal to 2 then it will automatically goes in CL n PL will be invisible in drop down list. so what can i do for that?
Posted
Comments
Mycroft Holmes 15-Nov-14 3:30am    
Learn not to cross post, Q&A or a forum post NOT both!

1 solution

To do that, you have to embrace the idea of separation of concerns, or the idea of orthogonality. There are Boolean expressions and condition. When you use them, it doesn't matter where did you get objects used in Boolean expressions and conditional statements. There are view states. When you write view state variables or read them, it doesn't matter how you use those variables. In other words, separate and conquer.

Any serializeable object can be uses as a view state variable. Working with view state variables is easy enough. Please see, for example: http://asp.net-tutorials.com/state/viewstate[^].

See also: http://msdn.microsoft.com/en-us/library/z1hkazw7%28v=vs.100%29.aspx[^].

And I trust you know how to write conditional (if, if-else) statements.

—SA
 
Share this answer
 
v2
Comments
Member 11221185 15-Nov-14 3:56am    
I can understand this things.and already used i used If,if-else condition. But can you tell me please how can i add the logic for that condition.
Sergey Alexandrovich Kryukov 15-Nov-14 18:34pm    
Sorry, I cannot understand what exactly do you mean by "adding logic" for a condition and what your problem might be. To me, working using condition should be logical in first place, without a need to "add" more of logic. :-)
—SA

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