Exemplo n.º 1
0
 public Management(MainForm mainForm)
 {
     InitializeComponent();
     parentForm = mainForm;
     meetingImpl = new MeetingImpl();
     memberImpl = new MemberImpl();
     attendanceImpl = new AttendanceImpl();
 }
Exemplo n.º 2
0
 public double getMemberAttendanceRate(Member member)
 {
     MeetingImpl meetingImpl = new MeetingImpl();
     int supposedMeetingsCount = 0;
     int attendedMeetingsCount = 0;
     foreach (Meeting meeting in meetingImpl.getAllMeetings())
     {
         if (DateTime.Compare(meeting.Date, member.EntryDate) >= 0)
         {
             supposedMeetingsCount++;
             if (didMemberAttendSingleMeeting(meeting, member))
             {
                 attendedMeetingsCount++;
             }
         }
     }
     return Math.Round(Convert.ToDouble(attendedMeetingsCount / supposedMeetingsCount * 100), 2, MidpointRounding.AwayFromZero);
 }