Esempio n. 1
0
        public ActionResult LogWork(LogWorkModel model)
        {
            Issue issue;
            if (!ProjectContext.Issues.TryGetById(model.IssueId, out issue))
                throw new ApplicationException("issue with id = " + model.IssueId + " was not found!");

            issue.RemainingEstimate = model.RemainingEstimate;
            issue.TimeSpent += model.TimeSpent;

            Context.SaveChanges();

            return JsonSuccess(Url.Action("Index", "Issue", new {id = model.IssueId}));
        }
Esempio n. 2
0
        public ActionResult LogWork(long issueId)
        {
            Issue issue;
            if (!ProjectContext.Issues.TryGetById(issueId, out issue))
                throw new ApplicationException("issue with id = " + issueId + " was not found!");

            var model = new LogWorkModel
            {
                IssueId = issue.Id,
            };

            return PartialView("_LogWork", model);
        }