Exemple #1
0
        public ActionResult clockOut(int id)
        {
            Dictionary <string, object> model = new Dictionary <string, object>();
            Employee selectedEmployee         = Employee.Find(id);
            Hour     clockOutHour             = Hour.Find(selectedEmployee.id);
            int      lastId = clockOutHour.GetId();

            clockOutHour.ClockOut(lastId);
            clockOutHour.Hours(selectedEmployee.id);
            model.Add("selectedEmployee", selectedEmployee);
            return(RedirectToAction("Details", "Employee", new { employeeId = selectedEmployee.id }));
        }