HcmEmployment hcmEmployment;
select firstonly RecId from hcmEmployment where hcmEmployment.Worker == HcmWoker.RecId;
if (hcmEmployment.RecId != 0)
{
HcmWorkerStatus::Employed;
}
else
{
hcmEmployment.clear();
select firstonly ValidTimeState(now, maxDateTime) hcmEmployment
where hcmEmployment.Worker == this.RecId && hcmEmployment.ValidFrom > now;
if (hcmEmployment.RecId != 0)
{
HcmWorkerStatus::Pending;
}
else
{
HcmWorkerStatus::Terminated;
}
}
select firstonly RecId from hcmEmployment where hcmEmployment.Worker == HcmWoker.RecId;
if (hcmEmployment.RecId != 0)
{
HcmWorkerStatus::Employed;
}
else
{
hcmEmployment.clear();
select firstonly ValidTimeState(now, maxDateTime) hcmEmployment
where hcmEmployment.Worker == this.RecId && hcmEmployment.ValidFrom > now;
if (hcmEmployment.RecId != 0)
{
HcmWorkerStatus::Pending;
}
else
{
HcmWorkerStatus::Terminated;
}
}
No comments:
Post a Comment