Пример #1
0
        /// <summary>
        /// 每月考勤结算触发
        /// </summary>
        /// <param name="eGFunc"></param>
        private void CalculateAttendMonthlyTrigger(IEnumerable <XElement> eGFunc)
        {
            if (eGFunc.Count() == 0)
            {
                return;
            }

            string strIsCurrentMonth     = string.Empty;
            string strAssignedObjectType = string.Empty;
            string strAssignedObjectId   = string.Empty;

            foreach (var item in eGFunc)
            {
                if (item.Attribute("Name").Value == "ISCURRENTMONTH")
                {
                    strIsCurrentMonth = item.Attribute("Value").Value;
                }
                else if (item.Attribute("Name").Value == "ASSIGNEDOBJECTTYPE")
                {
                    strAssignedObjectType = item.Attribute("Value").Value;
                }
                else if (item.Attribute("Name").Value == "ASSIGNEDOBJECTID")
                {
                    strAssignedObjectId = item.Attribute("Value").Value;
                }
            }

            AttendanceService svcAttend = new AttendanceService();

            svcAttend.CalculateEmployeeAttendanceMonthly(strIsCurrentMonth, strAssignedObjectType, strAssignedObjectId);
        }