Esempio n. 1
0
 public List <ReportEvent> GanerateAllEventsReport()
 {
     foreach (var oneEvent in EventList)
     {
         string name     = employeeRepository.GetEmployeeById(oneEvent.EmployeeId).NameSurname;
         string gateName = gateRepository.GetGateCodeByID(oneEvent.GateId);
         reportEvents.Add(new ReportEvent(name, gateName, oneEvent.PassTime, oneEvent.Pass));
     }
     return(reportEvents);
 }
Esempio n. 2
0
        public bool TryPass(int employeeId, int gateIdPass)
        {
            Employee employee = employeeRepository.GetEmployeeById(employeeId);
            bool     employeePass;
            int      employeeIdFind = employee.EmployeeId;

            employeePass = employee.CheckEmployeeHasRight(gateIdPass);
            EventList.Add(new Event(GetNewEventId(), employeeId, gateIdPass, GetNewEventPassTime(), employeePass));
            return(employeePass);
        }