public ActionResult Edit(Models.Timesheet.Timesheet timesheetVm) { _tsUtil.UpdateTimesheet(timesheetVm); if (timesheetVm.SubmitForApproval) { _tsManager.SetState(timesheetVm.TimesheetId, TimesheetStatus.Submitted, timesheetVm.Notes); TempData["submitted"] = true; return(RedirectToAction("Details", new { id = timesheetVm.TimesheetId })); } else { TempData["saved"] = true; return(RedirectToAction("Edit", new { id = timesheetVm.TimesheetId })); } }
public ActionResult Approve(Models.Timesheet.Timesheet timesheetVm) { _tsUtil.UpdateTimesheet(timesheetVm); _tsManager.SetState(timesheetVm.TimesheetId, TimesheetStatus.Approved); return(RedirectToAction("Index")); }