Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public int status (int jdkey)
  2. {
  3. object count;
  4. string sqlstrng;
  5. int key;
  6.  
  7. sqlstrng = "Select Count(*) from hr_staff_job where Job_Key in ( select JD_Key from HR_Jobs where JD_parentkey = " + jdkey + "";
  8. sqlstrng = sqlstrng + "or Job_Key in ( select JD_Key from HR_Jobs where JD_Key = " + jdkey + ") ";
  9.  
  10. count = obj.ExecScalarQuery(sqlstrng);
  11. key = Convert.ToInt32(count);
  12.  
  13. if (key > 0)
  14. {
  15. return 1;
  16. }
  17. else return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement