Ejemplo n.º 1
0
        // update member status
        public bool TryUpdateStatus(Guid eventId, AttendanceStatuses status, out Member member)
        {
            if (!_eventService.TryFindOne(eventId, out Event evnt))
            {
                member = null;
                return(false);
            }

            member = _memberRepo.Find(new FindMember(_accountAccessor.Account, evnt));
            member.UpdateAttendanceStatus(status);
            _memberRepo.Update(member);
            return(true);
        }
Ejemplo n.º 2
0
        public void MarkAttendance(STUDENT student, EVENT currentEvent, AttendanceStatuses status)
        {
            try
            {
                ATTENDANCE attendance = base.GetEntitiesBy(a => a.Student_Id == student.Person_Id && a.Event_Id == currentEvent.Id).LastOrDefault();
                if (attendance != null)
                {
                    attendance.Attendance_Status_Id = (int)status;
                    attendance.Time_Taken           = DateTime.Now;

                    Modify(attendance);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 3
0
 internal void UpdateAttendanceStatus(AttendanceStatuses status)
 {
     AttendanceStatus = status.ToString();
 }