public JsonNetResult SaveComments(int id, string comments)
{
var application = _applicationRepository.GetNullableById(id);
if (application == null) return new JsonNetResult(string.Format(Messages.NotFound, "application", id));
try
{
application.DecisionReason = comments;
_applicationRepository.EnsurePersistent(application);
return new JsonNetResult(string.Format(Messages.Saved, "Decision Reason"));
}
catch (Exception ex)
{
return new JsonNetResult("There was an error saving the comments, please reload page and try again.");
}
}