示例#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);
 }
示例#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);
        }