Skip to content

Commit

Permalink
Student attendance feature upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
RubaiyadNoorShahriar1999 committed Dec 29, 2022
1 parent c50f568 commit 50d2458
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified AttendanceSystem/.vs/AttendanceSystem/v17/.futdcache.v2
Binary file not shown.
Binary file modified AttendanceSystem/.vs/AttendanceSystem/v17/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion AttendanceSystem/AttendanceSystem/Services/CourseServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public bool IsDuplicate(Student student, Course course)
List<Attendance> attendances = db.Attendances.ToList();
foreach(Attendance att in attendances)
{
if(att.CourseId == course.Id && att.StudentId == student.Id)
TimeSpan difference = att.Time.Subtract(DateTime.Now);
if(att.CourseId == course.Id && att.StudentId == student.Id && difference.Hours < 24)
{
isDuplicate = true;
break;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 50d2458

Please sign in to comment.