public void Create(Event message) //calls the create method { EventLog.EventsLog eventlog = new EventsLog() { Name = message.UserName, DateTime = message.DateTime, ETA = message.ETA, EventType = message.EventType, Status = message.StatusFlag, isRemoteSession = false }; //abov ecreate s a new EventsLog with the sepcified fields EventLog.Status statusLog = new Status(message.UserName, message.UserName) { ETA = message.ETA, StatusFlag = message.StatusFlag }; //above upadates the status of an employee EventsLogHandler.Save(eventlog); //this saves the eventlog StatusHandler.Save(statusLog); //this saves the status }
public EventsLog[] GetHistory(string username, DateTime?startDate, DateTime?endDate) //this is the function used by zak { EventsLog[] logs = EventsLogHandler.Load(username, startDate, endDate); //creates an array of the eventlogs return(logs); //returns that array }