public virtual ActionResult Create(TimeViewModel model) { var entity = model.MapTo<SpentTimeOnTask>(); return Handle(entity, SpentTimeService.SpentTimeOnTask, () => RedirectToAction(MVC.SpentTime.TimeList(model.TaskId.Value)), new EmptyResult()); }
// GET: /Times/Create public virtual ActionResult Create(int taskId, int projectId) { var timeCreate = new TimeViewModel { TaskId = taskId, EmployeeId = UserEmployeeId ?? 1, ProjectId = projectId }; return PartialView(MVC.SpentTime.Views._AddTimeForm, timeCreate); }