public void Scanne(EmployeesNotification employeenotification) { employeenotification.Scanned = DateTime.Now; db.Entry(employeenotification).State = EntityState.Modified; db.SaveChanges(); }
public void Mark(EmployeesNotification employeesnotification) { employeesnotification.Marked = !employeesnotification.Marked; db.Entry(employeesnotification).State = EntityState.Modified; db.SaveChanges(); }
//Employee Entity to ViewModel private EmployeeNotificationViewModel ConvertToViewModel(EmployeesNotification employeesnotification) { if (employeesnotification != null) { return(new EmployeeNotificationViewModel { id = employeesnotification.ID, recipient = ConvertToViewModel(employeeRepository.GetEmployee(employeesnotification.EmployeeID)), scanned = employeesnotification.Scanned }); } else { return(null); } }
public void Scanne(EmployeesNotification employeenotification) { throw new NotImplementedException(); }