public ActionResult Datails(int id) { Issue issue = IssueBll.GetById(id); if (issue is null) { return(RedirectToAction("Index", "Error")); } return(View(issue)); }
public ActionResult Handle(int id, string text) { Issue issue = IssueBll.GetById(id); issue.Status = Status.Handled; issue.HandleTime = DateTime.Now; issue.Msg = text; bool b = IssueBll.UpdateEntitySaved(issue); string content = System.IO.File.ReadAllText(Request.MapPath("/template/bugfeed.html")).Replace("{{title}}", issue.Title).Replace("{{link}}", issue.Link).Replace("{{text}}", text).Replace("{{date}}", issue.HandleTime.Value.ToString("yyyy-MM-dd HH:mm:ss")); BackgroundJob.Enqueue(() => CommonHelper.SendMail("bug提交反馈通知", content, issue.Email)); return(ResultData(null, b, b ? "问题处理成功!" : "处理失败!")); }