【XAF问题】如何判断这个对象的进出类型

一、问题

1. 如何判断这个对象的进出类型

二、思路

第一次进过的时候,存个字段在对象的字段,例如已经过了就给他true,再回来就是false,再过去就true

三、方法

 A_rfidpersonnel_main(人员基础信息)新建一个当前考勤状态的字段,然后去判断它的出入类型

 var bookfile = session.FindObject<A_rfidpersonnel_main>(CriteriaOperator.Parse("rfidcode=?  ", epc));

if (bookfile.attendancetype == RFIDAttendance.入厂)
{
bookfile.attendancetype = RFIDAttendance.出厂;
}
else
{
bookfile.attendancetype = RFIDAttendance.入厂;
}

原文地址:https://www.cnblogs.com/qy1234/p/10551358.html