public void DeleteEvent()
        {
            if (!_Utility.Validate())
            {
                return;
            }

            try
            {
                InstanceFactory.AttendanceInOutRecordFacade().DeleteAttendanceInOutRecord(
                    Convert.ToInt32(_View.EmployeeId), Convert.ToInt32(_View.RecordId),
                    Convert.ToDateTime(_View.IOTime), CompleteLogData(), LoginUser);
                _View.ActionSuccess = true;
            }
            catch (ApplicationException ae)
            {
                _View.Message = ae.Message;
            }
        }
        public void UpdateEvent()
        {
            if (!_Utility.Validate())
            {
                return;
            }
            Employee employee = InstanceFactory.AttendanceInOutRecordFacade().GetEmployeeInAndOutRecordByEmployeeId(Convert.ToInt32(_View.EmployeeId), LoginUser);
            AttendanceInAndOutRecord oldRecord = employee.EmployeeAttendance.FindInAndOutRecordByRecordId(Convert.ToInt32(_View.RecordId));

            #region 收集log 中考勤的旧数据
            AttendanceInAndOutRecordLog log = new AttendanceInAndOutRecordLog();
            log.EmployeeID   = Convert.ToInt32(_View.EmployeeId);
            log.EmployeeName = _View.EmployeeName;
            log.OldIOStatus  = oldRecord.IOStatus;
            log.OldIOTime    = oldRecord.IOTime;
            DateTime oldDate = oldRecord.IOTime;
            log.OperateReason = _View.Reason;
            log.Operator      = LoginUser.Name;
            #endregion
            //转为新数据
            _Utility.CompleteTheObject(oldRecord);
            oldRecord.OperateStatus = OutInRecordOperateStatusEnum.ModifyByOperator;
            //插入日志 ,收集考勤中新数据
            log.NewIOStatus   = oldRecord.IOStatus;
            log.NewIOTime     = oldRecord.IOTime;
            log.OperateStatus = oldRecord.OperateStatus;
            log.OperateTime   = oldRecord.OperateTime;



            try
            {
                InstanceFactory.AttendanceInOutRecordFacade().UpdateAttendanceInOutRecord(
                    Convert.ToInt32(_View.EmployeeId), oldRecord, oldDate, log, LoginUser);

                _View.ActionSuccess = true;
            }
            catch (ApplicationException ae)
            {
                _View.Message = ae.Message;
            }
        }
        public void AddEvent()
        {
            if (!_Utility.Validate())
            {
                return;
            }
            AttendanceInAndOutRecord record = new AttendanceInAndOutRecord();

            _Utility.CompleteTheObject(record);
            record.OperateStatus = OutInRecordOperateStatusEnum.AddByOperator;
            try
            {
                InstanceFactory.AttendanceInOutRecordFacade().InsertAttendanceInOutRecord(
                    Convert.ToInt32(_View.EmployeeId), record, CompleteLogData(record), LoginUser);
                _View.ActionSuccess = true;
            }
            catch (ApplicationException ae)
            {
                _View.Message = ae.Message;
            }
        }