Its because you don't have an outer else block that returns something if ACC_YN == "NO":
if (...)
{
}
else
{
return "SOMEVALUE"
}
if the action is to return a "NO" and ACC_YN == "NO" then u you can do something like:
public string isAccessLevel()
{
string val = "NO";
if (ACC_YN == "YES")
{
if (STA_YN == "RELEASE")
{
val = "YES";
}
else
{
val = "NO";
}
}
return val;
}
Hope this helps.