how to write in asp to calculate with condition?

  • Thread starter Thread starter eren_greenlady
  • Start date Start date
E

eren_greenlady

Guest
here the problem i've try to calculate day leave and my code like below
If user_leaveBalance <> "" Then
user_leaveBalance = user_leaveBalance - cLdays
End If

user_leaveBalance is leave entitle to employee and cLdays are leave that employee take. what i want is, this code only do the calculation when the employee take annual leave. there's several type of leave such as Medical Leaves(db id=1), annual leave(db id=2), Emergency Leaves(db id=3),Compasisionate Leave(db id=4) etc.
 
Back
Top