Skip to main content
deleted 7 characters in body
Source Link

That is because the Usr.Status contains an Integer and the UserStatus.Approved always returns an String i.e., Approved. So, an integer of value 1 can not be equal to the String Approved. So, you must convert the Enum status also to an integer by the following code

if (usr.Status == (int)(UserStatus.Approved)) return true; return false; 

That is because the Usr.Status contains an Integer and the UserStatus.Approved always returns an String i.e., Approved. So, an integer of value 1 can not be equal to the String Approved. So, you must convert the Enum status also to an integer by the following code

if (usr.Status == (int)(UserStatus.Approved)) return true; return false; 

That is because the Usr.Status contains an Integer and the UserStatus.Approved returns an String i.e., Approved. So, an integer of value 1 can not be equal to the String Approved. So, you must convert the Enum status also to an integer by the following code

if (usr.Status == (int)(UserStatus.Approved)) return true; return false; 
Source Link

That is because the Usr.Status contains an Integer and the UserStatus.Approved always returns an String i.e., Approved. So, an integer of value 1 can not be equal to the String Approved. So, you must convert the Enum status also to an integer by the following code

if (usr.Status == (int)(UserStatus.Approved)) return true; return false;